Node-red - Workitem add node - nextrun

Hi Allan & Community!

I am trying to add workitem to a queue using Node-Red and I’m seeing this error below:

image

I tried to find within your tutorials and other topics and I couldn’t find the way of setting the “nextrun” parameter.

Could you let me know which the steps are, please?

Thanks in advance!

I remember seeing this error, before and creating a fix, but i cannot remember where and what it was.
Can you please show or share the workflow you have that gave this error ?

Thanks for your reply, Allan.
This error occurs when I try to “Add Workitem” using Node-Red’s “Add Workitem” node and setting “msg.nextrun”:

After running this flow I saw that Workitems are created without “Next run” field.
The error “ServerError: wi.nextrun.getTime is not a function” also appears when I try to add a workitem using OpenRPA but in that case the workitem is created properly.

Could you tell me how to set the “msg.nextrun” properly?

Thanks!
Lazaro

Hey, someone was nice and send me an email reminding me where i saw this error before.
The issue back then was a combination of an issue with my nodered nodes and something inside openflow.
But this error turned out to be a bug in my code, when parsing dates from a grpc message
I have rebuild the openflow and nodered images, so please pull fresh version.

If you are not using app.openiap.io then please update your openflow using docker-compose pull ( if you are using my docker repo there should be a normal-pull.sh / normal-pull.bat file )

And to update nodered, simply stop, and re start it to force it to update to latest image

This will Pop the item from the queue not earlier than 10 minutes from now

var x = 10; 
var inXTime = new Date();
inXTime.setMinutes(inXTime.getMinutes() + x);
msg.nextrun = inXTime.toISOString();

1 Like

Allan, rjvanschoonhove,

Thanks to both of you! It worked completely as expected!
Thanks for your time and dedication!

Great automations!
Lazaro

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.