Understanding Execution Flow Rules
Each Certify process contains steps that perform actions against objects of the application that is being tested. In the process step execution, the results are either logged as passed or failed.
You can set specific actions to manage the results of the step execution. Some actions that you can set include continuing the execution, executing another process, or jumping to another step. You can also implement an execution flow rule. Execution flow rules provide a way for you to navigate and exit within parent processes.
For example, you can create an execution flow rule named "Start from the top of the next row of data," and link this rule to a process named "Item Search". This process searches for a specific item and then executes a child process, "Verify Item," to verify that the right item was returned. If the step that verifies the right item fails, then a step in the child process can select the Change Execution Flow Action and select the "Start from the top with the next row of data" rule. In this case, the child process exits, and the execution flow returns to the first step in the "Item Search" process.
Each execution flow rule contains a unique name and one of two system actions:
Action |
Description |
Exit Process |
Exits out of the current process where the handler was found and returns to the parent process. |
Skip Record and Start at First Step |
Stops the execution at the current step and returns the execution to the first step of the process where the handler was found. If the process has a recordset attached, then the next record in the recordset is used. If the process does not have a recordset attached, then the process exits. |
Execution flow rules are specific to a project and managed within the Process Editor. Once an execution flow rule is created, you can link it to any process in that project. Rules can direct the execution flow in that process when the rule is selected as an On True or On False Action option in steps of child processes.
During process execution, Certify checks the list of execution flow rules associated with the current process. If Certify cannot find an execution flow rule in the current process, it looks for a rule inside each process in the execution stack. The rule is then executed, and the process execution runs to the point specified by the rule action. The process execution continues from that point until execution is complete. If no execution flow rule is found, the status of the step is set to Abort. After the execution completes, the Result Viewer displays the results of the steps executed, including the result of the execution flow rule step.
Before removing an execution flow rule from a process, verify that no steps in the current process are using the rule. Removing a rule in a process does not remove the rule from the available rules in the Execution Flow Rules list.
Example
Listed below is an example of how execution flow rules can be used during process execution to change the flow of the execution. In this example, there is a set of processes around an Order to Cash transaction. Based on the status of the submitted order, an execution flow rule may be invoked.
Execution Flow Rules Needed
The example includes creating two execution flow rules.
- Execution Flow Rule - INVALID_CUSTOMER
Action: Exit Process
Linked To: Create Order Process
This action exits the "Create Order" process.
- Execution Flow Rule - INVALID_ITEM_CODE
Action: Skip Record and Start At First Step
Linked To: Add Line Items Process
This action starts at the first step of the "Add Line Items"
process with the next record in the recordset.
Processes Created
The example includes creating three processes. The execution flow rules are created and linked with the "Add Line Items" process.
- Process "Order to cash" has three steps:
Step 1: Execute Process - "Create Order"
Step 2: Execute Process - "Create Delivery"
Step 3: Execute Process - "Ship Order"
- Process "Create Order" has three steps: [Execution Flow Rule - INVALID_CUSTOMER linked here]
Step 1: Enter Customer Code
Step 2: Execute Process - "Add Line Items"
Step 3: Capture Screen
- Process "Add Line Items" has a recordset attached with five records and the following steps: [Execution Flow Rule - INVALID_ITEM_CODE linked here]
Step 1: Enter Item Code
Step 2: Enter Quantity
Step 3: Press Save Button
Step 4: Check Status
Step 5: If Status = INVALID_ITEM_CODE, Select execution flow rule INVALID_ITEM_CODE
Step 6: If Status = INVALID_CUSTOMER, Select execution flow rule INVALID_CUSTOMER
Step 7: If Status = OUT_OF_STOCK, Execute Process -> Place Order With Supplier
Execution Flow
The master process "Order to Cash" calls the "Create Order" process that in turn calls the "Add Line Items" process. The save action in the "Add Line Items" process may result in one of the following statuses that invokes one of two execution flow rules:
- In Step 5, if status = INVALID_ITEM_CODE, then the INVALID_ITEM_CODE rule in the context of the "Add Line Items" process is executed after Step 5 in the "Add Line Items" process. Note that no execution stack unwinding is necessary since the rule is defined in the current process itself (Add Line Items). The execution moves to the first step of the "Add Line Item" process.
- In Step 6, if status = INVALID_CUSTOMER, then the INVALID_CUSTOMER rule in the context of the "Create Order" process is executed after Step 6 in the "Add Line Items" process. The execution stack is unwound once resulting in the exit of the "Create Order" process.
- In Step 7, if status = OUT_OF_STOCK, then no execution flow rule is invoked. In this case, and Execute Process action is performed calling the "Place Order With Supplier" process.