/** * Parses the 'definitions' root element */ protected void applyParseHandlers() { sequenceFlows = new HashMap<String, SequenceFlow>(); for (Process process : bpmnModel.getProcesses()) { currentProcess = process; if (process.isExecutable()) { bpmnParserHandlers.parseElement(this, process); } } }
protected void executeParse(BpmnParse bpmnParse, Process process) { if (process.isExecutable() == false) { LOGGER.info("Ignoring non-executable process with id='" + process.getId() + "'. Set the attribute isExecutable=\"true\" to deploy this process."); } else { bpmnParse.getProcessDefinitions().add(transformProcess(bpmnParse, process)); } }
/** * Returns 'true' if at least one process definition in the {@link BpmnModel} is executable. */ protected boolean validateAtLeastOneExecutable(BpmnModel bpmnModel, List<ValidationError> errors) { int nrOfExecutableDefinitions = 0; for (Process process : bpmnModel.getProcesses()) { if (process.isExecutable()) { nrOfExecutableDefinitions++; } } if (nrOfExecutableDefinitions == 0) { addError(errors, Problems.ALL_PROCESS_DEFINITIONS_NOT_EXECUTABLE, "All process definition are set to be non-executable (property 'isExecutable' on process). This is not allowed."); } return nrOfExecutableDefinitions > 0; }
xtw.writeAttribute(ATTRIBUTE_PROCESS_EXECUTABLE, Boolean.toString(process.isExecutable()));
for (Pool pool : model.getPools()) { if (process.getId().equals(pool.getProcessRef())) { pool.setExecutable(process.isExecutable());
@Override public void validate(BpmnModel bpmnModel, List<ValidationError> errors) { // If all process definitions of this bpmnModel are not executable, raise an error boolean isAtLeastOneExecutable = validateAtLeastOneExecutable(bpmnModel, errors); // If at least one process definition is executable, show a warning for each of the none-executables if (isAtLeastOneExecutable) { for (Process process : bpmnModel.getProcesses()) { if (!process.isExecutable()) { addWarning(errors, Problems.PROCESS_DEFINITION_NOT_EXECUTABLE, process, process, "Process definition is not executable. Please verify that this is intentional."); } handleProcessConstraints(bpmnModel, process, errors); } } handleBPMNModelConstraints(bpmnModel, errors); }
if (!process.isExecutable()) { continue;
mainProcess.getDocumentation()); if (!mainProcess.isExecutable()) { propertiesNode.put(PROPERTY_PROCESS_EXECUTABLE, "No");
/** * Parses the 'definitions' root element */ protected void applyParseHandlers() { sequenceFlows = new HashMap<String, SequenceFlow>(); for (Process process : bpmnModel.getProcesses()) { currentProcess = process; if (process.isExecutable()) { bpmnParserHandlers.parseElement(this, process); } } }
protected void executeParse(BpmnParse bpmnParse, Process process) { if (process.isExecutable() == false) { LOGGER.info("Ignoring non-executable process with id='" + process.getId() + "'. Set the attribute isExecutable=\"true\" to deploy this process."); } else { bpmnParse.getProcessDefinitions().add(transformProcess(bpmnParse, process)); } }
protected void executeParse(BpmnParse bpmnParse, Process process) { if (process.isExecutable() == false) { LOGGER.info("Ignoring non-executable process with id='" + process.getId() + "'. Set the attribute isExecutable=\"true\" to deploy this process."); } else { bpmnParse.getProcessDefinitions().add(transformProcess(bpmnParse, process)); } }
/** * Returns 'true' if at least one process definition in the {@link BpmnModel} is executable. */ protected boolean validateAtLeastOneExecutable(BpmnModel bpmnModel, List<ValidationError> errors) { int nrOfExecutableDefinitions = 0; for (Process process : bpmnModel.getProcesses()) { if (process.isExecutable()) { nrOfExecutableDefinitions++; } } if (nrOfExecutableDefinitions == 0) { addError(errors, Problems.ALL_PROCESS_DEFINITIONS_NOT_EXECUTABLE, "All process definition are set to be non-executable (property 'isExecutable' on process). This is not allowed."); } return nrOfExecutableDefinitions > 0; }
public Process parse(XMLStreamReader xtr, BpmnModel model) throws Exception { Process process = null; if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, ATTRIBUTE_ID))) { String processId = xtr.getAttributeValue(null, ATTRIBUTE_ID); process = new Process(); process.setId(processId); BpmnXMLUtil.addXMLLocation(process, xtr); process.setName(xtr.getAttributeValue(null, ATTRIBUTE_NAME)); if (StringUtils.isNotEmpty(xtr.getAttributeValue(null, ATTRIBUTE_PROCESS_EXECUTABLE))) { process.setExecutable(Boolean.parseBoolean(xtr.getAttributeValue(null, ATTRIBUTE_PROCESS_EXECUTABLE))); } String candidateUsersString = xtr.getAttributeValue(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_PROCESS_CANDIDATE_USERS); if (StringUtils.isNotEmpty(candidateUsersString)) { List<String> candidateUsers = BpmnXMLUtil.parseDelimitedList(candidateUsersString); process.setCandidateStarterUsers(candidateUsers); } String candidateGroupsString = xtr.getAttributeValue(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_PROCESS_CANDIDATE_GROUPS); if (StringUtils.isNotEmpty(candidateGroupsString)) { List<String> candidateGroups = BpmnXMLUtil.parseDelimitedList(candidateGroupsString); process.setCandidateStarterGroups(candidateGroups); } if (process.isExecutable()) { model.getProcesses().add(process); } } return process; } }
xtw.writeAttribute(ATTRIBUTE_PROCESS_EXECUTABLE, Boolean.toString(process.isExecutable()));
for (Pool pool : model.getPools()) { if (process.getId().equals(pool.getProcessRef())) { pool.setExecutable(process.isExecutable());
if (activeProcess.isExecutable()) { Class<? extends BaseBpmnXMLConverter> converterClass = convertersToBpmnMap.get(xtr.getLocalName()); BaseBpmnXMLConverter converter = converterClass.newInstance();
@Override public void validate(BpmnModel bpmnModel, List<ValidationError> errors) { // If all process definitions of this bpmnModel are not executable, raise an error boolean isAtLeastOneExecutable = validateAtLeastOneExecutable(bpmnModel, errors); // If at least one process definition is executable, show a warning for each of the none-executables if (isAtLeastOneExecutable) { for (Process process : bpmnModel.getProcesses()) { if (!process.isExecutable()) { addWarning(errors, Problems.PROCESS_DEFINITION_NOT_EXECUTABLE, process, process, "Process definition is not executable. Please verify that this is intentional."); } handleProcessConstraints(bpmnModel, process, errors); } } handleBPMNModelConstraints(bpmnModel, errors); }
if (!process.isExecutable()) { continue;
if (!process.isExecutable()) { continue;
propertiesNode.put(PROPERTY_DOCUMENTATION, mainProcess.getDocumentation()); if (mainProcess.isExecutable() == false) { propertiesNode.put(PROPERTY_PROCESS_EXECUTABLE, "No");