com.opensymphony.workflow.ejb
Class WorkflowEJB
java.lang.Object
com.opensymphony.workflow.AbstractWorkflow
com.opensymphony.workflow.ejb.WorkflowEJB
- All Implemented Interfaces:
- Workflow, Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean
- Direct Known Subclasses:
- WorkflowSession
public abstract class WorkflowEJB
- extends AbstractWorkflow
- implements javax.ejb.SessionBean
- Version:
- $Revision: 1.7 $
- Author:
- Pat Lightbody, Hani Suleiman
- See Also:
- Serialized Form
|
Method Summary |
void |
changeEntryState(long id,
int newState)
Modify the state of the specified workflow instance. |
void |
doAction(long id,
int actionId,
Map inputs)
Perform an action on the specified workflow instance. |
void |
ejbCreate()
|
void |
ejbPostCreate()
|
void |
executeTriggerFunction(long id,
int triggerId)
Executes a special trigger-function using the context of the given workflow instance id. |
long |
initialize(String workflowName,
int initialAction,
Map inputs)
Initializes a workflow so that it can begin processing. |
void |
setSessionContext(javax.ejb.SessionContext context)
|
| Methods inherited from class com.opensymphony.workflow.AbstractWorkflow |
canInitialize, canInitialize, canModifyEntryState, checkImplicitFinish, completeEntry, executeFunction, getAvailableActions, getAvailableActions, getAvailableActionsForStep, getAvailableAutoActions, getAvailableAutoActionsForStep, getConfiguration, getCurrentSteps, getEntryState, getHistorySteps, getPersistence, getPersistenceProperties, getPropertySet, getResolver, getSecurityPermissions, getSecurityPermissions, getWorkflowDescriptor, getWorkflowName, getWorkflowNames, passesCondition, passesConditions, passesConditions, populateTransientMap, query, query, removeWorkflowDescriptor, saveWorkflowDescriptor, setConfiguration, setResolver, transitionWorkflow, verifyInputs |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface javax.ejb.SessionBean |
ejbActivate, ejbPassivate, ejbRemove |
WorkflowEJB
public WorkflowEJB()
setSessionContext
public void setSessionContext(javax.ejb.SessionContext context)
- Specified by:
setSessionContext in interface javax.ejb.SessionBean
changeEntryState
public void changeEntryState(long id,
int newState)
throws WorkflowException
- Description copied from interface:
Workflow
- Modify the state of the specified workflow instance.
- Specified by:
changeEntryState in interface Workflow- Overrides:
changeEntryState in class AbstractWorkflow
- Parameters:
id - The workflow instance id.newState - the new state to change the workflow instance to.
If the new state is com.opensymphony.workflow.spi.WorkflowEntry.KILLED
or com.opensymphony.workflow.spi.WorkflowEntry.COMPLETED
then all current steps are moved to history steps. If the new state is
- Throws:
WorkflowException
doAction
public void doAction(long id,
int actionId,
Map inputs)
throws WorkflowException
- Description copied from interface:
Workflow
- Perform an action on the specified workflow instance.
- Specified by:
doAction in interface Workflow- Overrides:
doAction in class AbstractWorkflow
- Parameters:
id - The workflow instance id.actionId - The action id to perform (action id's are listed in the workflow descriptor).inputs - The inputs to the workflow instance.
- Throws:
InvalidInputException - if a validator is specified and an input is invalid.
WorkflowException
ejbCreate
public void ejbCreate()
ejbPostCreate
public void ejbPostCreate()
throws javax.ejb.CreateException
- Throws:
javax.ejb.CreateException
executeTriggerFunction
public void executeTriggerFunction(long id,
int triggerId)
throws WorkflowException
- Description copied from interface:
Workflow
- Executes a special trigger-function using the context of the given workflow instance id.
Note that this method is exposed for Quartz trigger jobs, user code should never call it.
- Specified by:
executeTriggerFunction in interface Workflow- Overrides:
executeTriggerFunction in class AbstractWorkflow
- Parameters:
id - The workflow instance idtriggerId - The id of the speciail trigger-function
- Throws:
WorkflowException
initialize
public long initialize(String workflowName,
int initialAction,
Map inputs)
throws InvalidRoleException,
InvalidInputException,
StoreException,
WorkflowException
- Description copied from interface:
Workflow
- Initializes a workflow so that it can begin processing. A workflow must be initialized before it can
begin any sort of activity. It can only be initialized once.
- Specified by:
initialize in interface Workflow- Overrides:
initialize in class AbstractWorkflow
- Parameters:
workflowName - The workflow name to create and initialize an instance forinitialAction - The initial step to start the workflowinputs - The inputs entered by the end-user
- Throws:
InvalidRoleException - if the user can't start this function
InvalidInputException - if a validator is specified and an input is invalid.
StoreException
WorkflowException