Syntax

	createProcessInstance($startEvent, $instanceName)

Description

Creates and initializes a new process instance based on a StartEvent. The process instance will be initialized with either the provided name or a default name.

Parameters

Process name Type Type Description Mandatory Default
startEvent StartEvent Start event that defines the process to instantiate Yes -
name Character string Name for the new process instance no "newProcessInstance"

Return value

Type: ProcessExecution

Returns the created and initialized process instance. If the startEvent parameter is null, returns null.

Examples

	// Create a process instance with default name
createProcessInstance(startEvent)

// Create a process instance with specific name
createProcessInstance(startEvent, "Process-001")

Output: The newly created process instance.