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

x33g5p2x  于2022-01-17 转载在 其他  
字(10.4k)|赞(0)|评价(0)|浏览(124)

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

Activity.getId介绍

暂无

代码示例

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

protected void handleConstraints(Process process, Activity activity, List<ValidationError> errors) {
  if (activity.getId() != null && activity.getId().length() > ID_MAX_LENGTH) {
    addError(errors, Problems.FLOW_ELEMENT_ID_TOO_LONG, process, activity,
        "The id of a flow element must not contain more than " + ID_MAX_LENGTH + " characters");
  }
}

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

@Override
protected void writeAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception {
 BoundaryEvent boundaryEvent = (BoundaryEvent) element;
 if (boundaryEvent.getAttachedToRef() != null) {
  writeDefaultAttribute(ATTRIBUTE_BOUNDARY_ATTACHEDTOREF, boundaryEvent.getAttachedToRef().getId(), xtw);
 }
 if (boundaryEvent.getEventDefinitions().size() == 1) {
  EventDefinition eventDef = boundaryEvent.getEventDefinitions().get(0);
  if (eventDef instanceof ErrorEventDefinition == false) {
   writeDefaultAttribute(ATTRIBUTE_BOUNDARY_CANCELACTIVITY, String.valueOf(boundaryEvent.isCancelActivity()).toLowerCase(), xtw);
  }
 }
}

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

protected void convertElementToJson(ObjectNode propertiesNode, BaseElement baseElement) {
 BoundaryEvent boundaryEvent = (BoundaryEvent) baseElement;
 ArrayNode dockersArrayNode = objectMapper.createArrayNode();
 ObjectNode dockNode = objectMapper.createObjectNode();
 GraphicInfo graphicInfo = model.getGraphicInfo(boundaryEvent.getId());
 GraphicInfo parentGraphicInfo = model.getGraphicInfo(boundaryEvent.getAttachedToRef().getId());
 dockNode.put(EDITOR_BOUNDS_X, graphicInfo.getX() - parentGraphicInfo.getX());
 dockNode.put(EDITOR_BOUNDS_Y, graphicInfo.getY() - parentGraphicInfo.getY());
 dockersArrayNode.add(dockNode);
 flowElementNode.set("dockers", dockersArrayNode);
 propertiesNode.put(PROPERTY_CANCEL_ACTIVITY, boundaryEvent.isCancelActivity());
 addEventProperties(boundaryEvent, propertiesNode);
}

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

