public class JdbcWorkflowStore extends com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore implements AmetysWorkflowStore, Component, Serviceable, Configurable, Initializable, Disposable
Modifier and Type | Field and Description |
---|---|
protected String |
_databaseType
Configured data source type
|
protected String |
_dataSourceId
Configured datasource id
|
protected String |
_entrySequenceIncrement
from com.opensymphony.workflow.spi.jdbc.MySQLWorkflowStore
|
protected String |
_entrySequenceRetrieve
from com.opensymphony.workflow.spi.jdbc.MySQLWorkflowStore
|
protected Logger |
_logger
Logger
|
protected SQLDataSourceManager |
_sqlDataSourceManager
The manager for SQL data source
|
protected String |
_stepSequenceIncrement
from com.opensymphony.workflow.spi.jdbc.MySQLWorkflowStore
|
protected String |
_stepSequenceRetrieve
from com.opensymphony.workflow.spi.jdbc.MySQLWorkflowStore
|
static String |
ROLE
Avalon role.
|
closeConnWhenDone, currentPrevTable, currentTable, ds, entryId, entryName, entrySequence, entryState, entryTable, historyPrevTable, historyTable, stepActionId, stepCaller, stepDueDate, stepEntryId, stepFinishDate, stepId, stepOwner, stepPreviousId, stepSequence, stepStartDate, stepStatus, stepStepId
Constructor and Description |
---|
JdbcWorkflowStore() |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup(Connection connection,
Statement statement,
ResultSet result) |
void |
clearHistory(long idWorkflow)
Removes all history steps of an instance from the database.
All future calls to the history will return an empty List of Step. |
void |
configure(Configuration configuration) |
void |
deleteInstance(long idWorkflow)
Deletes a workflow instance from the database.
All future calls from the workflow to this instance will failed. |
void |
dispose() |
String |
getDatabaseType()
Database type getter
|
protected long |
getNextEntrySequence(Connection c) |
protected long |
getNextStepSequence(Connection c) |
com.opensymphony.module.propertyset.PropertySet |
getPropertySet(long id) |
void |
init(Map props) |
void |
initialize() |
List |
query(com.opensymphony.workflow.query.WorkflowExpressionQuery e) |
void |
service(ServiceManager manager) |
boolean |
shouldClearHistory()
Returns true if the history steps have to be removed when the workflow reaches its final step
|
addPreviousSteps, checkIfORExists, createCurrentStep, createCurrentStep, createEntry, findCurrentSteps, findEntry, findHistorySteps, getConnection, markFinished, moveToHistory, query, setEntryState
protected SQLDataSourceManager _sqlDataSourceManager
protected String _dataSourceId
protected String _databaseType
protected String _entrySequenceIncrement
protected String _entrySequenceRetrieve
protected String _stepSequenceIncrement
protected String _stepSequenceRetrieve
public JdbcWorkflowStore()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
ServiceException
public void configure(Configuration configuration) throws ConfigurationException
configure
in interface Configurable
ConfigurationException
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public void dispose()
dispose
in interface Disposable
public void init(Map props) throws com.opensymphony.workflow.StoreException
init
in interface com.opensymphony.workflow.spi.WorkflowStore
init
in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
com.opensymphony.workflow.StoreException
public String getDatabaseType() throws SQLException
SQLException
- on errorpublic com.opensymphony.module.propertyset.PropertySet getPropertySet(long id)
getPropertySet
in interface com.opensymphony.workflow.spi.WorkflowStore
getPropertySet
in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
public boolean shouldClearHistory()
AmetysWorkflowStore
shouldClearHistory
in interface AmetysWorkflowStore
protected void cleanup(Connection connection, Statement statement, ResultSet result)
cleanup
in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
public void deleteInstance(long idWorkflow)
AmetysWorkflowStore
deleteInstance
in interface AmetysWorkflowStore
idWorkflow
- The id of a workflow instance.public void clearHistory(long idWorkflow)
AmetysWorkflowStore
clearHistory
in interface AmetysWorkflowStore
idWorkflow
- the id of a workflow instance.public List query(com.opensymphony.workflow.query.WorkflowExpressionQuery e) throws com.opensymphony.workflow.StoreException
query
in interface com.opensymphony.workflow.spi.WorkflowStore
query
in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
com.opensymphony.workflow.StoreException
protected long getNextEntrySequence(Connection c) throws SQLException
getNextEntrySequence
in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
SQLException
protected long getNextStepSequence(Connection c) throws SQLException
getNextStepSequence
in class com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore
SQLException