Workflow Server Data Type

Official Content
This documentation is valid for:

The Server Data Type represents a session with the Workflow engine. It provides the context for the interaction with the Workflow engine, acting as an input point to the other objects.

This Data Type is provided by the Workflow API.

Properties

Property Type Access Description
Session Character Read Session
AutoCommit (deprecated) (*) Boolean Write = TRUE allows properties/methods so requiring to perform transactional control = FALSE allows delegating transactional control to the applications
AutoRebuildWorklists Boolean Write = TRUE allows that, when the organizational model is modified, the engine automatically rebuilds involved users worklists = FALSE the engine does not rebuild worklists automatically
Connected User WorkflowUser Read Returns the user connected to the engine
Error WorkflowError Read Error code
Settings WorkflowSettings (Collection) Read Returns the collection of workflow server settings.

(*) Since X version apis does not commit by default.

Methods

  • Connect

A valid session to interact with the Workflow engine is obtained.

Connect (user, password)

Name Type Movement Description
User Character Input User Id
Password Character Input User Password

 

  • Disconnect

Ends the connection created with the connect method.

Disconnect ()

 

  • Load

Loads a WorkfllowSession.

Load(Session)

Name Type Movement Description
Session WorkflowSession Input Workflow session

 

  • ThrowSignal

This method throws a signal which reaches all the actives Signal Intermediate Events

ThrowSignal()

 

  • ListProcessDefinitionsOrderBy

This method returns a collection with the process definitions matching the specified filter in the specified order.

ListProcessDefinitions (filter, order) : Collection (WorkflowProcessDefinition)

 

Name Type Movement Description
Filter WorkflowFilter Valid filters: Name, User Input Filter
Order Numeric (WorkflowOrder.ID_ASC, WorkflowOrder.ID_DESC, WorkflowOrder.NAME_ASC, WorkflowOrder.NAME_DESC) Input Order

  

  • ListProcessDefinitions

This method returns a collection with the process definitions matching the specified filter.

ListProcessDefinitions (filter): Collection (WorkflowProcessDefinition)

 

Name Type Movement Description
Filter WorkflowFilter Valid filters: Name, User Input Filter

  

  • ListActivitiesOrderBy

This method returns a collection with the activities matching the specified filter in the specified order.

ListActivitiesOrderBy (filter, order) : Collection (WorkflowActivity)

 

Name Type Movement Description
Filter WorkflowFilter Valid filters: ProcessDefinition, Name, Role, User Input Filter
Order Numeric (WorkflowOrder.ID_ASC, WorkflowOrder.ID_DESC, WorkflowOrder.NAME_ASC, WorkflowOrder.NAME_DESC) Input Order

Sample

&workflowserver = new()
&workflowserver.Connect(!"WFADMINISTRATOR", !"WFADMINISTRATOR")

&workflowerror = &workflowserver.Error
If &workflowerror.Code > 0
    msg(format(!"code:%1 %2", &workflowerror.Code, &workflowerror.Message),Status)
    return
EndIf
&ProcessDefinition = &workflowserver.GetProcessDefinitionByName(!"SampleName")
&Filter.ProcessDefinition = &ProcessDefinition
&Activities = &workflowserver.ListActivitiesOrderBy(&Filter, WorkFlowOrder.NAME_ASC) // Order by Task Name
for &Activity in &Activities
  msg(format(!"%2 %1", &Activity.Name, &Activity.Id), status)
endfor
  • GetActivityById

This method returns an Activity type object whose identifier (of both Process and Activity) coincides with the specified one.

GetActivityById (processDefinitionId, activityId) : WorkflowActivity 

Name Type Movement Description
ProcessDefinitionId Numeric Input Process defintion identifier
ActivityId Numeric Input Activity identifier

 

  • GetActivityByName

This method returns the first Activity type object whose name coincides with the specified one.

GetActivityByName (name) : WorkflowActivity

Name Type Movement Description
Name Character Input Activity name

 

  • GetActivityByGUID

