Hello people, hope you are very well!
I’m trying to populate a queue from nodered with a form in openflow and then run it in openrpa. I did not find tutorials about it since the queues in all the examples are populated from openrpa (like on Workitems | OpenIAP Documentation or youtube). Seeing that nodered has this possibility I would like to follow this path.
For example, in a first field of the form, place a web page and in a second field, another web page. That payload will be added to a queue as a workitem to be executed. Then, when executing the queue (manually or by calendar) take the workitem and openrpa execute the opening of the two web pages.
So, create the following flow in node red…
Populate step:
Play queue step:
If the input does not start from a workitem taken in “pop workitem”, the form correctly and directly passes the arguments to openrpa. But something is modified in the payload structure when the flow starts from a workitem so it doesn’t seem to recognize the parameters directly and I have to put a function between them.
I tried to put the following, but obviously it is not correct since although it executes it at the moment of “update workitem” I receive the following error “server error: unexpected end of JSON input”…
Function 1:
msg.payload =
{
url : msg.payload.payload.url,
url2: msg.payload.payload.url2,
_id : msg.payload.payload._id,
submit: msg.payload.payload._id,
submitbutton: msg.payload.payload.submitbutton
};
return msg;
Then the workitem remains in a pending state even though the web pages have been opened.
What is the correct way to do this?
Thank you so much for your time!