jadex.bpmn.testcases.pojobpmn.ResultTask Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jadex-applications-bpmn Show documentation
Show all versions of jadex-applications-bpmn Show documentation
The Jadex bpmn applications package contains several example applications, benchmarks and testcases using bpmn workflows.
package jadex.bpmn.testcases.pojobpmn;
import jadex.bpmn.model.task.annotation.Task;
import jadex.bpmn.model.task.annotation.TaskBody;
import jadex.bpmn.model.task.annotation.TaskParameter;
import jadex.bpmn.model.task.annotation.TaskResult;
/**
*
*/
@Task(description="Test if result works as return value of execute.",
parameters={@TaskParameter(name="text", clazz=String.class, direction=TaskParameter.DIRECTION_IN),
@TaskParameter(name="result", clazz=String.class, direction=TaskParameter.DIRECTION_OUT)})
public class ResultTask
{
/** Injected argument. */
@TaskResult
protected String result;
/**
* Execute the task.
*/
@TaskBody
public String execute(String text)
{
System.out.println("in: "+text+" old result: "+result);
return "result = "+text;
}
}