Package com.opensymphony.workflow.spi
Interface WorkflowStore
- All Known Implementing Classes:
MemoryWorkflowStore,OfbizWorkflowStore,SerializableWorkflowStore
public interface WorkflowStore
Interface for pluggable workflow stores configured in osworkflow.xml.
Only one instance of a workflow store is ever created, meaning that
if your persistence connections (such as java.sql.Connection) time out,
it would be un-wise to use just one Connection for the entire object.
- Author:
- Pat Lightbody
-
Method Summary
Modifier and TypeMethodDescriptioncreateCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) Persists a step with the given parameters.createEntry(String workflowName) Persists a new workflow entry that has not been initialized.findCurrentSteps(long entryId) Returns a list of all current steps for the given workflow instance ID.findEntry(long entryId) Pulls up the workflow entry data for the entry ID given.findHistorySteps(long entryId) Returns a list of all steps that are finished for the given workflow instance ID.com.opensymphony.module.propertyset.PropertySetgetPropertySet(long entryId) Returns a PropertySet that is associated with this workflow instance ID.voidCalled once when the store is first created.markFinished(Step step, int actionId, Date finishDate, String status, String caller) Mark the specified step as finished.voidmoveToHistory(Step step) Called when a step is finished and can be moved to workflow history.query(WorkflowExpressionQuery query) query(WorkflowQuery query) Deprecated.voidsetEntryState(long entryId, int state) Set the state of the workflow instance.
-
Method Details
-
setEntryState
Set the state of the workflow instance.- Parameters:
entryId- The workflow instance id.state- The state to move the workflow instance to.- Throws:
StoreException
-
getPropertySet
Returns a PropertySet that is associated with this workflow instance ID.- Parameters:
entryId- The workflow instance id.- Returns:
- a property set unique to this entry ID
- Throws:
StoreException
-
createCurrentStep
Step createCurrentStep(long entryId, int stepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) throws StoreException Persists a step with the given parameters.- Parameters:
entryId- The workflow instance id.stepId- the ID of the workflow step associated with this new Step (not to be confused with the step primary key)owner- the owner of the stepstartDate- the start date of the stepstatus- the status of the steppreviousIds- the previous step IDs- Returns:
- a representation of the workflow step persisted
- Throws:
StoreException
-
createEntry
Persists a new workflow entry that has not been initialized.- Parameters:
workflowName- the workflow name that this entry is an instance of- Returns:
- a representation of the workflow instance persisted
- Throws:
StoreException
-
findCurrentSteps
Returns a list of all current steps for the given workflow instance ID.- Parameters:
entryId- The workflow instance id.- Returns:
- a List of Steps
- Throws:
StoreException- See Also:
-
findEntry
Pulls up the workflow entry data for the entry ID given.- Parameters:
entryId- The workflow instance id.- Returns:
- a representation of the workflow instance persisted
- Throws:
StoreException
-
findHistorySteps
Returns a list of all steps that are finished for the given workflow instance ID.- Parameters:
entryId- The workflow instance id.- Returns:
- a List of Steps
- Throws:
StoreException- See Also:
-
init
Called once when the store is first created.- Parameters:
props- properties set in osworkflow.xml- Throws:
StoreException
-
markFinished
Step markFinished(Step step, int actionId, Date finishDate, String status, String caller) throws StoreException Mark the specified step as finished.- Parameters:
step- the step to finish.actionId- The action that caused the step to finish.finishDate- the date when the step was finished.status- The status to set the finished step to.caller- The caller that caused the step to finish.- Returns:
- the finished step
- Throws:
StoreException
-
moveToHistory
Called when a step is finished and can be moved to workflow history.- Parameters:
step- the step to be moved to workflow history- Throws:
StoreException
-
query
Deprecated.usequery(WorkflowExpressionQuery)instead.- Parameters:
query- the query to use- Returns:
- a List of workflow instance ID's
- Throws:
StoreException
-
query
- Parameters:
query- the query to use- Returns:
- a List of workflow instance ID's
- Throws:
StoreException
-
query(WorkflowExpressionQuery)instead.