Package jadex.bpmn.runtime.task
Class AbstractTask
- java.lang.Object
-
- jadex.bpmn.runtime.task.AbstractTask
-
- All Implemented Interfaces:
jadex.bpmn.model.task.ITask
- Direct Known Subclasses:
ExecuteStepTask
,InvokeMethodTask
,LoggerTask
,WriteContextTask
,WriteParameterTask
public abstract class AbstractTask extends java.lang.Object implements jadex.bpmn.model.task.ITask
Simple task implementation with basic result and exception handling.
-
-
Constructor Summary
Constructors Constructor Description AbstractTask()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IFuture<java.lang.Void>
cancel(IInternalAccess instance)
Cleanup in case the task is cancelled.abstract void
doExecute(jadex.bpmn.model.task.ITaskContext context, IInternalAccess instance)
Execute the task.IFuture<java.lang.Void>
execute(jadex.bpmn.model.task.ITaskContext context, IInternalAccess instance)
Execute the task.
-
-
-
Method Detail
-
execute
public IFuture<java.lang.Void> execute(jadex.bpmn.model.task.ITaskContext context, IInternalAccess instance)
Execute the task.- Specified by:
execute
in interfacejadex.bpmn.model.task.ITask
- Parameters:
context
- The accessible values.instance
- The process instance executing the task.listener
- To be notified, when the task has completed.
-
cancel
public IFuture<java.lang.Void> cancel(IInternalAccess instance)
Cleanup in case the task is cancelled.- Specified by:
cancel
in interfacejadex.bpmn.model.task.ITask
- Returns:
- A future to indicate when cancellation has completed.
-
doExecute
public abstract void doExecute(jadex.bpmn.model.task.ITaskContext context, IInternalAccess instance) throws java.lang.Exception
Execute the task. Implement this method for synchroneous tasks, which are finished, when the method returns.- Parameters:
context
- The accessible values.instance
- The process instance executing the task.- Throws:
java.lang.Exception
- When task execution fails.
-
-