/** * The body method is called on the * instantiated plan instance from the scheduler. */ public void body() { CMSCreateComponent ca = new CMSCreateComponent(); ca.setType((String)getParameter("type").getValue()); ca.setName((String)getParameter("name").getValue()); ca.setConfiguration((String)getParameter("configuration").getValue()); ca.setArguments((Map)getParameter("arguments").getValue()); ca.setSuspend(((Boolean)getParameter("suspend").getValue()).booleanValue()); ca.setMaster(((Boolean)getParameter("master").getValue()).booleanValue()); ca.setParent((IComponentIdentifier)getParameter("parent").getValue()); ca.setResourceIdentifier((IResourceIdentifier)getParameter("rid").getValue()); IGoal req = createGoal("rp_initiate"); req.getParameter("receiver").setValue(getParameter("cms").getValue()); req.getParameter("action").setValue(ca); req.getParameter("ontology").setValue(SFipa.COMPONENT_MANAGEMENT_ONTOLOGY_NAME); dispatchSubgoalAndWait(req); getParameter("componentidentifier").setValue(((CMSCreateComponent)((Done)req.getParameter("result").getValue()).getAction()).getComponentIdentifier()); } }