Service Tasks
A "service task" is used to represent work performed by a service or external system as part of a business process. Service tasks are typically used to model activities that are automated and interact with external services, applications, or systems rather than requiring human interaction.
Key characteristics of a service task:
Automation: Service tasks represent activities that are typically automated and are used to call external services, perform calculations, execute scripts, or interact with other software components.
Integration: And service tasks are often used to model the integration of a business process with external systems, such as web services, APIs, databases, or other software applications. They allow the process to interact with these external resources.
Attributes:
The following are the attributes associated with the "Service" tasks:
Attribute | Description |
---|---|
ID: | The "Id" attribute represents the unique identifier of the service task. It corresponds to the task definition key in the BPMN model. |
Name: | The "Name" attribute defines the name or label of the service task. |
Implementation:
The "Implementation" attribute specifies the method, class, or service that the service task will invoke or execute. It defines the technical implementation behind the task's functionality. Implementation options include:
Implementation | Description |
---|---|
Java Class: | If a Java class is used, the fully qualified class name is specified. This means that a Java class is responsible for executing the task. |
Expression: | An expression or script can be used to define the task's behavior. This allows for flexible and custom task execution based on the defined expression. |
Delegate Expression: | A delegate expression can be used to dynamically determine the implementation class at runtime. This provides flexibility in choosing the implementation class based on runtime conditions. |
External: | In the case of an "External" implementation, the service task is associated with an external service or system. This includes making HTTP requests to external APIs, invoking other systems via messaging, or integrating with external services. External Task Configuration: This allows you to set the "Task Priority" level. |
Connector: | The "Connector" implementation involves the use of a connector or integration technology to interact with various external systems or services. It encapsulates the communication details and provides a structured way to make the interaction. You must define the connector's configuration to have it referenced within the service task. |
Asynchronous Continuations:
Asynchronous continuations are used to specify whether a task is executed asynchronously, they include:
Attribute | Description |
---|---|
Asynchronous Before: | The "Asynchronous Before" attribute indicates if the task can be started asynchronously before other tasks or events in the process. |
Asynchronous After: | Similarly, the "Asynchronous After" attribute denotes whether the script task can be completed asynchronously after other tasks or events in the process. |