Design the Workflow

Updated

The workflow design task guides you through creating and configuring a workflow, setting up the CheckReady activity, and setting up the email activities to send notifications for client connectivity results.

Create a New Workflow

  1. From the navigation pane, go to Developer tools.

    The Developer tools page appears.

  2. Click the Workflows tile.

    The Workflows page appears.

  3. In the upper-right corner of the page, from the All tasks list, select New workflow.

    The workflow editor opens in a new browser tab, with the Start activity in the design area.

    Workflow Editor Window

  4. Click the white space in the design area.

    The workflow properties appear at the bottom of the design area.

Configure the Workflow

  1. On the General tab, complete the following:

    • In the Name box, enter a name for the workflow.

    • In the Description box, enter a brief description about the workflow.

      Workflow Properties

  2. On the Inputs tab, define a variable for the client name:

    1. Click Add.

      The Add workflow input dialog box appears.

    2. In the Name box, enter clientName.

    3. Beside the Type list, click +.

      The Select Type dialog box appears.

    4. Expand CvEntities, and then select ClientEntity.

    5. Click OK.

    6. Click Save.

      Add workflow input

Set Up the CheckReady Activity

  1. From the Activities pane, go to QCommands > Operations.

  2. Select and drag the CheckReady activity into the design area.

    Drag CheckReady Activity

    Note

    This activity runs the qoperation checkready command.

  3. Select the CheckReady activity.

    The properties for the CheckReady activity appear at the bottom of the design area.

  4. On the General tab, complete the following:

    1. In the Display Name box, rename the activity to Check Readiness Report.

    2. To continue to the next activity even if the activity fails, move the Continue after maximum restarts toggle key to the right.

    3. To run the activity once, in the Maximum restarts box, enter 0.

  5. On the Inputs tab, complete the following:

    1. Beside client, click +.

      The Insert variable dialog box appears.

    2. Go to system > workflowEngine, and then select clientName.

      CheckReady Insert Variable

  6. Click OK.

  7. From the reportType list, select the level of detail that you want to see in the report.

Configure the Decision Activity

  1. From the Activities pane, go to Control Flow > Decision.

  2. Select the Decision activity, and then drag it into the design area.

    Decision Activity

    The Decision activity verifies that the Client Readiness Report activity completed successfully.

  3. In the design area, select the Decision activity.

    The properties for the Decision activity appears at the bottom of the design area.

  4. On the General tab, in the Display Name box, rename the activity to Report Ready?.

  5. On the Inputs tab, complete the following:

    1. Beside Expression, click +.

    2. The Insert variable dialog box appears.

    3. Go to Client Readiness Report, and then select exitCode.

    4. Click OK.

      Decision Activity_exitCode

    5. Add ==0 to the expression value.

      The value should look as: xpath:{/worfkflow/CheckReady_1/exitCode} ==0. This expression verifies that the exit code of Client Readiness Report is 0.

      Decision Activity Expression Value

Set Up an Email Activity to Send a Notification When the CheckReady Command Succeeds

  1. Go to Activities > Utilities.

  2. Select the Email activity, and then drag it into the design area.

    Success Email

  3. In the design area, select the Email activity.

    The properties for the Email activity appears at the bottom of the design area.

  4. On the General tab, in the Display Name, rename the activity to Success Email.

    If the qoperation CheckReady command succeeds, the Success Email activity sends an email notification to the specified email address.

  5. On the Inputs tab, do the following:

Step

Procedure

Specify the email recipient

  1. Beside the To box, click the Insert variable + button.

    The Insert variable dialog box appears.

  2. Go to system > executor, and then select userName.

  3. Click OK.

Specify the email subject

  1. Beside the Subject box, click the Insert variable + button.

    The Insert variable dialog box appears.

  2. Go to inputs, and then select clientName.

  3. Click OK.

Configure the email body

  1. Place the cursor in the body.

  2. Click Insert variable.

    Success Email Inputs

    The Insert variable dialog box appears.

  3. Go to Client Readiness Report, and then htmlReport.

  4. Click OK.

Set Up an Email Activity to Send a Notification When the CheckReady Command Fails

  1. Go to Activities > Utilities.

  2. Select the Email activity, and then drag it into the design area.

  3. In the design area, select the Email activity.

    The properties for the Email activity appears at the bottom of the design area.

  4. On the General tab, in the Display Name box, rename the activity to Failure Email.

    If the qoperation CheckReady command fails, the Success Email activity sends an email to the workflow creator.

  5. Remove the connector (arrow) between Success Email activity and Failure Email activity.

  6. Mouse hover over the Is Report Ready activity, and then click the arrow to pull the connector into the Failure Email activity.

  7. On the Inputs tab, do the following:

  8. Step

    Procedure

    Specify the email recipient

    1. Beside the To box, click the Insert variable + button,

      The Insert variable dialog box appears.

    2. Go to system > executor, and then select userName.

    3. Click OK.

    4. In the To box, enter a semicolon (;) next to the variable, and enter xpath:{/workflow/system/executor/userName}

    Specify the email subject

    1. Beside the Subject box, click the Insert variable + button.

      The Insert variable dialog box appears.

    2. Go to inputs, and then select clientName.

    3. Click OK.

    Specify the email body

    1. Place the cursor in the body.

    2. In the upper-left corner, click Insert Variable .

      The Insert variable dialog box appears.

    3. Go to system, and then select jobID.

    4. Click OK.

    5. Similarly, insert the commandOutput variable.

  9. Configure the true and false transitions for the Is Report Ready activity:

    1. Specify the true conditional transition:

      1. Select the connector (arrow) between Is Report Ready activity and Success Mail activity.

      Success Email Connector

      1. On the General tab, complete the following:

      2. In the Display Name box, enter Yes.

      3. From the Execute when condition is list, select true.

        True Transition

    2. Specify the false condition:

      1. Select the connector (arrow) between Is Report Ready activity and Failure Mail activity.

      2. On the General tab, complete the following:

      3. In the Display Name, enter No.

      4. From the Execute when condition is list, select false.

        False Transition