此内容没有您所选择的语言版本。
Chapter 56. Work item handler project customization
You can customize the code of a work item handler project. There are two Java methods required by a work item handler, executeWorkItem
and abortWorkItem
.
Java Method | Description |
---|---|
| Executed by default when the work item handler is run. |
| Executed when the work item is aborted. |
In both methods, the WorkItem
parameter contains any of the parameters entered into the custom task through a GUI or API call, and the WorkItemManager
parameter is responsible for tracking the state of the custom task.
Example code structure
Parameter | Description |
---|---|
|
Checks that all parameters marked “required” are present. If they are not, an |
|
Example of getting a parameter from the |
| Executes the custom Java code when a parameter is received. |
| Passes results to the custom task. The results are placed in the data output areas of the custom task. |
|
Marks the work item handler as complete. The |
| Aborts the custom Java code. May be left blank if the work item is not designed to be aborted |
Red Hat Process Automation Manager includes a limited set of supported custom tasks. Custom tasks that are not included in Red Hat Process Automation Manager are not supported.