public class WorkflowStore extends Store
| Modifier and Type | Field and Description |
|---|---|
static int |
LOCK_TIMEOUT |
| Constructor and Description |
|---|
WorkflowStore() |
WorkflowStore(boolean selectForUpdate) |
WorkflowStore(Connection connection,
boolean selectForUpdate) |
WorkflowStore(Connection connection,
Store store,
boolean selectForUpdate) |
WorkflowStore(Store store,
boolean selectForUpdate) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteAction(String id)
Delete the Action with given id.
|
WorkflowActionBean |
getAction(String id,
boolean locking)
Load the action data and returns a bean.
|
List<WorkflowActionBean> |
getActionsForWorkflow(String wfId,
boolean locking)
Loads all the actions for the given Workflow.
|
List<WorkflowActionBean> |
getActionsSubsetForWorkflow(String wfId,
int start,
int len)
Loads given number of actions for the given Workflow.
|
List<WorkflowActionBean> |
getPendingActions(long minimumPendingAgeSecs)
Load All the actions that are pending for more than given time.
|
List<WorkflowActionBean> |
getRetryAndManualActions(String wfId)
Load All the actions that are START_RETRY or START_MANUAL or END_RETRY or END_MANUAL.
|
List<WorkflowActionBean> |
getRunningActions(long checkAgeSecs)
Load All the actions that are running and were last checked after now - miminumCheckAgeSecs
|
WorkflowJobBean |
getWorkflow(String id,
boolean locking)
Load the Workflow into a Bean and return it.
|
int |
getWorkflowCountWithStatus(String status)
Get the number of Workflows with the given status.
|
int |
getWorkflowCountWithStatusInLastNSeconds(String status,
int secs)
Get the number of Workflows with the given status which was modified in given time limit.
|
String |
getWorkflowIdForExternalId(String externalId)
Get the Workflow ID with given external ID which will be assigned for the subworkflows.
|
WorkflowJobBean |
getWorkflowInfo(String id)
Load the Workflow and all Action details and return a WorkflowJobBean.
|
WorkflowJobBean |
getWorkflowInfoWithActionsSubset(String id,
int start,
int len)
Load the Workflow and subset Actions details and return a WorkflowJobBean.
|
WorkflowsInfo |
getWorkflowsInfo(Map<String,List<String>> filter,
int start,
int len)
Loads all the jobs that are satisfying the given filter condition.
|
void |
insertAction(WorkflowActionBean action)
Create a new Action record in the ACTIONS table with the given Bean.
|
void |
insertWorkflow(WorkflowJobBean workflow)
Create a Workflow and return a WorkflowJobBean.
|
void |
purge(long olderThanDays,
int limit)
Purge the Workflows Completed older than given days.
|
void |
updateAction(WorkflowActionBean action)
Update the given action bean to DB.
|
void |
updateWorkflow(WorkflowJobBean wfBean)
Update the data from Workflow Bean to DB along with the workflow instance data.
|
beginTrx, closeTrx, commitTrx, contains, getConnection, getEntityManager, getFlushMode, isActive, isClosed, isDetached, rollbackTrxpublic static final int LOCK_TIMEOUT
public WorkflowStore()
public WorkflowStore(Connection connection, boolean selectForUpdate) throws StoreException
StoreExceptionpublic WorkflowStore(Connection connection, Store store, boolean selectForUpdate) throws StoreException
StoreExceptionpublic WorkflowStore(boolean selectForUpdate) throws StoreException
StoreExceptionpublic WorkflowStore(Store store, boolean selectForUpdate) throws StoreException
StoreExceptionpublic void insertWorkflow(WorkflowJobBean workflow) throws StoreException
workflow - workflow beanStoreExceptionpublic WorkflowJobBean getWorkflow(String id, boolean locking) throws StoreException
id - Workflow IDlocking - true if Workflow is to be lockedStoreExceptionpublic int getWorkflowCountWithStatus(String status) throws StoreException
status - Workflow Status.StoreExceptionpublic int getWorkflowCountWithStatusInLastNSeconds(String status, int secs) throws StoreException
status - Workflow Status.secs - No. of seconds within which the workflow got modified.StoreExceptionpublic void updateWorkflow(WorkflowJobBean wfBean) throws StoreException
wfBean - Workflow BeanStoreException - If Workflow doesn't existpublic void insertAction(WorkflowActionBean action) throws StoreException
action - WorkflowActionBeanStoreException - If the action is already presentpublic WorkflowActionBean getAction(String id, boolean locking) throws StoreException
id - Action Idlocking - true if the action is to be lockedStoreException - If action doesn't existpublic void updateAction(WorkflowActionBean action) throws StoreException
action - Action BeanStoreException - if action doesn't existpublic void deleteAction(String id) throws StoreException
id - Action IDStoreException - if Action doesn't existpublic List<WorkflowActionBean> getActionsForWorkflow(String wfId, boolean locking) throws StoreException
wfId - Workflow IDlocking - true if Actions are to be lockedStoreExceptionpublic List<WorkflowActionBean> getActionsSubsetForWorkflow(String wfId, int start, int len) throws StoreException
wfId - Workflow IDstart - offset for select statementlen - number of Workflow Actions to be returnedStoreExceptionpublic List<WorkflowActionBean> getPendingActions(long minimumPendingAgeSecs) throws StoreException
minimumPendingAgeSecs - Minimum Pending age in secondsStoreExceptionpublic List<WorkflowActionBean> getRunningActions(long checkAgeSecs) throws StoreException
checkAgeSecs - check age in seconds.StoreExceptionpublic List<WorkflowActionBean> getRetryAndManualActions(String wfId) throws StoreException
wfId - StringStoreExceptionpublic WorkflowsInfo getWorkflowsInfo(Map<String,List<String>> filter, int start, int len) throws StoreException
filter - Filter conditionstart - offset for select statementlen - number of Workflows to be returnedStoreExceptionpublic WorkflowJobBean getWorkflowInfo(String id) throws StoreException
id - Workflow IdStoreException - If Workflow doesn't existpublic WorkflowJobBean getWorkflowInfoWithActionsSubset(String id, int start, int len) throws StoreException
id - Workflow Idstart - offset for select statement for actionslen - number of Workflow Actions to be returnedStoreException - If Workflow doesn't existpublic String getWorkflowIdForExternalId(String externalId) throws StoreException
externalId - external IDStoreException - if there is no job with external IDpublic void purge(long olderThanDays, int limit) throws StoreException
olderThanDays - number of days for which to preserve the workflowsStoreExceptionCopyright © 2018 Apache Software Foundation. All rights reserved.