Skip to main content

Service Task

Introduction

Service Task

info

A Service Task is a Task that uses some sort of service, which could be a Web service or an automated application.

— BPMN 2.0.2 Standard, 10.3.3, Service Task

In Flowable, Service Tasks are used to perform some form of "technical" task. Whenever you want to perform calculations, trigger some action within your application’s back end or integrate with another system, it often involves Service Tasks. Most custom tasks such as the Email task or the HTTP Task are specialized versions of Service Tasks. This is possible thanks to the extensible nature of the BPMN standard which allows us to create our own tasks based on an existing type. For more information on creating a custom service task see Implement a Custom Service Task.

It is possible to configure Service Tasks in four ways:

  • Use a Value Expression.
  • Specifying a class that implements JavaDelegate or FutureJavaDelegate.
  • Evaluating an expression that resolves to a delegation object.
  • Invoking a method expression.

In many cases you want to store the result of an operation carried out by a Service Task in a variable. The resulting variable name is specified in the Result variable attribute.

Example

The following example shows a very simple process where a user enters some information about a client. The following service task then takes that information and creates a new client in the company’s operational systems.

Service Task

Properties

:::palette-item com.flowable.design:flowable-core-palette com/flowable/palette/core.process.palette ServiceTask