Create process instance

Syntax

	createProcessInstance($nameOfWorkflowParticipant, $nameOfInstance)

Description

Creates and initializes a new process instance based on a workflow (participant). The function searches for a StartEvent of the specified workflow and initializes a new process instance with this StartEvent. The process instance is initialized with the given name or a default name.

Parameters

Process name Type Type Description Mandatory Default
participantName Character string Name of the workflow whose process is to be instantiated Yes -
processName Character string Name for the new process instance no "newProcessInstance"

Return value

Type: ProcessExecution

Returns the created and initialized process instance. If the workflow is not found or no StartEvent exists, null is returned.

Examples

	// Erstellt eine Prozessinstanz für den Workflow namens Ticketsystem mit Standardnamen
createProcessInstance("Ticketsystem")

// Erstellt eine Prozessinstanz für den Workflow namens Ticketsystem  mit spezifischem Namen
createProcessInstance("Ticketsystem", "Ticket-001")