站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss Seam 1.2.1 API 英文版文档

BusinessProcess (JBoss Seam API Documentation) - JBoss Seam 1.2.1 API 英文版文档


org.jboss.seam.core
Class BusinessProcess

java.lang.Object
  extended by org.jboss.seam.core.AbstractMutable
      extended by org.jboss.seam.core.BusinessProcess
All Implemented Interfaces:
Serializable, Mutable

@Scope(value=CONVERSATION)
@Name(value="org.jboss.seam.core.businessProcess")
@Intercept(value=NEVER)
@Install(dependencies="org.jboss.seam.core.jbpm",
         precedence=0)
public class BusinessProcess
extends AbstractMutable
implements Serializable

Holds the task and process ids for the current conversation, and provides programmatic control over the business process.

Author:
Gavin King
See Also:
Serialized Form

Constructor Summary
BusinessProcess()
           
 
Method Summary
 void createProcess(String processDefinitionName)
          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 processNotFound(Long processId)
           
 boolean resumeProcess(Long processId)
          Associate the process instance with the given id 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.
 
Methods inherited from class org.jboss.seam.core.AbstractMutable
clearDirty, setDirty, setDirty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BusinessProcess

public BusinessProcess()
Method Detail

instance

public static BusinessProcess instance()

hasCurrentProcess

public boolean hasCurrentProcess()
Is there a process instance associated with the current conversation?


hasActiveProcess

public boolean hasActiveProcess()
Is there a process instance that has not ended associated with the current conversation?


hasCurrentTask

public boolean hasCurrentTask()
Is there a task instance associated with the current conversation?


getProcessId

public Long getProcessId()
The jBPM process instance id associated with the current conversation.


setProcessId

public void setProcessId(Long processId)
Set the process instance id, without validating that the process instance actually exists.


getTaskId

public Long getTaskId()
The jBPM task instance id associated with the current conversation.


setTaskId

public void setTaskId(Long taskId)
Set the task instance id, without validating that the task instance actually exists.


createProcess

public void createProcess(String processDefinitionName)
Create a process instance and associate it with the current conversation.

Parameters:
processDefinitionName - the jBPM process definition name

startTask

public void startTask()
Start the current task, using the current actor id

See Also:
Actor

endTask

public void endTask(String transitionName)
End the current task, via the given transition. If no transition name is given, check the Transition component for a transition, or use the default transition.

Parameters:
transitionName - the jBPM transition name, or null

transition

public void transition(String transitionName)
Signal the given transition for the current process instance.

Parameters:
transitionName - the jBPM transition name

resumeTask

public boolean resumeTask(Long taskId)
Associate the task instance with the given id with the current conversation.

Parameters:
taskId - the jBPM task instance id
Returns:
true if the task was found and was not ended

resumeProcess

public boolean resumeProcess(Long processId)
Associate the process instance with the given id with the current conversation.

Parameters:
processId - the jBPM process instance id
Returns:
true if the process was found and was not ended

validateTask

public boolean validateTask()
Check that the task currently associated with the conversation exists and has not ended.

Returns:
true if the task exists and was not ended

taskNotFound

protected void taskNotFound(Long taskId)

taskEnded

protected void taskEnded(Long taskId)

processEnded

protected void processEnded(Long processId)

processNotFound

protected void processNotFound(Long processId)

toString

public String toString()
Overrides:
toString in class Object