This method return the Activity type object whose GUID coincides with the specified one.

GetActivityByGUID (name) : WorkflowActivity

Name Type Movement Description
GUID Charcter Input Activity GUID

 

  • GetBusinessEventById

This method returns a Business event type object whose identifier coincides with the specified one.

GetBusinessEventById (id, ProcessDefinitionId): WorkflowBusinessEvent 

Name Type Movement Description
Id Numeric Input Business event identifier
ProcessDefinitionId Numeric Input Process defintion identifier

 

  • GetBusinessEventByName

This method returns the first Business Event type object whose name coincides with the specified one.

GetBusinessEventById (name): WorkflowBusinessEvent 

Name Type Movement Description
Name Character Input Business event name

 

  • GetBusinessEventInstanceById

This method returns a Business Event Instance type object whose identifier coincides with the specified one.

GetBusinessEventById (id): WorkflowBusinessEventInstance

Name Type Movement Description
Id Numeric Input Business event instance identifier

 

  • GetDocumentRepository

This method returns the Document Repository object.

GetDocumentRepository () : WorkflowDocumentRepository

 

  • GetEventRepository

This method returns the Event Repository object.

GetEventRepository () : Workflow Event Repository

 

  • GetOrganizationalModel

This method returns the Organizational Model object.

GetOrganizationalModel () : WorkflowOrganizationalModel

 

  • GetProcessDefinitionById

This method returns a Process Definition type object whose Id coincides with the specified one.

GetProcessDefinitionById (id) : WorkflowProcessDefinition)

Name Type Movement Description
Id Numeric Input Process definition identifier

 

  • GetProcessDefinitionByName

This method returns the first Process Definition type object whose name coincides with the specified one.

GetProcessDefinitionByName (name) : WorkflowProcessDefintion 

Name Type Movement Description
Name Character Input Process definition name

 

  • GetProcessDefinitionByGUID

This method returns a Process Definition type object whose GUID coincides with the specified one.

GetProcessDefinitionByGUID (GUID) : WorkflowProcessDefinition)

Name Type Movement Description
GUID Character Input Process definition 

 

  • GetProcessInstanceById

This method returns a Process Instance type object whose identifier coincides with the specified one.

GetProcessInstanceById (id) : WorkflowProcessInstance

Name Type Movement Description
Id Numeric Input Process instance identifier

 

  • GetProcessInstanceBySubject

This method returns the first Process Instance type object whose subject coincides with the specified one.

GetProcessInstanceSubject ( subject) : WorkflowProcessInstance

Name Type Movement Description
Subject Character Input Process instance subject

 

  • GetWorkitemById

This method returns a Workitem type object whose identifier coincides with the specified one.

GetWorkitemById (id) : WorkflowWorkitem

Name Type Movement Description
Id Numeric Input Workitem identifier

 

  • ListActivities

This method returns a collection with the activities matching the specified filter.

ListActivities (filter) : Collection (WorkflowActivity)

Name Type Movement Description
Filter WorkflowFilter Valid filters: ProcessDefinition, Name, Role, User Input Filter

 

  • ListBusinessEventInstances

This method returns a collection with the business event instances matching the specified filter.

 ListBusinessEventInstances (filter) : Collection (WorkflowEventInstance)

Name Type Movement Description
Filter WorkflowFilter Valid filters: User, ProcessDefinition, ProcessInstance, Subject,  CreatedFrom, CreatedTo, EndedFrom, EndedTo Input Filter

 

  • ListBusinessEventInstancesOrderBy

This method returns a collection with the business event instances matching the specified filter in the specified order.

 ListBusinessEventInstances (filter,order) : Collection (WorkflowEventInstance)

Name Type Movement Description
Filter WorkflowFilter Valid filters: User, ProcessDefinition, ProcessInstance, Subject,  CreatedFrom, CreatedTo, EndedFrom, EndedTo Input Filter
Order   Input Order

 

  • ListBusinessEvents

This method returns a collection with the business event matching the specified filter.

 ListBusinessEvent (filter) : Collection (WorkflowEvent)

Name Type Movement Description
Filter WorkflowFilter Valid filters: User, ProcessDefinition, ProcessInstance, Subject,  CreatedFrom, CreatedTo, EndedFrom, EndedTo Input Filter

 

  • ListBusinessEventOrderBy

This method returns a collection with the business event matching the specified filter in the specified order.

 ListBusinessEventsOrderBy (filter,order) : Collection (WorkflowEvent)

Name Type Movement Description
Filter WorkflowFilter Valid filters: User, ProcessDefinition, ProcessInstance, Subject,  CreatedFrom, CreatedTo, EndedFrom, EndedTo Input Filter
Order   Input Order

 

  • ListCalendars

This method returns the list of calendars matching the established filter.

ListCalendars (filter) : Collection (WorkflowCalendar)

 

Name Type Movement Description
Filter WorkflowFilter Valid filters: Name, Calendar Input Filter

 

  • ListCalendarsOrderBy

This method returns the list of calendars matching the specified filter in the specified order.

ListCalendarsOrderBy(filter,order) : Collection (WorkflowCalendar)

 

Name Type Movement Description
Filter WorkflowFilter Input Filter
Order  WorkflowFilter Valid filters: Name, Calendar Input Order

 

  • ListProcessInstances

This method returns a collection with the process instances matching specified filter.

ListProcessInstances (filter) : Collection (WorkflowProcessInstance) 

Name Type Movement Description
Filter WorkflowFilter Valid filters: From, To, ProcessDefinition, User, Priority, WithWarning, Subject, State, Relevant Data Input Filter

 

  • ListProcessInstancesOrderBy

This method returns a collection with the process instances matching the specified filter in the specified order.

ListProcessInstances (filter, order) : Collection (WorkflowProcessInstance) 

Name Type Movement Description
Filter WorkflowFilter Valid filters: From, To, ProcessDefinition, User, Priority, WithWarning, Subject, State Input Filter
Order Numeric (WorkflowOrder.ID_ASC,  WorkflowOrder.ID_DESC,  WorkflowOrder.CREATED_ASC,  WorkflowOrder.CREATED_DESC,  WorkflowOrder.PRIORITY_ASC,  WorkflowOrder.PRIORITY_DESC,  WorkflowOrder.STATE_ASC,  WorkflowOrder.STATE_DESC,  WorkflowOrder.WITH_WARNING_ASC,  WorkflowOrder.WITH_WARNING_DESC,  WorkflowOrder.SUBJECT_ASC,  WorkflowOrder.SUBJECT_DESC,  WorkflowOrder.ENDED_ASC,  WorkflowOrder.ENDED_DESC) Input Order

 

  • ListWorkitems

This method returns a collection of Workitems matching specified filter.

ListWorkitems (filter) : Collection (WorkflowWorkitem) 

Name Type Movement Description
Filter WorkflowFilter Valid filters: From, To, ProcessInstance, Subject, ProcessDefinition, Activity, User, Priority, WithWarning, State, Relevant Data Input Filter

 

  • ListWorkitemOrderBy

This method returns a collection of Workitems matching the specified filter in the specified order.

ListWorkitems (filter, order) : Collection (WorkflowWorkitem) 

Name Type Movement Description
Filter WorkflowFilter Valid filters: From, To, ProcessInstance, Subject, ProcessDefinition, Activity, User, Priority, WithWarning, State Input Filter
Order Numeric (WorkflowOrder.ID_ASC,  WorkflowOrder.ID_DESC,  WorkflowOrder.CREATED_ASC,  WorkflowOrder.CREATED_DESC,  WorkflowOrder.PRIORITY_ASC,  WorkflowOrder.PRIORITY_DESC,  WorkflowOrder.STATE_ASC,  WorkflowOrder.STATE_DESC,  WorkflowOrder.WITH_WARNING_ASC,  WorkflowOrder.WITH_WARNING_DESC,  WorkflowOrder.SUBJECT_ASC,  WorkflowOrder.SUBJECT_DESC,  WorkflowOrder.ENDED_ASC,  WorkflowOrder.ENDED_DESC) Input Order
  • ListConnectedUsers

