EPrints Technical Mailing List Archive

Message: #08250


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Short workflow


Hi Martin,

I have just tested this on my own instance that is running the current GitHub HEAD for 3.4 and the only issue I found was that when I added a subject it returned me to the top of the page but successfully added the subject I wanted.  I had no problem uploading files and the page being updated with the newly added document.  Similarly, I had no problems filing in any other simpler fields.  My short workflow was just a quick hack to add all components into the same stage so my workflow looks like:

<workflow xmlns="http://eprints.org/ep3/workflow" xmlns:epc="http://eprints.org/ep3/control">
  <flow>
    <stage ref="core"/>
  </flow> 
  <stage name="core">
  ...
   </stage>
</workflow>

Obviously, this is not a very realistic workflow and has the flaw that you cannot preset the type so that the appropriate components can be shown in later stages.  Maybe a better approach would be to extend the Import plugin so that it would send you to an Edit:ShortWorkflow screen plugin that uses the short rather than default (full) workflow.  Then the regular user who has just imported an item has minimal work to do but the reviewer (or even that user) could come along later and look across the whole workflow.

The error message you see reported getting on line 499 suggests that a stage with a particular ID could not previously be found and so led to this undefined value.  So how you have assigned names (i.e. IDs in this context) to you stages in your XML workflow file may be the reason for the issue here.  I don't think there are any major restrictions on what characters can be used in stage names but I would advise keeping them alphanumeric with underscores where necessary, just in case.

I have also previously noted issues with the file upload looking unsuccessfully but then when you reload the page the new document with its metadata fields being present.  I cannot remember off the top of my head what resolution I found for this.  I think it was due to some race condition with the _javascript_.  If you include all the stages on one page there is an even greater chance that the bits of _javascript_ will not play nice with each other and lead to a race condition or some other issue which prevents the newly uploaded document from appearing automatically.  It is worth having a look at your browser's web console when you are uploading a file to see if you can spot anything.

Regards

David Newman

On 12/07/2020 09:12, Martin Braendle via Eprints-tech wrote:
Hi everyone,

we had the idea to offer a single-stage submission workflow after complaints of a VIP at our university that the current workflow requires too many clicks.

This short workflow would be activated after an import of an item from Crossref, PubMed, ORCID or another source (e.g. at the first revision of the item and if the source is known), and would only offer the missing required fields and the upload component. For many users (we have several hundred submitters adding more than 10'000 items annually), this would save hours of work.

However, after implementing such a single stage, we observed that some components have the following problems if merged into one stage with other components:
- the Subject component crashes the application  after choosing a subject for adding   (leading to a "Can't call method "get_state_params" on an undefined value at /service-app/apps/eprints/perl_lib/EPrints/Workflow.pm line 499.\nerror).
- the Upload component does not return feedback when uploading a document (it goes on infinitely). After interruption, however, the system indicates that the document had been uploaded and is there.

Definitely something is wrong with the workflow engine. In my opinion, components should be freely includable in whatever part of the stage.

Has anybody else tried to achieve something similar and had success?

Kind regards,

Martin

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/

Virus-free. www.avg.com