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.
Check if any items in the formula are on the blacklist.
If no blacklisted items (value = 0), skip technical director approval.
If any blacklisted items exist (value > 0), proceed with TECH_DIR approval.
object oBlklist = ObjProperty("VALUE.TP0", "", "", "BLACKLIST", 2);

if (Convert.ToInt32(oBlklist) == 0)
{
    // No blacklisted items found - skip technical director review
    int iSkip = Wskip("TECH_DIR");
    MessageList("No blacklisted items - Technical Director approval skipped");
}
else
{
    // Blacklisted items present - proceed with technical director review
    MessageList("Blacklisted items found - Technical Director approval required");
}

return 0;
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.
If status is 400, skip both NEW_STATUS and APPROVE_STATUS actions.
object oStatus = ObjProperty("STATUSIND.STATUS");

if (Convert.ToInt32(oStatus) == 400)
{
    int iSkip = Wskip("NEW_STATUS");
    iSkip = Wskip("APPROVE_STATUS");
    
    MessageList("Status is 400 - Skipping NEW_STATUS and APPROVE_STATUS actions");
}

return 111;
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.