Package org.jbpm.graph.node

Examples of org.jbpm.graph.node.State


    assertEquals("com.foo.Fighting", element.attributeValue("class"));
  }

  public void testWriteConfigurableAction() throws Exception {
    ProcessDefinition processDefinition = new ProcessDefinition();
    State state = (State) processDefinition.addNode( new State("a") );
    Delegation instantiatableDelegate = new Delegation();
    instantiatableDelegate.setClassName("com.foo.Fighting");
    instantiatableDelegate.setConfigType("bean");
    instantiatableDelegate.setConfiguration("<id>4</id><greeting>aloha</greeting>");
    state.addEvent(new Event("node-enter")).addAction(new Action(instantiatableDelegate));
    Element element = AbstractXmlTestCase.toXmlAndParse( processDefinition, "/process-definition/state[1]/event[1]/action[1]" );

    assertNotNull(element);
    assertEquals("action", element.getName());
    assertEquals("bean", element.attributeValue("config-type"));
View Full Code Here


    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);
    state.addEvent(new Event(Event.EVENTTYPE_NODE_ENTER)).addAction(refAction);
   
    AbstractXmlTestCase.toXmlAndParse( processDefinition, "/process-definition/state[1]/event[1]/action[1]" );
  }
View Full Code Here

      "  <state name='s' />" +
      "</process-definition>");
   
    processDefinition = saveAndReload(processDefinition);
   
    State state = (State) processDefinition.getNode("s");
    assertNotNull(state);
  }
View Full Code Here

    newTransaction();

    processDefinitionOne = graphSession.loadProcessDefinition(processDefinitionOne.getId());
    processDefinitionTwo = graphSession.loadProcessDefinition(processDefinitionTwo.getId());

    State stateOne = (State) processDefinitionOne.getNode("1");
    State stateTwo = (State) processDefinitionTwo.getNode("1");
    assertTrue(stateOne.getEvent("node-enter") != stateTwo.getEvent("node-enter"));

    Map processEvents = processDefinitionTwo.getEvents();
    System.out.println(processDefinitionTwo.getEvents());
    assertEquals("Process Definition should not have any events. events = " + processEvents, 0, processEvents.size());
  }
View Full Code Here

  public void testStartStateEvents() {
    assertSupportedEvents(new StartState(), new String[] { "node-leave", "after-signal" });
  }

  public void testStateEvents() {
    assertSupportedEvents(new State(), new String[] { "node-enter", "node-leave", "before-signal", "after-signal" });
  }
View Full Code Here

TOP

Related Classes of org.jbpm.graph.node.State

Copyright © 2018 www.massapicom. 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.