Creating, Editing and Deleting Evaluators
Using Evaluators (Rules) in a Workflow
To use evaluators (rules) in a workflow, perform the following steps in Canvas Studio:
- On the home page of Canvas Studio, click Create > Workflow.
The Create Workflow page appears.
The automatic presence of the Start symbol enables the user to initiate the creation of a workflow. Start denotes the beginning of the workflow.
- Assign relevant State, Action and Activity to the workflow. For detailed information on Start, State, Action and Activity, refer Creating a Workflow. To use a workflow as a Request Category in Request Modeler, refer Using Workflow as a Request Category in Request Modeler.
- Right-click the Submit action and select Activity.
- Select a relevant activity from the Activity Type drop-down list, e.g. validation. For detailed information on Activities, refer Activities and Creating Activities.
- In the Source Type field, enter an appropriate activity source type, e.g. direct.
- In the Source field, enter an appropriate activity source, e.g. initValidation.
- In the Validation Status field, enter a relevant value, e.g. direct. On entering the value, the following Validation Status field gets automatically updated with the entered value.
- To save the activity, click Save Activity.
- Right-click the validation activity and select Rule.
- Click the Rule Type drop-down list and select rule.
- Click the Condition Type drop-down list and select equals.
Note: The evaluators appear as Condition Types in the workflow. To create an evaluator, refer Creating Evaluators.
- Enter a relevant field name in the Field Name text field, e.g. $response.ValidationStatus.
- Enter a relevant field value in the Field Value text field, e.g. success.
- Click Save to save the rule.
- Right-click the rule and then select Success with Activity.
The Connection Type gets selected automatically, depending on the selected option, e.g. Success.
- In the Response tab, type the relevant key in the Key field, e.g. status.
- Type a relevant value in the Value field, e.g. pre confirmation Validation Status.
- Click Save Connector to save the changes.
- Click the Activity Type drop-down list and select a relevant activity, e.g. createAuthFlow.
- To save the activity, click Save Activity.
- Right-click the rule and select Failure with End.
The Connection Type gets selected automatically, depending on the selected option, e.g. Failure.
- Click Save Connector to save the Failure Connection Type.
Note: It is not mandatory to enter Key and Value for the Failure Connection type. You can leave the Key and Value fields as blank.
- Right-click the createAuthFlow activity and select Activity.
- Select a relevant activity from the Activity Type drop-down list, e.g. movetoState.
- Enter the relevant state in the State field, e.g. INIT.
- To save the activity, click Save Activity.
- To conclude the workflow, right-click the movetoState activity and click End.
- Click icon to configure the settings of the workflow.
- Type the words of your choice in the Description.
- In the Bundle field, type the name of the bundle key associated with the property file.
- Click Start State drop-down list to select the initial state of INIT.
- Click PreInit Action to select the pre-initialized action of Submit. It is not mandatory for the users to select the PreInit Action.
- Once the proceedings are completed, click Save.
- Click icon to save the workflow.
A confirmation message, indicating a successful save appears.
- Click Ok.