if (incoming) {
  sourceRef = dataAssociation.getSourceRef();
  targetRef = activity.getId();
} else {
  sourceRef = activity.getId();
  targetRef = dataAssociation.getTargetRef();

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

protected void handleBoundaryEvents() {
 for (BoundaryEvent boundaryEvent : boundaryEvents) {
  mxGeometry geometry = new mxGeometry(0.8, 1.0, eventSize, eventSize);
  geometry.setOffset(new mxPoint(-(eventSize / 2), -(eventSize / 2)));
  geometry.setRelative(true);
  mxCell boundaryPort = new mxCell(null, geometry, "shape=ellipse;perimter=ellipsePerimeter");
  boundaryPort.setId("boundary-event-" + boundaryEvent.getId());
  boundaryPort.setVertex(true);
  Object portParent = null;
  if (boundaryEvent.getAttachedToRefId() != null) {
   portParent = generatedVertices.get(boundaryEvent.getAttachedToRefId());
  } else if (boundaryEvent.getAttachedToRef() != null) {
   portParent = generatedVertices.get(boundaryEvent.getAttachedToRef().getId());
  } else {
   throw new RuntimeException("Could not generate DI: boundaryEvent '" + boundaryEvent.getId() + "' has no attachedToRef");
  }
  graph.addCell(boundaryPort, portParent);
  generatedVertices.put(boundaryEvent.getId(), boundaryPort);
 }
}

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

List<ExecutionEntity> miChildExecutions = executionEntityManager.findChildExecutionsByParentExecutionId(miExecution.getId());
for (ExecutionEntity miChildExecution : miChildExecutions) {
 if (subProcessExecution.getId().equals(miChildExecution.getId()) == false && activity.getId().equals(miChildExecution.getCurrentActivityId())) {
  executionEntityManager.deleteExecutionAndRelatedData(miChildExecution, deleteReason, false);

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

if (childExecutions != null) {
 for (ExecutionEntity childExecution : childExecutions) {
  if (activity.getId().equals(childExecution.getCurrentActivityId())) {
   callActivityExecutionIds.add(childExecution.getId());
    && callActivityExecutionIds.contains(childExecution.getSuperExecutionId())) {
   executionEntityManager.deleteProcessInstanceExecutionEntity(childExecution.getId(), activity.getId(),
     "call activity completion condition met", true, false);

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

scopeExecution, compensationActivity.getId());

代码示例来源:origin: stackoverflow.com

public class Activity {
  private long id;
  private String name;
  private boolean done;
  private boolean important;
  //Getters and setters

  @Override
  public boolean equals(Object o) {
   if (o instanceof Activity) {
    Activity other = (Activity) o;
    return this.getId() == other.getId();
   }
   return false;
  }
}

代码示例来源:origin: org.activiti/activiti-process-validation

protected void handleConstraints(Process process, Activity activity, List<ValidationError> errors) {
  if (activity.getId() != null && activity.getId().length() > ID_MAX_LENGTH) {
    addError(errors, Problems.FLOW_ELEMENT_ID_TOO_LONG, process, activity,
        "The id of a flow element must not contain more than " + ID_MAX_LENGTH + " characters");
  }
}

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

@Override
protected void writeAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception {
 BoundaryEvent boundaryEvent = (BoundaryEvent) element;
 if (boundaryEvent.getAttachedToRef() != null) {
  writeDefaultAttribute(ATTRIBUTE_BOUNDARY_ATTACHEDTOREF, boundaryEvent.getAttachedToRef().getId(), xtw);
 }
 if (boundaryEvent.getEventDefinitions().size() == 1) {
  EventDefinition eventDef = boundaryEvent.getEventDefinitions().get(0);
  if (eventDef instanceof ErrorEventDefinition == false) {
   writeDefaultAttribute(ATTRIBUTE_BOUNDARY_CANCELACTIVITY, String.valueOf(boundaryEvent.isCancelActivity()).toLowerCase(), xtw);
  }
 }
}

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

@Override
protected void writeAdditionalAttributes(BaseElement element, XMLStreamWriter xtw) throws Exception {
 BoundaryEvent boundaryEvent = (BoundaryEvent) element;
 if (boundaryEvent.getAttachedToRef() != null) {
  writeDefaultAttribute(ATTRIBUTE_BOUNDARY_ATTACHEDTOREF, boundaryEvent.getAttachedToRef().getId(), xtw);
 }
 
 if (boundaryEvent.getEventDefinitions().size() == 1) {
  EventDefinition eventDef = boundaryEvent.getEventDefinitions().get(0); 
  
  if (eventDef instanceof ErrorEventDefinition == false) {
   writeDefaultAttribute(ATTRIBUTE_BOUNDARY_CANCELACTIVITY, String.valueOf(boundaryEvent.isCancelActivity()).toLowerCase(), xtw);
  }
 }
}

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

protected void convertElementToJson(ObjectNode propertiesNode, BaseElement baseElement) {
 BoundaryEvent boundaryEvent = (BoundaryEvent) baseElement;
 ArrayNode dockersArrayNode = objectMapper.createArrayNode();
 ObjectNode dockNode = objectMapper.createObjectNode();
 GraphicInfo graphicInfo = model.getGraphicInfo(boundaryEvent.getId());
 GraphicInfo parentGraphicInfo = model.getGraphicInfo(boundaryEvent.getAttachedToRef().getId());
 dockNode.put(EDITOR_BOUNDS_X, graphicInfo.getX() - parentGraphicInfo.getX());
 dockNode.put(EDITOR_BOUNDS_Y, graphicInfo.getY() - parentGraphicInfo.getY());
 dockersArrayNode.add(dockNode);
 flowElementNode.set("dockers", dockersArrayNode);
 propertiesNode.put(PROPERTY_CANCEL_ACTIVITY, boundaryEvent.isCancelActivity());
 addEventProperties(boundaryEvent, propertiesNode);
}

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

if (incoming) {
 sourceRef = dataAssociation.getSourceRef();
 targetRef = activity.getId();
 sourceRef = activity.getId();
 targetRef = dataAssociation.getTargetRef();

代码示例来源:origin: stackoverflow.com

@Override
public void onLocationChanged(Location location) {
  longitude = location.getLongitude();
  latitude = location.getLatitude();
  Log.i("", "Latitude: " + latitude);
  Log.i("", "Longitude: " + longitude);
  if(activities != null) {
    for (Activity activity : activities) {
      Location newLocation = new Location(provider);
      newLocation.setLongitude(activity.getLongitude());
      newLocation.setLatitude(activity.getLatitude());

      if(location.distanceTo(newLocation) > 15 && activity.isInProximity()) {
        activity.setInProximity(false);
        stopTimer(activity.getId());
      }
      else if (location.distanceTo(newLocation) <= 15 && !activity.isInProximity()) {
        activity.setInProximity(true);
        startTimer(activity.getId());
      }
    }
  }
}

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

protected void handleBoundaryEvents() {
 for (BoundaryEvent boundaryEvent : boundaryEvents) {
  mxGeometry geometry = new mxGeometry(0.8, 1.0, eventSize, eventSize);
  geometry.setOffset(new mxPoint(-(eventSize/2), -(eventSize/2)));
  geometry.setRelative(true);
  mxCell boundaryPort = new mxCell(null, geometry, "shape=ellipse;perimter=ellipsePerimeter");
  boundaryPort.setId("boundary-event-" + boundaryEvent.getId());
  boundaryPort.setVertex(true);
  Object portParent = null;
  if (boundaryEvent.getAttachedToRefId() != null) {
   portParent = generatedVertices.get(boundaryEvent.getAttachedToRefId());
  } else if (boundaryEvent.getAttachedToRef() != null) {
   portParent = generatedVertices.get(boundaryEvent.getAttachedToRef().getId());
  } else {
   throw new RuntimeException("Could not generate DI: boundaryEvent '" + boundaryEvent.getId() + "' has no attachedToRef");
  }
  
  graph.addCell(boundaryPort, portParent);
  generatedVertices.put(boundaryEvent.getId(), boundaryPort);
 }
}

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

List<ExecutionEntity> miChildExecutions = executionEntityManager.findChildExecutionsByParentExecutionId(miExecution.getId());
for (ExecutionEntity miChildExecution : miChildExecutions) {
 if (subProcessExecution.getId().equals(miChildExecution.getId()) == false && activity.getId().equals(miChildExecution.getCurrentActivityId())) {
  executionEntityManager.deleteExecutionAndRelatedData(miChildExecution, deleteReason, false);

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

if (childExecutions != null) {
 for (ExecutionEntity childExecution : childExecutions) {
  if (activity.getId().equals(childExecution.getCurrentActivityId())) {
   callActivityExecutionIds.add(childExecution.getId());
    && callActivityExecutionIds.contains(childExecution.getSuperExecutionId())) {
   executionEntityManager.deleteProcessInstanceExecutionEntity(childExecution.getId(), activity.getId(),
     "call activity completion condition met", true, false);

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

MultiInstanceActivityBehavior miParallelActivityBehavior = null;
MultiInstanceActivityBehavior miSequentialActivityBehavior = null;
ActivityImpl activity = bpmnParse.getCurrentScope().findActivity(modelActivity.getId());
if (activity == null) {
 bpmnParse.getBpmnModel().addProblem("Activity " + modelActivity.getId() + " needed for multi instance cannot bv found", modelActivity);

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

scopeExecution, compensationActivity.getId());

相关文章