WSkip
You can use the WSkip function to skip a specific action step in an Optiva workflow. This function supports conditional workflow branching based on business logic or data conditions.
WSkip skips an action in a workflow and is typically used within conditional statements to create dynamic workflow paths.
- Configuring Action Set Next Line
-
When an action contains
Wskip, the Next Line field on the Action Set form must list more than one next line to handle both scenarios:When skipping multiple actions, the Next Line column must include ALL possible next actions:
- The actions that might be skipped.
- The action that follows the skipped actions.
- Example
-
- Action 2 contains Wskip for Action 3.
- Action 4 depends on the completion of Action 3.
- If Action 3 is skipped, Action 4 must still occur.
- Both Action 3 and Action 4 must be listed in the Next Line for Action 2.
When to use
You can use this function to:
- Skip approval steps for low-value transactions.
- Skip additional testing when initial tests pass.
When not to use
You cannot use this function to:
- Skip actions without configuring multiple Next Line values in the Action Set.
- Skip actions that have critical data dependencies in later workflow steps.
- Skip critical validation or approval steps arbitrarily.
Syntax
int WSkip(string actionCode);
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| Action | string | Yes | The name or code of the action step to be skipped. |
Return Value
The application returns a value greater than zero (0) if the operation is successful.Impact
Once an action is skipped, it cannot be unskipped within the same workflow instance.Prerequisites
- Workflow execution is immediately affected.
- Subsequent workflow steps must account for skipped actions.
- Proper Next Line configuration is required.
- Incorrect configuration can cause workflow failures.
Examples
- Example 1
- Skip Approval Based on Blacklist Status.
- Description
-
In this example, the if statement checks the status of items for a formula. If all of the items are not on the blacklist, the TECH_DIR action is skipped.
If any of the items are on the blacklist, giving the blacklist parameters positive (1) value, then the TECH_DIR action is not skipped.
- Example 2
- Skipping multiple actions.
- Description
-
In this example, If the status of the workflow object is 400, then the next two actions in the workflow are skipped. In this example, NEW_STATUS and APPROVE_STATUS, are skipped.
In the Action Set form, the Next Line column for this action includes the action lines for NEW_STATUS, APPROVE_STATUS and the next action.
For example, if the above script is in the second action and NEW_STATUS is action three and APPROVE_STATUS is action four, then Next Line is 3;4;5.