If a user does not provide the input parameters within the timeout period, the user interaction returns an exception. You can define the exception behavior in a scripted function.
About this task
If you do not define the action for the workflow to take if the user interaction times out, the workflow ends in the
Failed state. Defining the exception behavior is a good workflow development practice.
Add a user interaction element to the workflow schema.
Set the security.group and timer.date attributes for the user interaction.
Define the external input parameters of the user interaction.
- Click the Edit icon () of the User Interaction element in the workflow schema.
- Click the Exception tab.
- Click Not set for the output exception binding.
- Click Create parameter/attribute in workflow to create an exception attribute to which to bind the user interaction.
The Parameter information dialog box opens.
- Create an errorCode attribute.
An errorCode attribute has the following default properties:
Create: Create workflow ATTRIBUTE with the same name
Value: Type an appropriate error message.
- Click OK to close the Parameter information dialog box.
- Drag a scriptable task element over the user interaction element in the workflow schema.
A red dashed arrow, which represents the exception link, appears between the two elements. The scriptable task element binds automatically to the errorCode attribute from the user interaction.
- Double-click the scriptable task element and provide an appropriate name.
For example, Log timeout.
For example, to record the timeout in the Orchestrator log, write the following function:
System.log("No response from user. Timed out.");
- Link and bind the scriptable task element that handles exceptions to the element that follows it in the workflow.
For example, link and bind the scriptable task element to a Throw exception element to end the workflow with an error.
You defined the exception behavior if the user interaction times out.
What to do next
Create the dialog box in which users provide input parameters. See Create the Input Parameters Dialog Box for the User Interaction.