Package org.jbpm.pvm.internal.model

Examples of org.jbpm.pvm.internal.model.ProcessDefinitionImpl


    this.activityName = activityName;
  }

  public String execute(Environment environment) {
    RepositorySession repositorySession = environment.get(RepositorySession.class);
    ProcessDefinitionImpl processDefinition = repositorySession.findProcessDefinitionById(processDefinitionId);
   
    ActivityImpl activity = processDefinition.getActivity(activityName);
   
    ActivityBehaviour behaviour = activity.getActivityBehaviour();
    if (behaviour instanceof FormBehaviour) {
      return ((FormBehaviour)behaviour).getFormResourceName();
    }
View Full Code Here


  public List<String> execute(Environment environment) {
    List<String> activityNames = new ArrayList<String>();
   
    RepositorySession repositorySession = environment.get(RepositorySession.class);
    ProcessDefinitionImpl processDefinition = repositorySession.findProcessDefinitionById(processDefinitionId);
   
    for (ActivityImpl activity: (List<ActivityImpl>) processDefinition.getActivities()) {
      if (activity.getIncomingTransitions().isEmpty()) {
        activityNames.add(activity.getName());
      }
    }
    
View Full Code Here

    this.activityName = activityName;
  }

  public ActivityCoordinates execute(Environment environment) throws Exception {
    RepositorySession repositorySession = environment.get(RepositorySession.class);
    ProcessDefinitionImpl processDefinition = (ProcessDefinitionImpl) repositorySession.findProcessDefinitionById(processDefinitionId);
    if (processDefinition==null) {
      throw new JbpmException("process definition "+processDefinitionId+" doesn't exist");
    }
    ActivityImpl activity = processDefinition.findActivity(activityName);
    if (activity==null) {
      throw new JbpmException("activity '"+activityName+"' doesn't exist in process definition "+processDefinitionId);
    }
    return activity.getCoordinates();
  }
View Full Code Here

* @author Tom Baeyens
*/
public class LifeCycleParser extends Parser {

  public Object parseDocumentElement(Element element, Parse parse) {
    ProcessDefinitionImpl lifeCycleProcess = new LifeCycle();
    lifeCycleProcess.setName("TaskLifeCycle");
   
    List<Element> stateElements = XmlUtil.elements(element, "state");
    for (Element stateElement: stateElements) {
      parseState(stateElement, lifeCycleProcess, parse);
    }
    for (Element stateElement: stateElements) {
      parseTransitions(stateElement, lifeCycleProcess, parse);
    }
   
    String initialStateName = null;
    if (element.hasAttribute("initial")) {
      initialStateName = element.getAttribute("initial");
      ActivityImpl initial = (ActivityImpl) lifeCycleProcess.getActivity(initialStateName);
      if (initial!=null) {
        lifeCycleProcess.setInitial(initial);
      } else {
        parse.addProblem("initial "+initialStateName+" doesn't exist", element);
      }
    }
   
View Full Code Here

    taskDefinition.setName(taskName);

    String form = XmlUtil.attribute(element, "form");
    taskDefinition.setFormResourceName(form);
   
    ProcessDefinitionImpl processDefinition = parse.contextStackFind(ProcessDefinitionImpl.class);
    if (processDefinition.getTaskDefinition(taskName)!=null) {
      parse.addProblem("duplicate task name "+taskName, element);
    } else {
      processDefinition.addTaskDefinitionImpl(taskDefinition);
    }

    String swimlaneName = XmlUtil.attribute(element, "swimlane");
    if (swimlaneName!=null) {
      JpdlProcessDefinition jpdlProcessDefinition = parse.contextStackFind(JpdlProcessDefinition.class);
View Full Code Here

TOP

Related Classes of org.jbpm.pvm.internal.model.ProcessDefinitionImpl

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.