/** * Parses the 'definitions' root element */ protected void applyParseHandlers() { sequenceFlows = new HashMap<>(); for (Process process : bpmnModel.getProcesses()) { currentProcess = process; if (process.isExecutable()) { bpmnParserHandlers.parseElement(this, process); } } }
@Override protected void executeParse(BpmnParse bpmnParse, Process process) { if (!process.isExecutable()) { LOGGER.info("Ignoring non-executable process with id='{}'. Set the attribute isExecutable=\"true\" to deploy this process.", process.getId()); } else { bpmnParse.getProcessDefinitions().add(transformProcess(bpmnParse, process)); } }
@Override protected void executeParse(BpmnParse bpmnParse, Process process) { if (!process.isExecutable()) { LOGGER.info("Ignoring non-executable process with id='{}'. Set the attribute isExecutable=\"true\" to deploy this process.", process.getId()); } else { bpmnParse.getProcessDefinitions().add(transformProcess(bpmnParse, process)); } }
/** * Parses the 'definitions' root element */ protected void transformProcessDefinitions() { sequenceFlows = new HashMap<>(); for (Process process : bpmnModel.getProcesses()) { if (process.isExecutable()) { bpmnParserHandlers.parseElement(this, process); } } if (!processDefinitions.isEmpty()) { processDI(); } }
/** * 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;
setExecutable(otherElement.isExecutable()); setDocumentation(otherElement.getDocumentation()); if (otherElement.getIoSpecification() != null) {
if (!process.isExecutable()) { continue;
setExecutable(otherElement.isExecutable()); setDocumentation(otherElement.getDocumentation()); if (otherElement.getIoSpecification() != null) {
propertiesNode.put(PROPERTY_DOCUMENTATION, mainProcess.getDocumentation()); if (!mainProcess.isExecutable()) { propertiesNode.put(PROPERTY_IS_EXECUTABLE, "false");