Package io.nflow.engine.internal.dao
Class WorkflowInstanceDao
java.lang.Object
io.nflow.engine.internal.dao.WorkflowInstanceDao
Use setter injection because constructor injection may not work when nFlow is used in some legacy systems.
-
Constructor Summary
ConstructorsConstructorDescriptionWorkflowInstanceDao
(SQLVariants sqlVariants, JdbcTemplate nflowJdbcTemplate, TransactionTemplate transactionTemplate, NamedParameterJdbcTemplate nflowNamedParameterJdbcTemplate, ExecutorDao executorDao, WorkflowInstanceExecutor workflowInstanceExecutor, WorkflowInstanceFactory workflowInstanceFactory, Environment env) -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkStateVariableValueLength
(String name, String value) void
clearExecutorId
(List<Long> workflowInstances) getSignal
(long workflowInstanceId) getWorkflowInstance
(long id, Set<WorkflowInstanceInclude> includes, Long maxActions, boolean queryArchive) getWorkflowInstanceState
(long workflowInstanceId) getWorkflowInstanceType
(long workflowInstanceId) long
insertWorkflowInstance
(WorkflowInstance instance) long
long
insertWorkflowInstanceAction
(WorkflowInstance instance, WorkflowInstanceAction action) pollNextWorkflowInstanceIds
(int batchSize) void
boolean
setSignal
(long workflowInstanceId, Optional<Integer> signal, String reason, WorkflowInstanceAction.WorkflowActionType actionType) boolean
int
updateWorkflowInstance
(WorkflowInstance instance) void
updateWorkflowInstanceAfterExecution
(WorkflowInstance instance, WorkflowInstanceAction action, List<WorkflowInstance> childWorkflows, List<WorkflowInstance> workflows, boolean createAction) boolean
wakeUpWorkflowExternally
(long workflowInstanceId, List<String> expectedStates) boolean
wakeupWorkflowInstanceIfNotExecuting
(long workflowInstanceId, List<String> expectedStates)
-
Constructor Details
-
WorkflowInstanceDao
@Inject public WorkflowInstanceDao(SQLVariants sqlVariants, JdbcTemplate nflowJdbcTemplate, TransactionTemplate transactionTemplate, NamedParameterJdbcTemplate nflowNamedParameterJdbcTemplate, ExecutorDao executorDao, WorkflowInstanceExecutor workflowInstanceExecutor, WorkflowInstanceFactory workflowInstanceFactory, Environment env)
-
-
Method Details
-
insertWorkflowInstance
-
updateWorkflowInstanceAfterExecution
public void updateWorkflowInstanceAfterExecution(WorkflowInstance instance, WorkflowInstanceAction action, List<WorkflowInstance> childWorkflows, List<WorkflowInstance> workflows, boolean createAction) -
updateWorkflowInstance
-
recoverWorkflowInstancesFromDeadNodes
public void recoverWorkflowInstancesFromDeadNodes() -
checkStateVariableValueLength
-
updateNotRunningWorkflowInstance
-
wakeUpWorkflowExternally
-
wakeupWorkflowInstanceIfNotExecuting
-
getWorkflowInstance
public WorkflowInstance getWorkflowInstance(long id, Set<WorkflowInstanceInclude> includes, Long maxActions, boolean queryArchive) -
pollNextWorkflowInstanceIds
-
clearExecutorId
-
queryWorkflowInstances
-
queryWorkflowInstancesAsStream
-
insertWorkflowInstanceAction
@Transactional(propagation=MANDATORY) public long insertWorkflowInstanceAction(WorkflowInstance instance, WorkflowInstanceAction action) -
insertWorkflowInstanceAction
-
getWorkflowInstanceState
-
getSignal
-
setSignal
@Transactional public boolean setSignal(long workflowInstanceId, Optional<Integer> signal, String reason, WorkflowInstanceAction.WorkflowActionType actionType) -
getWorkflowInstanceType
-