Official Content

This data type represents the execution of a process definition (it is the equivalent of a process instance in the GXflow inbox). It is provided by the Workflow API.

Properties

Property Type Access Description
Id WorkflowProcessInstanceId Read Identifier
ProcessDefinition WorkflowProcessDefinition Read Process definition
ProcessDefinitionId WorkflowProcessDefinitionId Read Process definition identifier
Subject WorkflowSubject Read/ Write Subject
Comments WorkflowComment Read/ Write Comments
Priority WorkflowPriority Read/ Write Priority
Owner WorkflowUser Read/ Write User that created the instance
State WorkflowProcessInstanceState Read State
Created DateTime Read Creation date and time
Ended DateTime Read Ending date and time
WarningTime DateTime Read/ Write Deadline warning date and time
DeadlineTime DateTime Read/ Write Deadline date and time
hasParent Boolean Read Indicates if it is a subprocess
Parent WorkflowProcessInstance Read Parent process instance
hasChildren Boolean Read Indicates if it has a subprocesss
Children Collection (WorkflowProcessInstance) Read Collection with subprocesses of process instance
Workitems Collection (WorkflowWorkitem) Read Collection with the workitems of the process instance
RecursiveWorkitems Collection (WorkflowWorkitem) Read Collection with the workitems of the process instance and the workitems of their subprocesss, etc
States Collection (WorkflowProcessInstanceStates) Read States that a process instance may have
Restrictions (Deprecated) Collection (WorkflowRestriction) Read Associated restrictions, as this property is deprecated use GXflow Organizational Units.
ApplicationData Collection (WorkflowApplicationData) Read Associated application data
DocumentInstances Collection (WorkflowDocumentInstance) Read Associated document instances
Participants Collection (WorkflowUser) Read Users participating in the process instance
Calendar WorkflowCalendar Read/Write Calendar associated to process instance
ParentWorkitem WorkflowWorkitem Read Corresponding workitem in the parent process
ActiveWorkitems Collection (WorkflowWorkitem) Read It obtains the active workitems of the process instance
RecursiveChildren Collection (WorkflowProcessInstance) Read Returns all the subprocess associatedto the instance, recursively (children, etc)
OrganizationalUnits Collection (WorkflowOrganizationalUnit) Read Organizational Units Collection
Error WorkflowError Read Error
BusinessEventInstances Collection (WorkflowBusinessEventInstance) Read Business Event Instances associated to the process instance
Duration WorkflowDuration Read Time in seconds since the process is active
ExtendedAtributes Collection (WorkflowAttribute Read Process instance's attributes
NodeInstances Collection WorkflowNodeInstance Read Process instance's nodes

 

Methods

  • Load

Allows loading a process instance from the identifier.

Load (id)

 

  • Start

Process instance execution starts.

Start ()

  • StartFrom

Process instance execution starts. The process execution starts as from the specified activity.

StartFrom (activity)

Name Type Movement Description
activity WorkflowActivity Input Activity with which you want to Start the process instance (must be one of the initial activities)

 

  • Suspend

Suspends the process instance.

Suspend ()

  • Resume

Resumes the execution of the process instance.

Resume ()

 

  • Abort

Aborts the process instance.

Abort ()

  • ChangeState

Changes process instance states according to the specified value(see documentation on Workflow objects states).

ChangeState (state)

Name Type Movement Description
state WorkflowProcessInstanceState Input The states that you want to change

 

  • GetApplicationDataByName

Returns the Application Data type object whose name coincides with the specified one.

GetApplicationDataByName (name): applicationData

Name Type Movement Description
name Character Input Name of the application data

 

  • PreasignWorkitem

It allows preassigning a workitem corresponding to the specified activity. It is considered a previous assignment since the workitem does not need to exist; in the future at the creation of a workitem corresponding to the activity, the workflow engine will make the assignment.

PreassignWorkitem (activity, user)

Name Type Movement Description
activity WorkflowActivity Input Activity
user WorkflowUser Input User to be assigned

 

  • GetWorkitemByActivity

Returns the workitem object associated to the specified activity. If there is no workitem associated to this activity, an error is received back (801). If there are several workitems associated to the activity, the most recent workitem is received back.

GetWorkitemByActivity (activity): workitem

Name Type Movement Description
activity WorkflowActivity Input Activity

 

  • GetAttributeByName

Returns the Attribute Data type object whose name coincides with the specified one.

GetAttributeByName(name): Attribute

Name Type Movement Description
name Character Input Attribute name

 

  • CreateWorkitem

Creates a workitem associated to the specified activity (*).

CreateWorkitem (activity): workitem

Name Type Movement Description
activity WorkflowActivity Input Activity

(*) If there is already a workitem corresponding to the activity in active state, the already existing workitem is returned instead of creating a new one.

 

  • Reactivate

Restarts from an activity, a terminated process instance.

Reactivate (activity)

Name Type Movement Description
activity WorkflowActivity Input Activity to restart

 

  • AssignOrganizationalUnit

Assigns the organizational unit to the process instance.

AssignOrganizationalUnit (organizationalUnit)

Name Type Movement Description
organizationalUnit WorkflowOrganizationalUnit Input Unit to be assigned

 

  • UnassignOrganizationalUnit

Unassign the organizational unit to the process instance.

UnassignOrganizationalUnit (organizationalUnit)

Name Type Movement Description
organizationalUnit WorkflowOrganizationalUnit Input Unit to be unassigned

 

  • AddRestriction

Adds a restriction to the process instance.

AddRestriction (restriction)

Name Type Movement Description
restriction WorkflowRestriction Input Restriction to be added to the process instance

 

  • AddAttribute

Adds an attribute to the process instance.

AddAttribute(attribute)

Name Type Movement Description
attribute WorkflowAttribute Input Attribute to be added to the process instance

 

  • RemoveRestriction

Removes a restriction from the process instance.

RemoveRestriction (restriction)

Name Type Movement Description
restriction WorkflowRestriction Input Restriction to be removed from the process instance

 

  • RemoveAttribute

Removes an attribute from the process instance.

RemoveAttribute(attribute)

Name Type Movement Description
attribute WorkflowAttribute Data Type Input Attribute to be removed from the process instance

 

  • ThrowSignal

Allows to throw a signal to the process instance.

ThrowSignal (signal)

Name Type Movement Description
signal WorkflowName Input Signal Name to be thrown

 

  • MigrateToActiveVersion

Allows to migrate a process instance to the active version (available from GeneXus X Evolution 3 Upgrade 6).

MigrateToActiveVersion ()

 

See Also

Workflow Error Codes

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant