org.activiti.bpmn.model.Process.getLanes()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(157)

本文整理了Java中org.activiti.bpmn.model.Process.getLanes()方法的一些代码示例,展示了Process.getLanes()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Process.getLanes()方法的具体详情如下:
包路径:org.activiti.bpmn.model.Process
类名称:Process
方法名:getLanes

Process.getLanes介绍

暂无

代码示例

代码示例来源:origin: Activiti/Activiti

public static void writeLanes(Process process, XMLStreamWriter xtw) throws Exception {
  if (!process.getLanes().isEmpty()) {
   xtw.writeStartElement(ELEMENT_LANESET);
   xtw.writeAttribute(ATTRIBUTE_ID, "laneSet_" + process.getId());
   for (Lane lane : process.getLanes()) {
    xtw.writeStartElement(ELEMENT_LANE);
    xtw.writeAttribute(ATTRIBUTE_ID, lane.getId());

    if (StringUtils.isNotEmpty(lane.getName())) {
     xtw.writeAttribute(ATTRIBUTE_NAME, lane.getName());
    }

    boolean didWriteExtensionStartElement = BpmnXMLUtil.writeExtensionElements(lane, false, xtw);
    if (didWriteExtensionStartElement) {
     xtw.writeEndElement();
    }

    for (String flowNodeRef : lane.getFlowReferences()) {
     xtw.writeStartElement(ELEMENT_FLOWNODE_REF);
     xtw.writeCharacters(flowNodeRef);
     xtw.writeEndElement();
    }

    xtw.writeEndElement();
   }
   xtw.writeEndElement();
  }
 }
}

代码示例来源:origin: Activiti/Activiti

public void parse(XMLStreamReader xtr, Process activeProcess, BpmnModel model) throws Exception {
  Lane lane = new Lane();
  BpmnXMLUtil.addXMLLocation(lane, xtr);
  lane.setId(xtr.getAttributeValue(null, ATTRIBUTE_ID));
  lane.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME));
  lane.setParentProcess(activeProcess);
  activeProcess.getLanes().add(lane);
  BpmnXMLUtil.parseChildElements(ELEMENT_LANE, lane, xtr, model);
 }
}

代码示例来源:origin: Activiti/Activiti

if (process.getFlowElements().isEmpty() && process.getLanes().isEmpty()) {

代码示例来源:origin: Activiti/Activiti

if (process.getFlowElements().isEmpty() && process.getLanes().isEmpty()) {

代码示例来源:origin: Activiti/Activiti

laneNode));
lane.setParentProcess(process);
process.getLanes().add(lane);

代码示例来源:origin: Activiti/Activiti

if (process != null) {
  Map<String, ArrayNode> laneMap = new HashMap<String, ArrayNode>();
  for (Lane lane : process.getLanes()) {
    GraphicInfo laneGraphicInfo = model.getGraphicInfo(lane.getId());
    if (laneGraphicInfo == null) {
    for (Lane lane : process.getLanes()) {
      if (lane.getFlowReferences().contains(lookForElement.getId())) {
        laneGraphicInfo = model.getGraphicInfo(lane.getId());

代码示例来源:origin: Activiti/Activiti

for (Lane lane : process.getLanes()) {
  GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(lane.getId());
  processDiagramCanvas.drawPoolOrLane(lane.getId(),

代码示例来源:origin: Activiti/Activiti

for (Lane l : process.getLanes()) {

代码示例来源:origin: com.bbossgroups.activiti/activiti-bpmn-converter

public static void writeLanes(Process process, XMLStreamWriter xtw) throws Exception {
  if(process.getLanes().size() > 0) {
   xtw.writeStartElement(ELEMENT_LANESET);
   xtw.writeAttribute(ATTRIBUTE_ID, "laneSet_" + process.getId());
   for (Lane lane : process.getLanes()) {
    xtw.writeStartElement(ELEMENT_LANE);
    xtw.writeAttribute(ATTRIBUTE_ID, lane.getId());
    if(StringUtils.isNotEmpty(lane.getName())) {
     xtw.writeAttribute(ATTRIBUTE_NAME, lane.getName());
    }
    
    for (String flowNodeRef : lane.getFlowReferences()) {
     xtw.writeStartElement(ATTRIBUTE_FLOWNODE_REF);
     xtw.writeCharacters(flowNodeRef);
     xtw.writeEndElement();
    }
    
    xtw.writeEndElement();
   }
   xtw.writeEndElement();
  }
 }
}

代码示例来源:origin: com.bbossgroups.activiti/activiti-bpmn-converter

public void parse(XMLStreamReader xtr, Process activeProcess) throws Exception {
  Lane lane = new Lane();
  BpmnXMLUtil.addXMLLocation(lane, xtr);
  lane.setId(xtr.getAttributeValue(null, ATTRIBUTE_ID));
  lane.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME));
  lane.setParentProcess(activeProcess);
  activeProcess.getLanes().add(lane);
  
  while (xtr.hasNext()) {
   xtr.next();
   if (xtr.isStartElement() && ATTRIBUTE_FLOWNODE_REF.equalsIgnoreCase(xtr.getLocalName())) {
    lane.getFlowReferences().add(xtr.getElementText());
   } else if(xtr.isEndElement() && ELEMENT_LANE.equalsIgnoreCase(xtr.getLocalName())) {
    break;
   }
  }
 }
}

代码示例来源:origin: org.activiti/activiti-bpmn-converter

public static void writeLanes(Process process, XMLStreamWriter xtw) throws Exception {
  if (!process.getLanes().isEmpty()) {
   xtw.writeStartElement(ELEMENT_LANESET);
   xtw.writeAttribute(ATTRIBUTE_ID, "laneSet_" + process.getId());
   for (Lane lane : process.getLanes()) {
    xtw.writeStartElement(ELEMENT_LANE);
    xtw.writeAttribute(ATTRIBUTE_ID, lane.getId());

    if (StringUtils.isNotEmpty(lane.getName())) {
     xtw.writeAttribute(ATTRIBUTE_NAME, lane.getName());
    }

    boolean didWriteExtensionStartElement = BpmnXMLUtil.writeExtensionElements(lane, false, xtw);
    if (didWriteExtensionStartElement) {
     xtw.writeEndElement();
    }

    for (String flowNodeRef : lane.getFlowReferences()) {
     xtw.writeStartElement(ELEMENT_FLOWNODE_REF);
     xtw.writeCharacters(flowNodeRef);
     xtw.writeEndElement();
    }

    xtw.writeEndElement();
   }
   xtw.writeEndElement();
  }
 }
}

代码示例来源:origin: org.activiti/activiti-bpmn-converter

public void parse(XMLStreamReader xtr, Process activeProcess, BpmnModel model) throws Exception {
  Lane lane = new Lane();
  BpmnXMLUtil.addXMLLocation(lane, xtr);
  lane.setId(xtr.getAttributeValue(null, ATTRIBUTE_ID));
  lane.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME));
  lane.setParentProcess(activeProcess);
  activeProcess.getLanes().add(lane);
  BpmnXMLUtil.parseChildElements(ELEMENT_LANE, lane, xtr, model);
 }
}

代码示例来源:origin: com.bbossgroups.activiti/activiti-bpmn-converter

if(process.getFlowElements().size() == 0 && process.getLanes().size() == 0) {

代码示例来源:origin: org.activiti/activiti-bpmn-converter

if (process.getFlowElements().isEmpty() && process.getLanes().isEmpty()) {

代码示例来源:origin: org.activiti/activiti-bpmn-converter

if (process.getFlowElements().isEmpty() && process.getLanes().isEmpty()) {

代码示例来源:origin: org.activiti/activiti-json-converter

lane.setName(JsonConverterUtil.getPropertyValueAsString(PROPERTY_NAME, laneNode));
lane.setParentProcess(process);
process.getLanes().add(lane);

代码示例来源:origin: org.activiti/activiti-json-converter

if (process != null) {
 Map<String, ArrayNode> laneMap = new HashMap<String, ArrayNode>();
 for (Lane lane : process.getLanes()) {
  GraphicInfo laneGraphicInfo = model.getGraphicInfo(lane.getId());
  if (laneGraphicInfo == null)
  for (Lane lane : process.getLanes()) {
   if (lane.getFlowReferences().contains(lookForElement.getId())) {
    laneGraphicInfo = model.getGraphicInfo(lane.getId());

代码示例来源:origin: com.bbossgroups.activiti/activiti-engine

protected static ProcessDiagramCanvas generateDiagram(BpmnModel bpmnModel, List<String> highLightedActivities, List<String> highLightedFlows) {
  ProcessDiagramCanvas processDiagramCanvas = initProcessDiagramCanvas(bpmnModel);
  
//    // Draw pool shape, if process is participant in collaboration
  for (Pool pool : bpmnModel.getPools()) {
   GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(pool.getId());
   processDiagramCanvas.drawPoolOrLane(pool.getName(), (int) graphicInfo.getX(), (int) graphicInfo.getY(), 
       (int) graphicInfo.getWidth(),  (int) graphicInfo.getHeight());
  }
  
  // Draw lanes
  for (Process process : bpmnModel.getProcesses()) {
   for (Lane lane : process.getLanes()) {
    GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(lane.getId());
    processDiagramCanvas.drawPoolOrLane(lane.getName(), (int) graphicInfo.getX(), (int) graphicInfo.getY(), 
        (int) graphicInfo.getWidth(),  (int) graphicInfo.getHeight());
   }
  }
  
  // Draw activities and their sequence-flows
  for (FlowNode flowNode : bpmnModel.getProcesses().get(0).findFlowElementsOfType(FlowNode.class)) {
   drawActivity(processDiagramCanvas, bpmnModel, flowNode, highLightedActivities, highLightedFlows);
  }
  return processDiagramCanvas;
 }

代码示例来源:origin: com.bbossgroups.activiti/activiti-engine

for (Lane l : process.getLanes()) {

相关文章