Some processes require a specific email to be received in order to proceed. In this article we will see how to block the execution of a work item until the reception of a specific email or until the reception of a response to an email sent during its execution.
Block the execution of a work item from until a specific email is received
You must perform the following configuration:
- Open the desired process in the process editor.
- Make sure the automation option is enabled.
- Add an intermediate message event after the activity for which you want to stop the progress of the process.
- Select the intermediate message event. Go to “Properties” and leave the default behavior setting. Indeed, this intermediate message event must have a “Catch” type behavior. This behavior is represented by a white envelope, while the “Throw” type behavior is represented by a black envelope.
- Go to the “Execution” part and choose the connector: “Mail”.
- In the “Mailbox Type” field, choose “Email mailbox”.
- Click the chain icon.
The system then generates a specific email address. The affected work item can only move forward after an email is received at this address. As you can see, the email address is matched to the Token number. It is therefore necessary to enter the number of the work item concerned in the email address in order to be able to reach this intermediate message event.
For information, the e-mail address provided concerns only work items in production. This address does not work for test work items. It is therefore not possible to use this functionality for a test work item.
Block the execution of a work item until the reception of a response to an email sent during its execution
Your process must have email sending configured. To do this, you need to insert in your process an intermediate message event with throw behavior. To learn more about this type of configuration: Sending Emails.
Then repeat the first 5 steps seen previously.
- In the “Mailbox Type” field, choose “Previous event sent answer”.
- Click the chain icon.
- Select the intermediate send message event concerned.
From then on, the system will only release the work item’s advancement to that stage of the process when it receives a response to the relevant email.