Package org.jbpm.graph.def

Examples of org.jbpm.graph.def.Action


      "<process-definition "+schemaNamespace+" name='pd'>" +
      "  <action name='burps' class='org.foo.Burps' accept-propagated-events='true' />" +
      "</process-definition>"
    );
 
    Action action = processDefinition.getAction("burps");
    assertTrue(action.acceptsPropagatedEvents());
  }
View Full Code Here


      "<process-definition "+schemaNamespace+" name='pd'>" +
      "  <action name='burps' class='org.foo.Burps' accept-propagated-events='false' />" +
      "</process-definition>"
    );
 
    Action action = processDefinition.getAction("burps");
    assertFalse(action.acceptsPropagatedEvents());
  }
View Full Code Here

      "      <action name='burps' class='org.foo.Burps'/>" +
      "    </event>" +
      "  </node>" +
      "</process-definition>"
    );
    Action burps = (Action)processDefinition.getNode("a").getEvent("node-enter").getActions().get(0);
    assertEquals("burps", burps.getName());
  }
View Full Code Here

      "      <action name='burps' class='org.foo.Burps'/>" +
      "    </event>" +
      "  </node>" +
      "</process-definition>"
    );
    Action burps = (Action)processDefinition.getNode("a").getEvent("node-enter").getActions().get(0);
    assertSame(burps, processDefinition.getAction("burps"));
    Element processDefinitionElement = toXmlAndParse( processDefinition, "/process-definition" );
    assertEquals(0, processDefinitionElement.elements("action").size());
  }
View Full Code Here

      "</process-definition>"
    );
   
    Node node = processDefinition.getNode("a");
    Event event = node.getEvent("node-enter");
    Action action = (Action) event.getActions().iterator().next();
    Delegation instantiatableDelegate = action.getActionDelegation();
    assertEquals("org.foo.Burps", instantiatableDelegate.getClassName());
    assertEquals("constructor", instantiatableDelegate.getConfigType());
    assertTrue(instantiatableDelegate.getConfiguration().indexOf("this text should be passed in the constructor")!=-1 );
  }
View Full Code Here

   
    Node node = processDefinition.getNode("a");
    assertEquals( 1, node.getLeavingTransitionsMap().size() );
    Transition transition = node.getDefaultLeavingTransition();
    Event event = transition.getEvent(Event.EVENTTYPE_TRANSITION);
    Action action = (Action) event.getActions().iterator().next();
    Delegation instantiatableDelegate = action.getActionDelegation();
    assertEquals("org.foo.Burps", instantiatableDelegate.getClassName());
  }
View Full Code Here

  }
   
    Node node = processDefinition.getNode("a");
    Transition transition = node.getDefaultLeavingTransition();
    Event event = transition.getEvent(Event.EVENTTYPE_TRANSITION);
    Action transitionAction = (Action) event.getActions().iterator().next();
   
    Action processAction = processDefinition.getAction("scratch");
    assertEquals("scratch", processAction.getName());
    assertSame(processAction, transitionAction.getReferencedAction());
   
    Delegation instantiatableDelegate = processAction.getActionDelegation();
    assertEquals("com.itch.Scratch", instantiatableDelegate.getClassName());
  }
View Full Code Here

  public void testWriteProcessDefinitionAction() throws Exception {
    ProcessDefinition processDefinition = new ProcessDefinition();
    Event event = new Event("node-enter");
    processDefinition.addEvent(event);
    event.addAction(new Action(new Delegation("one")));
    event.addAction(new Action(new Delegation("two")));
    event.addAction(new Action(new Delegation("three")));
   
    Element eventElement = toXmlAndParse( processDefinition, "/process-definition/event" );
   
    List actionElements = eventElement.elements("action");
View Full Code Here

  public void testWriteActionConfigType() throws Exception {
    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"));
  }
View Full Code Here

      "    <greeting>aloha</greeting>" +
      "  </action>" +
      "</process-definition>"
    );
 
    Action action = processDefinition.getAction("burps");
    Delegation instantiatableDelegate = action.getActionDelegation();
    assertTrue(instantiatableDelegate.getConfiguration().indexOf("<id>63</id>")!=-1);
    assertTrue(instantiatableDelegate.getConfiguration().indexOf("<greeting>aloha</greeting>")!=-1 );
  }
View Full Code Here

TOP

Related Classes of org.jbpm.graph.def.Action

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.