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.

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.

Prerequisites

Add a user interaction element to the workflow schema.

Procedure

  1. Log in to the Automation Orchestrator Client.
  2. Navigate to Library > Workflows, and select your workflow.
  3. Select the Schema tab.
  4. Select your User interaction element.
  5. Create an exception handling variable.
    1. Under Exception handling, click Select variable.
    2. To create an exception handling variable, click Create New.
    3. Name the variable errorCode.
    4. Under Value, enter an appropriate error message.
    5. Click Create.
  6. 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 variable from the user interaction.
  7. Define the exception handling script.
    1. Enter an appropriate name for the Scriptable task element.
      For example, Log timeout.
    2. In the Scripting tab of the Scriptable task element, write a JavaScript function to handle the exception.
      For example, to record the timeout in the Automation Orchestrator log, write the following function:
      System.log("No response from user. Timed out.");
  8. 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.
  9. To finish editing your workflow, click Save.

Results

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.