Package org.jbpm.graph.def

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


      processDefinition = ProcessDefinition.parseXmlString(xmlString);
     
      if (engine.isTrace()) {
        log().setTrace(true);
        Event enterEvent = new Event(Event.EVENTTYPE_NODE_ENTER);
        enterEvent.addAction(new Action() {
            public void execute(ExecutionContext executionContext) throws Exception {
              log().t("enter",executionContext.getNode().getName());
            }
        });
        processDefinition.addEvent(enterEvent);
View Full Code Here


              log().t("enter",executionContext.getNode().getName());
            }
        });
        processDefinition.addEvent(enterEvent);
        Event leaveEvent = new Event(Event.EVENTTYPE_NODE_LEAVE);
        leaveEvent.addAction(new Action() {
            public void execute(ExecutionContext executionContext) throws Exception {
              log().t("leave",executionContext.getNode().getName());
            }
        });
        processDefinition.addEvent(leaveEvent);
View Full Code Here

      }
      Delegation delegation = createMailDelegation(notificationEvent, null, null, null, null);
      Action action = new Action(delegation);
      action.setProcessDefinition(processDefinition);
      action.setName(task.getName());
      event.addAction(action);
    }

    // task controller
    Element taskControllerElement = taskElement.element("controller");
    if (taskControllerElement != null)
View Full Code Here

    if (event == null)
    {
      event = new Event(eventType);
      graphElement.addEvent(event);
    }
    event.addAction(action);
  }

  public Action readSingleAction(Element nodeElement)
  {
    Action action = null;
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" );
   
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

    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

    Event event = graphElement.getEvent(eventType);
    if (event==null) {
      event = new Event(eventType);
      graphElement.addEvent(event);
    }
    event.addAction(action);
  }
 
  public Action readSingleAction(Element nodeElement) {
    Action action = null;
    // search for the first action element in the node
View Full Code Here

        task.addEvent(event);
      }
      Delegation delegation = createMailDelegation(notificationEvent, null, null, null, null);
      Action action = new Action(delegation);
      action.setProcessDefinition(processDefinition);
      event.addAction(action);
    }

    // task controller
    Element taskControllerElement = taskElement.element("controller");
    if (taskControllerElement!=null) {
View Full Code Here

    Event event = graphElement.getEvent(eventType);
    if (event==null) {
      event = new Event(eventType);
      graphElement.addEvent(event);
    }
    event.addAction(action);
  }
 
  public Action readSingleAction(Element nodeElement) {
    Action action = null;
    // search for the first action element in the node
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.