Man illustrationFlower illustration


Service task

Estimated reading: 3 minutes 60 views

Service task activity uses some sort of service, which could be a Web service or an automated application.

ExclusiveWhen it receives a special job from a specific process example, it makes jobs run in order.
Set service task to be triggerableSets service tasks to be triggerable. This makes it possible that an external trigger determines when to continue the execution of the process once the Service Task was executed.
Execution listenersListeners for an activity, process, sequence flow, start and end event.
Multi-instance typeDetermines if multiple instances of this activity are created.
Cardinality (Multi-instance)An expression or numeric value (integer) that determines how many instances are created.
Collection (Multi-instance)The number of instances is determined by the elements of a collection. For each element in the collection, a new instance is created.
Element Variable (Multi-instance)The variable under which each element is available to the newly created instance.
Completion Condition (Multi-instance)An expression that, if it evaluated to true, stops the creation of new instances.
Is for compensationA flag that identifies whether this activity is intended for the purposes of compensation.
ClassClass that implements the service task logic.
ExpressionAn expression which is resolved once the task is executed.
Delegate expressionService task logic defined with a delegate expression.
Class fieldsClass fields make it possible to inject field values into your delegated class.
Result variable nameThe name of the variable in which the result of the Service Task’s execution is stored.
Use local scope for result variablesIndicates whether to store the result variable as a local variable.
Skip expressionDefines an expression which is evaluated before executing the task.

You can use the Execution listeners as shown in the examples.




You can use the Multi-instance type as shown in the examples.

Default, only one instance is created:


Activities are created in parallel. This is a good practice for User tasks activity:


Activities are created sequentially. This is a good practice for Service tasks activity:


You can use the Cardinality (Multi-instance) as shown in the examples.



You can use the Collection (Multi-instance) as shown in the example.


You can use the Element variable (Multi-instance) as shown in the example.


You can use the Completion Condition (Multi-instance) as shown in the example.


You can use the Expression as shown in the examples.


${clientService.createNewClient(firstName, lastName, email)}

You can use the Result variable name as shown in the example.


You can use the Skip expression as shown in the example.