External users approval

In a workflow, I would like to set up a phase where I send an email to a temporary user (which is not an active JMIX user) to approve the task (by inserting a link in the e-mail I send). Is it possible to implement it in my workflow?

Hello,
I would try something like this:

  1. create a database table / entity that will contain the process execution id, and maybe some timestamps and e-mail an other data for historic purposes

  2. Send an e-mail with an e-mail task, after sending e-mail process execution moves on to the entity data task or a script task that will write some things (see 1) and from there move to the task you want approved and stops. That task has outcomes for approve and deny and appropriate outgoing flows.
    Mail contains a navigation deep link (see 3) to the entity you wrote with the data task

  3. Make a detail view that is accessible to an anonymous user, that will open when one navigates using the link sent Opening Views :: Jmix Documentation

  4. Make an “approve” button on that view, which will use flowable API and find the process by the execution id, and then find a task id by name, and then set the value of the outcome, and finish the task

  5. Improvements
    Once this works, make security improvements, like hash the execution id, maybe add some temporary passwords on top of that, also write a service that would supply the data to the “approval view” rather than connecting to the database table directly, etc…

Kind regards,
Mladen

1 Like

Thanks Mladen! We’ll look into it.