Class WorkflowTaskRunner
- java.lang.Object
-
- de.xima.fc.workflow.processor.engine.WorkflowTaskRunner
-
- All Implemented Interfaces:
IWorkflowTaskRunner
public class WorkflowTaskRunner extends Object implements IWorkflowTaskRunner
Default implementation of a task runner. SeeIWorkflowTaskRunner
for more details.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description WorkflowTaskRunner(IWorkflowTaskRunnerParams params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ITaskQueueExecutionResult
runTasksForEvent(IWorkflowRunTasksForEventParams runTasksParams)
Executes the given workflow tasks triggered by an event, and returns the result.
-
-
-
Constructor Detail
-
WorkflowTaskRunner
public WorkflowTaskRunner(IWorkflowTaskRunnerParams params)
- Parameters:
params
- Data required for the workflow execution, such as the client, user, and locale.
-
-
Method Detail
-
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.
-
-