protected void handleProcessConstraints(BpmnModel bpmnModel, Process process, List<ValidationError> errors) { if (process.getId() != null && process.getId().length() > Constraints.PROCESS_DEFINITION_ID_MAX_LENGTH) { addError(errors, Problems.PROCESS_DEFINITION_ID_TOO_LONG, process, "The id of the process definition must not contain more than " + Constraints.PROCESS_DEFINITION_ID_MAX_LENGTH + " characters"); } if (process.getName() != null && process.getName().length() > Constraints.PROCESS_DEFINITION_NAME_MAX_LENGTH) { addError(errors, Problems.PROCESS_DEFINITION_NAME_TOO_LONG, process, "The name of the process definition must not contain more than " + Constraints.PROCESS_DEFINITION_NAME_MAX_LENGTH + " characters"); } if (process.getDocumentation() != null && process.getDocumentation().length() > Constraints.PROCESS_DEFINITION_DOCUMENTATION_MAX_LENGTH) { addError(errors, Problems.PROCESS_DEFINITION_DOCUMENTATION_TOO_LONG, process, "The documentation of the process definition must not contain more than " + Constraints.PROCESS_DEFINITION_DOCUMENTATION_MAX_LENGTH + " characters"); } }
if (StringUtils.isNotEmpty(process.getDocumentation())) { xtw.writeCharacters(process.getDocumentation()); xtw.writeEndElement();
setDocumentation(otherElement.getDocumentation()); if (otherElement.getIoSpecification() != null) { setIoSpecification(otherElement.getIoSpecification().clone());
setDocumentation(otherElement.getDocumentation()); if (otherElement.getIoSpecification() != null) { setIoSpecification(otherElement.getIoSpecification().clone());
propertiesNode.put(PROPERTY_NAME, mainProcess.getName()); if (StringUtils.isNotEmpty(mainProcess.getDocumentation())) { propertiesNode.put(PROPERTY_DOCUMENTATION, mainProcess.getDocumentation());
protected ProcessDefinitionEntity transformProcess(BpmnParse bpmnParse, Process process) { ProcessDefinitionEntity currentProcessDefinition = CommandContextUtil.getProcessDefinitionEntityManager().create(); bpmnParse.setCurrentProcessDefinition(currentProcessDefinition); /* * Mapping object model - bpmn xml: processDefinition.id -> generated by activiti engine processDefinition.key -> bpmn id (required) processDefinition.name -> bpmn name (optional) */ currentProcessDefinition.setKey(process.getId()); currentProcessDefinition.setName(process.getName()); currentProcessDefinition.setCategory(bpmnParse.getBpmnModel().getTargetNamespace()); currentProcessDefinition.setDescription(process.getDocumentation()); currentProcessDefinition.setDeploymentId(bpmnParse.getDeployment().getId()); if (bpmnParse.getDeployment().getEngineVersion() != null) { currentProcessDefinition.setEngineVersion(bpmnParse.getDeployment().getEngineVersion()); } createEventListeners(bpmnParse, process.getEventListeners()); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Parsing process {}", currentProcessDefinition.getKey()); } bpmnParse.processFlowElements(process.getFlowElements()); processArtifacts(bpmnParse, process.getArtifacts()); return currentProcessDefinition; }
currentProcessDefinition.setName(process.getName()); currentProcessDefinition.setCategory(bpmnParse.getBpmnModel().getTargetNamespace()); currentProcessDefinition.setDescription(process.getDocumentation()); currentProcessDefinition.setProperty(PROPERTYNAME_DOCUMENTATION, process.getDocumentation()); // Kept for backwards compatibility. See ACT-1020 currentProcessDefinition.setTaskDefinitions(new HashMap<>()); currentProcessDefinition.setDeploymentId(bpmnParse.getDeployment().getId());