How to complete sub-process synchronously within the main process?

Hello there!

There is an issue I’ve faced with:

I need to model a process which includes user verification as a sub-process (simplified model attached).
But there is a nuance: on stage “Verify user” I have to wait till user will send the verification mail (user task completion assumed to be done inside java, as the mail will be sent in java’s ws).
Is there a “legal” approach to get sub-process result of verification synchronously?

So, the user need to know if the email confirmation is done, right after he sent it.

Hi @Zodd,

who is responsible for the task “Verify user”?

If it is an internal user who has to check that the new customer exists, a simple approach is to put the load to the internal user and rename the task to “Verify user from the email” or something similar.

Hope this helps, Ingo

The “verify user” task is stands for user’s input (e.g. wait for the user till he’ll send the verification code from email), so the external user is responsible for it.
The corrected model will look like this:

On “1” the request with verification code will arrive from the user.
On “2” i’m sending the result of verification (in other words, the sub-process result) in response within the same request.

Hi @Zodd,

Here is an old example, how to transform an email into a complete of a user task:

Another option if to use a message receive event and the message correlation API (Message Events | in the “complete tasks from email” task to continue your process.

Hope this helps, Ingo

1 Like

The second option seems helpful, thanks!