public interface WorkItem
WorkItemHandler
for execution. Whenever a work item is completed (or whenever the work
item cannot be executed and should be aborted), the work item manager
should be notified.
For example, a work item could be created whenever an email needs to
be sent. This work item would have a name that represents the type of
work that needs to be executed (e.g. "Email") and parameters related to
its execution (e.g. "From" = "me@mail.com", "To" = ..., "Body" = ..., ...).
Result parameters can contain results related to the execution of this
work item (e.g. "Success" = true).WorkItemHandler
,
WorkItemManager
Modifier and Type | Field and Description |
---|---|
static int |
ABORTED |
static int |
ACTIVE |
static int |
COMPLETED |
static int |
PENDING |
Modifier and Type | Method and Description |
---|---|
long |
getId()
The unique id of this work item
|
String |
getName()
The name of the work item.
|
Object |
getParameter(String name)
Returns the value of the parameter with the given name.
|
Map<String,Object> |
getParameters()
Returns the map of parameters of this work item.
|
long |
getProcessInstanceId()
The id of the process instance that requested the execution of this
work item
|
Object |
getResult(String name)
Returns the value of the result parameter with the given name.
|
Map<String,Object> |
getResults()
Returns the map of result parameters of this work item.
|
int |
getState()
The state of the work item.
|
static final int PENDING
static final int ACTIVE
static final int COMPLETED
static final int ABORTED
long getId()
String getName()
int getState()
Object getParameter(String name)
null
if the parameter cannot be found.name
- the name of the parameterMap<String,Object> getParameters()
Object getResult(String name)
null
if the result cannot be found.name
- the name of the result parameterMap<String,Object> getResults()
long getProcessInstanceId()
Copyright © 2001–2021 JBoss by Red Hat. All rights reserved.