Class WorkflowTaskRunner
java.lang.Object
de.xima.fc.workflow.processor.engine.WorkflowTaskRunner
- All Implemented Interfaces:
IWorkflowTaskRunner
Default implementation of a task runner. See
IWorkflowTaskRunner
for more details.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrunTasksForEvent
(IWorkflowRunTasksForEventParams runTasksParams) Executes the given workflow tasks triggered by an event, and returns the result.
-
Constructor Details
-
WorkflowTaskRunner
- Parameters:
params
- Data required for the workflow execution, such as the client, user, and locale.
-
-
Method Details
-
runTasksForEvent
public ITaskQueueExecutionResult runTasksForEvent(IWorkflowRunTasksForEventParams runTasksParams) throws CouldNotLockFormRecordException Description copied from interface:IWorkflowTaskRunner
Executes the given workflow tasks triggered by an event, and returns the result. Each task is run to completion, irrespective of whether other tasks have completed successfully or erroneously.If any node throws an unhandled exception, it will be converted to a
WorkflowProcessingException
. This method guarantees that each results in either aITaskExecutionSuccessResult
, or aITaskExecutionErrorResult
.This method creates a new entity context to access the database. Make sure to reread the relevant entities after a call to this method.
- Specified by:
runTasksForEvent
in interfaceIWorkflowTaskRunner
- Parameters:
runTasksParams
- The task to run, and optionally an entity context to use.- Returns:
- The result obtained after the task was executed normally.
- Throws:
CouldNotLockFormRecordException
- When no lock could be acquired on theVorgang
to process. Only one task of a form record can be run at a time.
-