This method returns a collection with the users that are connected to the engine matching the specified filter.

ListConnectedUsers(filter) : Collection (WorkflowUser)

 

Name Type Movement Description
Filter WorkflowFilter Valid filters: Name, User Input Filter

 

  • ListConnectedUsersOrderBy

This method returns a collection with the users that are connected to the engine matching the specified filter in the specified order.

ListConnectedUsersOrderBy(filter,order) : Collection (WorkflowUser)

 

Name Type Movement Description
Filter WorkflowFilter Valid filters: Name, User Input Filter
Order Numeric (WorkflowOrder.USER_ASC ,WorkflowOrder.USER_DESC ,WorkflowOrder.NAME_ASC ,WorkflowOrder.NAME_DESC ) Input Order

 

  • ListNodeInstances

This method returns a collection with the Node Instances matching the specified filter.

ListNodeInstances (filter) : Collection (WorkflowNodeInstance) 

Name Type Movement Description
Filter WorkflowFilter Valid filters: ProcessDefinition, ProcessIntance, From, To Input Filter

 

  • ListNodeInstancesOrderBy

This method returns a collection with the Node Instances matching the specified filter in the specified order.

ListNodeInstancesOrderBy(filter,order) : Collection (WorkflowNodeInstance)

Name Type Movement Description
Filter WorkflowFilter Valid filters: ProcessDefinition, ProcessIntance, From, To, Node Input Filter
Order Numeric (WorkflowOrder.ID_ASC,  WorkflowOrder.ID_DESC,  WorkflowOrder.CREATED_ASC, WorkflowOrder.CREATED_DESC, WorkflowOrder.ENDED_ASC,  WorkflowOrder.ENDED_DESC) Input Order

 

  • ListNodes

This method returns a collection with the Nodes matching the specified filter.

ListNodes (filter) : Collection (WorkflowNode) 

Name Type Movement Description
Filter WorkflowFilter Valid filters: Name, Process Definition Input Filter

 

  • ListNodesOrderBy

This method returns a collection with the Nodes matching the specified filter in the specified order.

ListNodesOrderBy(filter,order) : Collection (WorkflowNode)

Name Type Movement Description
Filter WorkflowFilter Valid filters: Name, Process Definition Input Filter
Order Numeric (WorkflowOrder.ID_ASC,  WorkflowOrder.ID_DESC, WorkflowOrder.NAME_ASC ,WorkflowOrder.NAME_DESC Input Order

 

  • GetSettingById

This method returns a Workflow Setting whose identifier coincides with the specified one.

GetSettingById (Id) : WorkflowSetting

Name Type Movement Description
Id WorkflowSettingId Input Workflow Setting identifier

 

This method return a Workflow Node whose identifiers coincides with the specified.

GetNodeById (processDefinitionId,Id): WorkflowNode

Name Type Movement Description
processDefinitionId WorkflowProcessDefinitionId Input Workflow Process Definition identifier
Id WorkflowNodeId Input Workflow Node identifier

 

This method return the Workflow Node whose GUID coincides with the specified one.

GetNodeByGUID (GUID): WorkflowNode

Name Type Movement Description
GUID Character Input Workflow Node GUID

 

This method returns the first Workflow Nodetype object whose name coincides with the specified one.

GetNodeByName (name) : WorkflowNode

Name Type Movement Description
name Character Input Workflow Node name

 

This method return a WorkflowNodeInstance object whose identifier coincides with the specified one.

GetNodeInstanceById(id) : WorkflowNodeIntance

Name Type Movement Description
id WorkflowNodeInstanceId Input Workflow Node Instance identifier

See Also

Workflow Error Codes