Creating forms and assigning them as task to an opencore user

Hey Allan, how’s it going?

What would be the approach towards a solution that creates pre-populated form items for a user to review? (self hosted v.1.5.11.123)

What I currently have, is a nodejs agent that listens to new emails. Emails that pass through the filter, get parsed for some json output.This json output needs to be reviewed by a person, before being processed further by some automation.

This sounds like a good opportunity to use the forms available in Opencore, but I cannot figure how to create multiple pre-populated forms and assign them to opencore users.

I’ve seen that currently you can have nodered spawn a form with workflow in node, but this requires a person to go to Form Workflows and start the process. Whereas these forms should be created dynamically for the user, and the user just reviews and decides what to do with the item.

Any hints would be greatly appreciated, thank you!

In Node-RED, you have an Assign node. This was created to create subflows of an existing human workflow. But you can also use it to create new flows. Here, select a workflow you want to assign, and in target, select the user you want to assign the workflow to. All values in msg.payload will then be used as values for the new workflow.

If you prefer using code to handle workflows, you can also have a look at this link: https://github.com/openiap/formagent.

This does the same as the workflow in and workflow out nodes in Node-RED.
Sorry, this example is missing the logic that calls the OpenCore API CreateWorkflowInstance like the Assign node does.

Thanks Allan, I’ll give it a go and report back. Have a good weekend :folded_hands:

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