All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jadex.bdibpmn.examples.helloworld.SayHelloTask Maven / Gradle / Ivy

Go to download

The Jadex BDI-BPMN applications package contain several example applications, benchmarks and testcases using BDI agents that have BPMN plans.

There is a newer version: 2.4
Show newest version
package jadex.bdibpmn.examples.helloworld;

import jadex.bpmn.runtime.BpmnInterpreter;
import jadex.bpmn.runtime.ITaskContext;
import jadex.bpmn.runtime.task.AbstractTask;

/**
 *  Print hello on the console and increment parameter 'x'.
 */
public class SayHelloTask	extends AbstractTask
{
	public void doExecute(ITaskContext context, BpmnInterpreter instance)
	{
		System.out.println("Hello BPMN world!");
		int	x	= ((Number)context.getParameterValue("x")).intValue();
		x++;
		System.out.println("Setting x to: "+x);		
		context.setParameterValue("x", new Integer(x));
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy