Package jadex.bpmn.runtime.task
Class PojoTaskWrapper
- java.lang.Object
- 
- jadex.bpmn.runtime.task.PojoTaskWrapper
 
- 
- All Implemented Interfaces:
- jadex.bpmn.model.task.ITask
 
 public class PojoTaskWrapper extends java.lang.Object implements jadex.bpmn.model.task.ITaskTask that acts as wrapper for pojo tasks. Allows for using pojo tasks in the same way as conventional ITasks.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.reflect.MethodcancelmethodThe cancel method.protected java.lang.ObjectpojotaskThe pojo task.protected java.util.Map<java.lang.String,FieldInfo>resinjectionsThe resinjections.
 - 
Constructor SummaryConstructors Constructor Description PojoTaskWrapper()Bean constructor.PojoTaskWrapper(java.lang.Object pojotask, IInternalAccess ia, ProcessThread thread, java.util.List<FieldInfo> cominjections, java.util.Map<java.lang.String,java.util.List<FieldInfo>> arginjections, java.util.Map<java.lang.String,FieldInfo> resinjections)Create a new wrapper task.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description IFuture<java.lang.Void>cancel(IInternalAccess process)Cleanup in case the task is cancelled.IFuture<java.lang.Void>execute(jadex.bpmn.model.task.ITaskContext context, IInternalAccess process)Execute the task.java.lang.reflect.MethodgetCancelMethod()Get the cancelmethod.java.lang.ObjectgetPojoTask()Get the pojotask.java.util.Map<java.lang.String,FieldInfo>getResultInjections()Get the resinjections.java.lang.Object[]guessParameters(java.lang.Class<?>[] ptypes, java.util.Set<java.lang.Object> vals)Method that tries to guess the parameters for the method call.voidsetCancelMethod(java.lang.reflect.Method cancelmethod)Set the cancelmethod.voidsetPojoTask(java.lang.Object pojotask)Set the pojotask.voidsetResultInjections(java.util.Map<java.lang.String,FieldInfo> resinjections)Set the resinjections.protected voidsetResults(boolean noret, java.lang.Object result, jadex.bpmn.model.task.ITaskContext context, IInternalAccess process)Set the results.
 
- 
- 
- 
Field Detail- 
pojotaskprotected java.lang.Object pojotask The pojo task.
 - 
cancelmethodprotected java.lang.reflect.Method cancelmethod The cancel method.
 - 
resinjectionsprotected java.util.Map<java.lang.String,FieldInfo> resinjections The resinjections.
 
- 
 - 
Constructor Detail- 
PojoTaskWrapperpublic PojoTaskWrapper() Bean constructor.
 - 
PojoTaskWrapperpublic PojoTaskWrapper(java.lang.Object pojotask, IInternalAccess ia, ProcessThread thread, java.util.List<FieldInfo> cominjections, java.util.Map<java.lang.String,java.util.List<FieldInfo>> arginjections, java.util.Map<java.lang.String,FieldInfo> resinjections)Create a new wrapper task.
 
- 
 - 
Method Detail- 
executepublic IFuture<java.lang.Void> execute(jadex.bpmn.model.task.ITaskContext context, IInternalAccess process) Execute the task.- Specified by:
- executein interface- jadex.bpmn.model.task.ITask
- Parameters:
- context- The accessible values.
- process- The process instance executing the task.
- Returns:
- To be notified, when the task has completed.
 
 - 
cancelpublic IFuture<java.lang.Void> cancel(IInternalAccess process) Cleanup in case the task is cancelled.- Specified by:
- cancelin interface- jadex.bpmn.model.task.ITask
- Returns:
- A future to indicate when cancellation has completed.
 
 - 
guessParameterspublic java.lang.Object[] guessParameters(java.lang.Class<?>[] ptypes, java.util.Set<java.lang.Object> vals)Method that tries to guess the parameters for the method call.
 - 
setResultsprotected void setResults(boolean noret, java.lang.Object result, jadex.bpmn.model.task.ITaskContext context, IInternalAccess process)Set the results.
 - 
getPojoTaskpublic java.lang.Object getPojoTask() Get the pojotask.- Returns:
- The pojotask.
 
 - 
setPojoTaskpublic void setPojoTask(java.lang.Object pojotask) Set the pojotask.- Parameters:
- pojotask- The pojotask to set.
 
 - 
getCancelMethodpublic java.lang.reflect.Method getCancelMethod() Get the cancelmethod.- Returns:
- The cancelmethod.
 
 - 
setCancelMethodpublic void setCancelMethod(java.lang.reflect.Method cancelmethod) Set the cancelmethod.- Parameters:
- cancelmethod- The cancelmethod to set.
 
 - 
getResultInjectionspublic java.util.Map<java.lang.String,FieldInfo> getResultInjections() Get the resinjections.- Returns:
- The resinjections.
 
 - 
setResultInjectionspublic void setResultInjections(java.util.Map<java.lang.String,FieldInfo> resinjections) Set the resinjections.- Parameters:
- resinjections- The resinjections to set.
 
 
- 
 
-