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

jadex.bdibpmn.examples.helloworld.SayGoodbyeTask 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.

The newest version!
package jadex.bdibpmn.examples.helloworld;

import jadex.bdibpmn.BpmnPlanBodyInstance;
import jadex.bpmn.model.task.ITaskContext;
import jadex.bpmn.runtime.task.AbstractTask;
import jadex.bridge.IInternalAccess;

/**
 *  Print goodbye on the console and print parameter 'y'.
 */
public class SayGoodbyeTask	extends AbstractTask
{
	public void doExecute(ITaskContext context, IInternalAccess instance)
	{
		System.out.println("Goodbye BPMN world!");
		int	y = ((Number)context.getParameterValue("y")).intValue();
		System.out.println("Parameter y: "+y);
		
		if(instance instanceof BpmnPlanBodyInstance)
			((BpmnPlanBodyInstance)instance).killAgent();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy