[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Feprints.org%2Fep3%2Fworkflow&amp;data=01%7C01%7C%7Cb580e8ab403d4159688608d8268f45bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=TvHwbOVDQ1vPucw4Vh7pn6HrfrwnK0rTNSZY0ocKKvo%3D&amp;reserved=0"; 
 ? <flow>
 ??? <stage ref="core"/>
 ? </flow>
 ? <stage name="core">
 ? ...
 ?? </stage>

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.


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.\n" 
> error).
> - 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: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=01%7C01%7C%7Cb580e8ab403d4159688608d8268f45bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=Fev1wbZrKe4yucKQaa3pG8UciklYVAsXOl4UhQLtRew%3D&amp;reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7C%7Cb580e8ab403d4159688608d8268f45bc%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=k%2FsoW4cclBBCj7e072UHcRRA6i%2FmHHR0mxJUmca7Mvo%3D&amp;reserved=0

This email has been checked for viruses by AVG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20200712/e6f1515a/attachment.html