Class AbstractTask

java.lang.Object
jadex.bpmn.runtime.task.AbstractTask
All Implemented Interfaces:
ITask
Direct Known Subclasses:
ExecuteStepTask, InvokeMethodTask, LoggerTask, WriteContextTask, WriteParameterTask

public abstract class AbstractTask extends Object implements ITask
Simple task implementation with basic result and exception handling.
  • Constructor Details

    • AbstractTask

      public AbstractTask()
  • Method Details

    • execute

      public jadex.future.IFuture<Void> execute(ITaskContext context, jadex.core.IComponent instance)
      Execute the task.
      Specified by:
      execute in interface ITask
      Parameters:
      context - The accessible values.
      instance - The process instance executing the task.
      listener - To be notified, when the task has completed.
      Returns:
      To be notified, when the task has completed.
    • cancel

      public jadex.future.IFuture<Void> cancel(jadex.core.IComponent instance)
      Cleanup in case the task is cancelled.
      Specified by:
      cancel in interface ITask
      Returns:
      A future to indicate when cancellation has completed.
    • doExecute

      public abstract void doExecute(ITaskContext context, jadex.core.IComponent instance) throws 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:
      Exception - When task execution fails.