Package jadex.bpmn.runtime.task
Class AbstractTask
- java.lang.Object
-
- jadex.bpmn.runtime.task.AbstractTask
-
- All Implemented Interfaces:
ITask
- Direct Known Subclasses:
A
,B
,ExecuteStepTask
,InvokeMethodTask
,LoggerTask
,OKTask
,WriteContextTask
,WriteParameterTask
public abstract class AbstractTask extends java.lang.Object implements 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(ITaskContext context, IInternalAccess instance)
Execute the task.IFuture<java.lang.Void>
execute(ITaskContext context, IInternalAccess instance)
Execute the task.
-
-
-
Method Detail
-
execute
public IFuture<java.lang.Void> execute(ITaskContext context, IInternalAccess instance)
Execute the task.
-
cancel
public IFuture<java.lang.Void> cancel(IInternalAccess instance)
Cleanup in case the task is cancelled.
-
doExecute
public abstract void doExecute(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.
-
-