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

jadex.gpmn.runtime.plan.GoalHierarchyExecutionPlan Maven / Gradle / Ivy

Go to download

The Jadex GPMN (goal oriented process modeling notation) kernel provides a goal-oriented workflow kernel. The idea is that a workflow is specified as declarative goal hierarchy, which describes what has to be achieved to fulfill the workflow. At runtime goals are pursued by executing plans represented by standard BPMN workflows. The execution of goal-based workflows is achieved by conversion to BDI agents.

There is a newer version: 2.4
Show newest version
package jadex.gpmn.runtime.plan;

import jadex.bdi.runtime.IGoal;
import jadex.bdi.runtime.Plan;
import jadex.commons.SUtil;

/**
 *  Create subgoals according to the goal hierarchy specified in plan parameters.
 *	The 'subgoals' parameter set denotes the names of goals to create.
 *  The 'mode' parameter specifies the execution mode ('sequential' or 'parallel').   
 */
public class GoalHierarchyExecutionPlan extends Plan
{
	/**
	 *  Plan body.
	 */
	public void body()
	{
		String[]	subgoals	= (String[]) getParameterSet("subgoals").getValues();
		String	mode	= (String) getParameter("mode").getValue();
		
		System.out.println("Goal decomposition: "+mode+SUtil.arrayToString(subgoals));

		if("parallel".equals(mode))
		{
			IGoal[]	goals	= new IGoal[subgoals.length];
			for(int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy