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

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

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

Activity.getId介绍

暂无

代码示例

代码示例来源:origin: org.flowable/flowable-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.flowable/flowable-engine

protected Optional<String> getFlowElementMultiInstanceParentId(FlowElement flowElement) {
  FlowElementsContainer parentContainer = flowElement.getParentContainer();
  while (parentContainer instanceof Activity) {
    if (isFlowElementMultiInstance((Activity) parentContainer)) {
      return Optional.of(((Activity) parentContainer).getId());
    }
    parentContainer = ((Activity) parentContainer).getParentContainer();
  }
  return Optional.empty();
}

代码示例来源:origin: org.flowable/flowable-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)) {
      writeDefaultAttribute(ATTRIBUTE_BOUNDARY_CANCELACTIVITY, String.valueOf(boundaryEvent.isCancelActivity()).toLowerCase(), xtw);
    }
  }
}

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

protected void verifyCallActivity(ExecutionEntity executionToUse, Activity activity) {
  if (activity instanceof CallActivity) {
    ExecutionEntityManager executionEntityManager = CommandContextUtil.getExecutionEntityManager();
    if (executionToUse != null) {
      List<String> callActivityExecutionIds = new ArrayList<>();
      // Find all execution entities that are at the call activity
      List<ExecutionEntity> childExecutions = executionEntityManager.collectChildren(executionToUse);
      if (childExecutions != null) {
        for (ExecutionEntity childExecution : childExecutions) {
          if (activity.getId().equals(childExecution.getCurrentActivityId())) {
            callActivityExecutionIds.add(childExecution.getId());
          }
        }
        // Now all call activity executions have been collected, loop again and check which should be removed
        for (int i = childExecutions.size() - 1; i >= 0; i--) {
          ExecutionEntity childExecution = childExecutions.get(i);
          if (StringUtils.isNotEmpty(childExecution.getSuperExecutionId())
              && callActivityExecutionIds.contains(childExecution.getSuperExecutionId())) {
            executionEntityManager.deleteProcessInstanceExecutionEntity(childExecution.getId(), activity.getId(),
                "call activity completion condition met", true, false, true);
          }
        }
      }
    }
  }
}

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

@Override
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.flowable/flowable-json-converter

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

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

public boolean completionConditionSatisfied(DelegateExecution execution) {
  if (completionCondition != null) {
    
    ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration();
    ExpressionManager expressionManager = processEngineConfiguration.getExpressionManager();
    
    String activeCompletionCondition = null;
    if (CommandContextUtil.getProcessEngineConfiguration().isEnableProcessDefinitionInfoCache()) {
      ObjectNode taskElementProperties = BpmnOverrideContext.getBpmnOverrideElementProperties(activity.getId(), execution.getProcessDefinitionId());
      activeCompletionCondition = getActiveValue(completionCondition, DynamicBpmnConstants.MULTI_INSTANCE_COMPLETION_CONDITION, taskElementProperties);
    } else {
      activeCompletionCondition = completionCondition;
    }
    
    Object value = expressionManager.createExpression(activeCompletionCondition).getValue(execution);
    
    if (!(value instanceof Boolean)) {
      throw new FlowableIllegalArgumentException("completionCondition '" + activeCompletionCondition + "' does not evaluate to a boolean value");
    }
    Boolean booleanValue = (Boolean) value;
    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("Completion condition of multi-instance satisfied: {}", booleanValue);
    }
    return booleanValue;
  }
  return false;
}

代码示例来源:origin: org.flowable/flowable-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;perimeter=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.flowable/flowable5-engine

ActivityImpl activity = bpmnParse.getCurrentScope().findActivity(modelActivity.getId());
if (activity == null) {
  throw new ActivitiException("Activity " + modelActivity.getId() + " needed for multi instance cannot bv found");

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

Activity activity = (Activity) flowElement;
if (activity.isForCompensation()) {
  List<Association> associations = process.findAssociationsWithTargetRefRecursive(activity.getId());
  for (Association association : associations) {
    FlowElement sourceElement = process.getFlowElement(association.getSourceRef(), true);

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

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

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

scopeExecution, sourceActivity.getId());

相关文章