public class JDBCWorkflowStore extends Object implements WorkflowStore
The following properties are all required:
Modifier and Type | Field and Description |
---|---|
protected boolean |
closeConnWhenDone |
protected String |
currentPrevTable |
protected String |
currentTable |
protected DataSource |
ds |
protected String |
entryId |
protected String |
entryName |
protected String |
entrySequence |
protected String |
entryState |
protected String |
entryTable |
protected String |
historyPrevTable |
protected String |
historyTable |
protected String |
stepActionId |
protected String |
stepCaller |
protected String |
stepDueDate |
protected String |
stepEntryId |
protected String |
stepFinishDate |
protected String |
stepId |
protected String |
stepOwner |
protected String |
stepPreviousId |
protected String |
stepSequence |
protected String |
stepStartDate |
protected String |
stepStatus |
protected String |
stepStepId |
Constructor and Description |
---|
JDBCWorkflowStore() |
Modifier and Type | Method and Description |
---|---|
protected void |
addPreviousSteps(Connection conn,
long id,
long[] previousIds) |
boolean |
checkIfORExists(NestedExpression nestedExpression) |
protected void |
cleanup(Connection connection,
Statement statement,
ResultSet result) |
protected long |
createCurrentStep(Connection conn,
long entryId,
int wfStepId,
String owner,
Date startDate,
Date dueDate,
String status) |
Step |
createCurrentStep(long entryId,
int wfStepId,
String owner,
Date startDate,
Date dueDate,
String status,
long[] previousIds)
Persists a step with the given parameters.
|
WorkflowEntry |
createEntry(String workflowName)
Persists a new workflow entry that has not been initialized.
|
List |
findCurrentSteps(long entryId)
Returns a list of all current steps for the given workflow instance ID.
|
WorkflowEntry |
findEntry(long theEntryId)
Pulls up the workflow entry data for the entry ID given.
|
List |
findHistorySteps(long entryId)
Returns a list of all steps that are finished for the given workflow instance ID.
|
protected Connection |
getConnection() |
protected long |
getNextEntrySequence(Connection c) |
protected long |
getNextStepSequence(Connection c) |
com.opensymphony.module.propertyset.PropertySet |
getPropertySet(long entryId)
Returns a PropertySet that is associated with this workflow instance ID.
|
void |
init(Map props)
Called once when the store is first created.
|
Step |
markFinished(Step step,
int actionId,
Date finishDate,
String status,
String caller)
Mark the specified step as finished.
|
void |
moveToHistory(Step step)
Called when a step is finished and can be moved to workflow history.
|
List |
query(WorkflowExpressionQuery e) |
List |
query(WorkflowQuery query) |
void |
setEntryState(long id,
int state)
Set the state of the workflow instance.
|
protected DataSource ds
protected String currentPrevTable
protected String currentTable
protected String entryId
protected String entryName
protected String entrySequence
protected String entryState
protected String entryTable
protected String historyPrevTable
protected String historyTable
protected String stepActionId
protected String stepCaller
protected String stepDueDate
protected String stepEntryId
protected String stepFinishDate
protected String stepId
protected String stepOwner
protected String stepPreviousId
protected String stepSequence
protected String stepStartDate
protected String stepStatus
protected String stepStepId
protected boolean closeConnWhenDone
public void setEntryState(long id, int state) throws StoreException
WorkflowStore
setEntryState
in interface WorkflowStore
id
- The workflow instance id.state
- The state to move the workflow instance to.StoreException
public com.opensymphony.module.propertyset.PropertySet getPropertySet(long entryId)
WorkflowStore
getPropertySet
in interface WorkflowStore
entryId
- The workflow instance id.public boolean checkIfORExists(NestedExpression nestedExpression)
public Step createCurrentStep(long entryId, int wfStepId, String owner, Date startDate, Date dueDate, String status, long[] previousIds) throws StoreException
WorkflowStore
createCurrentStep
in interface WorkflowStore
entryId
- The workflow instance id.wfStepId
- 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 IDsStoreException
public WorkflowEntry createEntry(String workflowName) throws StoreException
WorkflowStore
createEntry
in interface WorkflowStore
workflowName
- the workflow name that this entry is an instance ofStoreException
public List findCurrentSteps(long entryId) throws StoreException
WorkflowStore
findCurrentSteps
in interface WorkflowStore
entryId
- The workflow instance id.StoreException
Step
public WorkflowEntry findEntry(long theEntryId) throws StoreException
WorkflowStore
findEntry
in interface WorkflowStore
theEntryId
- The workflow instance id.StoreException
public List findHistorySteps(long entryId) throws StoreException
WorkflowStore
findHistorySteps
in interface WorkflowStore
entryId
- The workflow instance id.StoreException
Step
public void init(Map props) throws StoreException
WorkflowStore
init
in interface WorkflowStore
props
- properties set in osworkflow.xmlStoreException
public Step markFinished(Step step, int actionId, Date finishDate, String status, String caller) throws StoreException
WorkflowStore
markFinished
in interface WorkflowStore
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.StoreException
public void moveToHistory(Step step) throws StoreException
WorkflowStore
moveToHistory
in interface WorkflowStore
step
- the step to be moved to workflow historyStoreException
public List query(WorkflowExpressionQuery e) throws StoreException
query
in interface WorkflowStore
e
- the query to useStoreException
public List query(WorkflowQuery query) throws StoreException
query
in interface WorkflowStore
query
- the query to useStoreException
protected Connection getConnection() throws SQLException
SQLException
protected long getNextEntrySequence(Connection c) throws SQLException
SQLException
protected long getNextStepSequence(Connection c) throws SQLException
SQLException
protected void addPreviousSteps(Connection conn, long id, long[] previousIds) throws SQLException
SQLException
protected void cleanup(Connection connection, Statement statement, ResultSet result)
protected long createCurrentStep(Connection conn, long entryId, int wfStepId, String owner, Date startDate, Date dueDate, String status) throws SQLException, StoreException
SQLException
StoreException
Copyright © 2021 catworkx GmbH. All rights reserved.