Class PojoTaskWrapper

java.lang.Object
jadex.bpmn.runtime.task.PojoTaskWrapper
All Implemented Interfaces:
ITask

public class PojoTaskWrapper extends Object implements ITask
Task that acts as wrapper for pojo tasks. Allows for using pojo tasks in the same way as conventional ITasks.
  • Field Details

    • pojotask

      protected Object pojotask
      The pojo task.
    • cancelmethod

      protected Method cancelmethod
      The cancel method.
    • resinjections

      protected Map<String,jadex.common.FieldInfo> resinjections
      The resinjections.
  • Constructor Details

    • PojoTaskWrapper

      public PojoTaskWrapper()
      Bean constructor.
    • PojoTaskWrapper

      public PojoTaskWrapper(Object pojotask, jadex.core.IComponent ia, ProcessThread thread, List<jadex.common.FieldInfo> cominjections, Map<String,List<jadex.common.FieldInfo>> arginjections, Map<String,jadex.common.FieldInfo> resinjections)
      Create a new wrapper task.
  • Method Details

    • execute

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

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

      public Object[] guessParameters(Class<?>[] ptypes, Set<Object> vals)
      Method that tries to guess the parameters for the method call.
    • setResults

      protected void setResults(boolean noret, Object result, ITaskContext context, jadex.core.IComponent process)
      Set the results.
    • getPojoTask

      public Object getPojoTask()
      Get the pojotask.
      Returns:
      The pojotask.
    • setPojoTask

      public void setPojoTask(Object pojotask)
      Set the pojotask.
      Parameters:
      pojotask - The pojotask to set.
    • getCancelMethod

      public Method getCancelMethod()
      Get the cancelmethod.
      Returns:
      The cancelmethod.
    • setCancelMethod

      public void setCancelMethod(Method cancelmethod)
      Set the cancelmethod.
      Parameters:
      cancelmethod - The cancelmethod to set.
    • getResultInjections

      public Map<String,jadex.common.FieldInfo> getResultInjections()
      Get the resinjections.
      Returns:
      The resinjections.
    • setResultInjections

      public void setResultInjections(Map<String,jadex.common.FieldInfo> resinjections)
      Set the resinjections.
      Parameters:
      resinjections - The resinjections to set.