Java Code Examples for org.camunda.bpm.model.bpmn.instance.SubProcess#setTriggeredByEvent()

The following examples show how to use org.camunda.bpm.model.bpmn.instance.SubProcess#setTriggeredByEvent() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ProcessBuilder.java    From camunda-bpmn-model with Apache License 2.0 6 votes vote down vote up
public EventSubProcessBuilder eventSubProcess(String id) {
  // Create a subprocess, triggered by an event, and add it to modelInstance
  SubProcess subProcess = createChild(SubProcess.class, id);
  subProcess.setTriggeredByEvent(true);

  // Create Bpmn shape so subprocess will be drawn
  BpmnShape targetBpmnShape = createBpmnShape(subProcess);
  //find the lowest shape in the process
  // place event sub process underneath
  setEventSubProcessCoordinates(targetBpmnShape);

  resizeSubProcess(targetBpmnShape);

  // Return the eventSubProcessBuilder
  EventSubProcessBuilder eventSubProcessBuilder = new EventSubProcessBuilder(modelInstance, subProcess);
  return eventSubProcessBuilder;

}
 
Example 2
Source File: EmbeddedSubProcessBuilder.java    From camunda-bpmn-model with Apache License 2.0 6 votes vote down vote up
public EventSubProcessBuilder eventSubProcess(String id) {
  // Create a subprocess, triggered by an event, and add it to modelInstance
  SubProcess subProcess = subProcessBuilder.createChild(SubProcess.class, id);
  subProcess.setTriggeredByEvent(true);

  // Create Bpmn shape so subprocess will be drawn
  BpmnShape targetBpmnShape = subProcessBuilder.createBpmnShape(subProcess);
  //find the lowest shape in the process
  // place event sub process underneath
  setCoordinates(targetBpmnShape);

  subProcessBuilder.resizeSubProcess(targetBpmnShape);

  // Return the eventSubProcessBuilder
  EventSubProcessBuilder eventSubProcessBuilder = new EventSubProcessBuilder(subProcessBuilder.modelInstance, subProcess);
  return eventSubProcessBuilder;

}
 
Example 3
Source File: ProcessBuilder.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
public EventSubProcessBuilder eventSubProcess(String id) {
  // Create a subprocess, triggered by an event, and add it to modelInstance
  SubProcess subProcess = createChild(SubProcess.class, id);
  subProcess.setTriggeredByEvent(true);

  // Create Bpmn shape so subprocess will be drawn
  BpmnShape targetBpmnShape = createBpmnShape(subProcess);
  //find the lowest shape in the process
  // place event sub process underneath
  setEventSubProcessCoordinates(targetBpmnShape);

  resizeSubProcess(targetBpmnShape);

  // Return the eventSubProcessBuilder
  EventSubProcessBuilder eventSubProcessBuilder = new EventSubProcessBuilder(modelInstance, subProcess);
  return eventSubProcessBuilder;

}
 
Example 4
Source File: EmbeddedSubProcessBuilder.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
public EventSubProcessBuilder eventSubProcess(String id) {
  // Create a subprocess, triggered by an event, and add it to modelInstance
  SubProcess subProcess = subProcessBuilder.createChild(SubProcess.class, id);
  subProcess.setTriggeredByEvent(true);

  // Create Bpmn shape so subprocess will be drawn
  BpmnShape targetBpmnShape = subProcessBuilder.createBpmnShape(subProcess);
  //find the lowest shape in the process
  // place event sub process underneath
  setCoordinates(targetBpmnShape);

  subProcessBuilder.resizeSubProcess(targetBpmnShape);

  // Return the eventSubProcessBuilder
  EventSubProcessBuilder eventSubProcessBuilder = new EventSubProcessBuilder(subProcessBuilder.modelInstance, subProcess);
  return eventSubProcessBuilder;

}