StartWorkflow

You can use the StartWorkflow function to launch a workflow from within another workflow. This function enables workflow orchestration and chaining, allowing complex business processes to be automated through sequential or parallel workflow execution.

When to use

You can use this function when launching workflows programmatically from another workflow.

When not to use

You cannot use this function when the current user should be prompted with the Workflow Launch form.

Syntax

int StartWorkflow(string actionSet, string objSymbol, string objKey, DateTime startDate, params string[] @params);

Parameters

Parameter Type Required Description
actionSet string Yes Code for the workflow action set to launch.
objSymbol string Yes

The symbol of the object.

Note: You can use empty quotation marks ("") for the current workflow symbol.
objKey string Optional

The key of the object.

Note: You can use empty quotation marks ("") for the current workflow symbol.
startDate DateTime Optional The start date or time for the workflow.
Note: 
  • Empty or null value indicates current date/time.
  • Use format like #10/05/2025# in VB or Date Time object in C#.
@params string[] Optional One or more input parameter arguments in the same sequence as defined in the Input tab of the Action Set form.

Return Value

The application may trigger additional workflows or notifications.

Impact

The object data or system state can be modified.

Prerequisites

  • The action set must exist and be active.
  • The input parameters must match the action set definition.
  • StartWorkflow does not allow input parameters to be modified by the user.
  • This function creates a pending task for a wizard but does not launch the wizard for the user to view.

Examples

Example 1
startWorkflow("ITEM_APPROVAL", "ITEM", "00031");
Description
This command starts the workflow action set named "ITEM_APPROVAL" for the item with key "00031".
Example 2
startWorkflow("WF_SPEC_REVIEW", "SPECIFICATION", "Spect\0001", #10/05/2025#);
Description
This command starts the workflow action set named "WF_SPEC_REVIEW" for the specification object "Spect\0001" to begin on October 5, 2025.
Example 3
StartWorkflow("APPROVE", "", "");
Description
This command starts the workflow action set named "APPROVE" for the current object on which the workflow is launched.