@Scope(value=CONVERSATION) @Name(value="org.jboss.seam.bpm.businessProcess") @BypassInterceptors @Install(dependencies="org.jboss.seam.bpm.jbpm", precedence=0) public class BusinessProcess extends AbstractMutable implements Serializable
| Constructor and Description |
|---|
BusinessProcess() |
| Modifier and Type | Method and Description |
|---|---|
void |
createProcess(String processDefinitionName)
Create a process instance and associate it with the
current conversation.
|
void |
createProcess(String processDefinitionName,
boolean shouldSignalProcess)
Create a process instance and associate it with the
current conversation.
|
void |
createProcess(String processDefinitionName,
String businessKey)
Create a process instance and associate it with the
current conversation.
|
void |
endTask(String transitionName)
End the current task, via the given transition.
|
Long |
getProcessId()
The jBPM process instance id associated with
the current conversation.
|
Long |
getTaskId()
The jBPM task instance id associated with
the current conversation.
|
boolean |
hasActiveProcess()
Is there a process instance that has not ended
associated with the current conversation?
|
boolean |
hasCurrentProcess()
Is there a process instance associated with
the current conversation?
|
boolean |
hasCurrentTask()
Is there a task instance associated with
the current conversation?
|
static BusinessProcess |
instance() |
protected void |
processEnded(Long processId) |
protected void |
processEnded(String key) |
protected void |
processNotFound(Long processId) |
protected void |
processNotFound(String key) |
boolean |
resumeProcess(Long processId)
Associate the process instance with the given id with the
current conversation.
|
boolean |
resumeProcess(String processDefinition,
String key)
Associate the process instance with the given business key
with the current conversation.
|
boolean |
resumeTask(Long taskId)
Associate the task instance with the given id with the current
conversation.
|
void |
setProcessId(Long processId)
Set the process instance id, without validating
that the process instance actually exists.
|
void |
setTaskId(Long taskId)
Set the task instance id, without validating
that the task instance actually exists.
|
void |
startTask()
Start the current task, using the current actor id
|
protected void |
taskEnded(Long taskId) |
protected void |
taskNotFound(Long taskId) |
String |
toString() |
void |
transition(String transitionName)
Signal the given transition for the current process instance.
|
boolean |
validateTask()
Check that the task currently associated with the conversation
exists and has not ended.
|
clearDirty, setDirty, setDirtypublic static BusinessProcess instance()
public boolean hasCurrentProcess()
public boolean hasActiveProcess()
public boolean hasCurrentTask()
public Long getProcessId()
public void setProcessId(Long processId)
public Long getTaskId()
public void setTaskId(Long taskId)
public void createProcess(String processDefinitionName)
processDefinitionName - the jBPM process definition namepublic void createProcess(String processDefinitionName, boolean shouldSignalProcess)
processDefinitionName - the jBPM process definition namepublic void createProcess(String processDefinitionName, String businessKey)
processDefinitionName - the jBPM process definition namebusinessKey - the business key of the new process definitionpublic void startTask()
Actorpublic void endTask(String transitionName)
transitionName - the jBPM transition name, or nullpublic void transition(String transitionName)
transitionName - the jBPM transition namepublic boolean resumeTask(Long taskId)
taskId - the jBPM task instance idpublic boolean resumeProcess(Long processId)
processId - the jBPM process instance idpublic boolean resumeProcess(String processDefinition, String key)
processDefinition - the jBPM process definition namekey - the jBPM process instance keypublic boolean validateTask()
protected void taskNotFound(Long taskId)
protected void taskEnded(Long taskId)
protected void processEnded(Long processId)
protected void processNotFound(Long processId)
protected void processEnded(String key)
protected void processNotFound(String key)
Copyright © 2015 Seam Framework. All Rights Reserved.