All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jbpm.sim.jpdl.SimState Maven / Gradle / Ivy

There is a newer version: 3.2.19.ayg
Show newest version
package org.jbpm.sim.jpdl;

import org.dom4j.Element;
import org.jbpm.graph.def.Event;
import org.jbpm.graph.node.State;
import org.jbpm.jpdl.xml.JpdlXmlReader;
import org.jbpm.sim.action.StartWorkOnStateAndPlanCompletion;

public class SimState extends State {

  private static final long serialVersionUID = 1L;

  public void read(Element nodeElement, JpdlXmlReader jpdlXmlReader) {
    super.read(nodeElement, jpdlXmlReader);  
    
    // add event which listens to node enter and schedules state completion
    Event nodeEnterEvent = new Event(Event.EVENTTYPE_NODE_ENTER);    
    nodeEnterEvent.addAction(new StartWorkOnStateAndPlanCompletion());
    addEvent(nodeEnterEvent);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy