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

jadex.bdi.testcases.semiautomatic.DeletionPlan Maven / Gradle / Ivy

Go to download

The Jadex BDI applications package contain several example applications, benchmarks and testcases using BDI agents.

There is a newer version: 2.4
Show newest version
package jadex.bdi.testcases.semiautomatic;

import jadex.bdi.runtime.Plan;

/**
 *  Test if the agent can be properly deleted.
 */
public class DeletionPlan extends Plan
{
	//-------- constructors --------

	/**
	 *  Create a new countdown plan.
	 */
	public DeletionPlan()
	{
		getLogger().info("Created: "+this);
	}

	//-------- methods --------

	/**
	 *  The plan body.
	 */
	public void body()
	{
		getLogger().info("Oki executing body.");
		getLogger().info("Now trying to delete myself.");
		getLogger().info("When no more output test has failed.");

		startAtomic();
		killAgent();
		getLogger().info("Alive while plan is running (When no more outputs, test succeeded).");
		endAtomic();

		getLogger().info("Still alive (TEST FAILED).");
	}
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy