Information Technology Reference
In-Depth Information
The following table shows the Script task's special properties:
Script task
Property
Description
This property defines the piece of code we want executed when the process execution reaches this node. Inside this piece of
code, we have access to all of the process variables and the special variable kcontext .
Script
Script
Language
This defines the language used in the Script property. This language could be Java or MVEL, which is a scripting language
that runs on top of the JVM.
Business users do not commonly use Script tasks, but they are really helpful for technical
people. By adding Script tasks to a process, we can easily modify the behavior of our pro-
cesses without modifying any Java class. We can use this type of task to add logs, mes-
sages, or to perform data transformation tasks in our processes. As a rule of thumb, Script
tasks shouldn't contain business logic inside them. Abstract tasks, Human tasks, and Ser-
vice tasks are better places to implement this kind of logic. Let's start with the Service
tasks as shown in the following table:
Service task
Property
Description
If the jBPM6 predefined handler for this task type is used ( ServiceTaskHandler ), this property should be the fully quali-
fied name of the class we want to use as a service; and each time this task is executed, a new instance will be created through
reflection.
Service
Interface
Service
Operation This property identifies the name of the method we want to invoke in the Interface object.
User tasks are the ones that should be performed by humans:
User task
Property
Description
A comma-separated list of actor IDs or an expression of the form #{<expression>} that evaluates to a string object.
In the default Human task implementations of jBPM6, this property defines the possible owners of a task.
Actors
Search WWH ::




Custom Search