Package org.jbpm.graph.def

Examples of org.jbpm.graph.def.ProcessDefinition.addAction()


    instantiatableDelegate.setConfigType("bean");
    instantiatableDelegate.setConfiguration("<id>4</id><greeting>aloha</greeting>");
    Action action = new Action();
    action.setName("pina colada");
    action.setActionDelegation(instantiatableDelegate);
    processDefinition.addAction(action);
   
    // now create a reference to it from event node-enter on state 'a'
    State state = (State) processDefinition.addNode( new State() );
    Action refAction = new Action();
    refAction.setReferencedAction(action);
View Full Code Here


    ProcessDefinition processDefinition = new ProcessDefinition();
    Delegation actionDelegate = new Delegation("one");
    actionDelegate.setConfigType("bean");
    Action action = new Action(actionDelegate);
    action.setName("a");
    processDefinition.addAction(action);
    Element actionElement = toXmlAndParse( processDefinition, "/process-definition/action" );
    assertEquals("bean", actionElement.attributeValue("config-type"));
  }

  public void testReadActionXmlConfiguration() {
View Full Code Here

    ProcessDefinition processDefinition = new ProcessDefinition();
    Delegation actionDelegate = new Delegation("one");
    actionDelegate.setConfiguration("<id>63</id><greeting>aloha</greeting>");
    Action action = new Action(actionDelegate);
    action.setName("a");
    processDefinition.addAction(action);
    Element actionElement = toXmlAndParse( processDefinition, "/process-definition/action" );
    assertEquals("63", actionElement.elementTextTrim("id"));
    assertEquals("aloha", actionElement.elementTextTrim("greeting"));
  }
View Full Code Here

    Delegation actionDelegate = new Delegation("one");
    actionDelegate.setConfiguration("a piece of configuration text");
    actionDelegate.setConfigType("constructor");
    Action action = new Action(actionDelegate);
    action.setName("a");
    processDefinition.addAction(action);
    Element actionElement = toXmlAndParse( processDefinition, "/process-definition/action" );
    assertEquals("a piece of configuration text", actionElement.getTextTrim());
  }

  public void testReadActionAcceptPropagatedEventsDefault() {
View Full Code Here

  public void testWriteActionAcceptPropagatedEventsDefault() throws Exception {
    ProcessDefinition processDefinition = new ProcessDefinition();
    Delegation actionDelegate = new Delegation("one");
    Action action = new Action(actionDelegate);
    action.setName("a");
    processDefinition.addAction(action);
    Element actionElement = toXmlAndParse( processDefinition, "/process-definition/action" );
    assertNull(actionElement.attribute("accept-propagated-events"));
  }

  public void testWriteActionAcceptPropagatedEventsTrue() throws Exception {
View Full Code Here

    ProcessDefinition processDefinition = new ProcessDefinition();
    Delegation actionDelegate = new Delegation("one");
    Action action = new Action(actionDelegate);
    action.setName("a");
    action.setPropagationAllowed(true);
    processDefinition.addAction(action);
    Element actionElement = toXmlAndParse( processDefinition, "/process-definition/action" );
    assertNull(actionElement.attribute("accept-propagated-events"));
  }

  public void testWriteActionAcceptPropagatedEventsFalse() throws Exception {
View Full Code Here

    ProcessDefinition processDefinition = new ProcessDefinition();
    Delegation actionDelegate = new Delegation("one");
    Action action = new Action(actionDelegate);
    action.setName("a");
    action.setPropagationAllowed(false);
    processDefinition.addAction(action);
    Element actionElement = toXmlAndParse( processDefinition, "/process-definition/action" );
    assertEquals("false", actionElement.attributeValue("accept-propagated-events"));
  }

  public void testReadNodeActionName() {
View Full Code Here

        }
        final Delegation delegation = new Delegation(AsyncSignalAction.class.getName()) ;
        delegation.setConfigType("constructor") ;
        final Action newAction = new Action(delegation) ;
        newAction.setName(ESB_ASYNC_SIGNAL_ACTION_NAME) ;
        processDefinition.addAction(newAction) ;
       
        return newAction ;
    }
   
    /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.