protected static List<Artifact> gatherAllArtifacts(BpmnModel bpmnModel) { List<Artifact> artifacts = new ArrayList<Artifact>(); for (Process process : bpmnModel.getProcesses()) { artifacts.addAll(process.getArtifacts()); } return artifacts; }
newMainProcess.setId(subElement.getId()); newMainProcess.getFlowElements().addAll(subFlowElements); newMainProcess.getArtifacts().addAll(((SubProcess)subElement).getArtifacts()); subModel.addProcess(newMainProcess);
for (Artifact artifact : process.getArtifacts()) { createXML(artifact, model, xtw);
@Override public void validate(BpmnModel bpmnModel, List<ValidationError> errors) { // Global associations Collection<Artifact> artifacts = bpmnModel.getGlobalArtifacts(); if (artifacts != null) { for (Artifact artifact : artifacts) { if (artifact instanceof Association) { validate(null, (Association) artifact, errors); } } } // Process associations for (Process process : bpmnModel.getProcesses()) { artifacts = process.getArtifacts(); for (Artifact artifact : artifacts) { if (artifact instanceof Association) { validate(process, (Association) artifact, errors); } } } }
for (Artifact artifact : process.getArtifacts()) { createXML(artifact, model, xtw);
protected ProcessDefinitionEntity transformProcess(BpmnParse bpmnParse, Process process) { ProcessDefinitionEntity currentProcessDefinition = Context.getCommandContext().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; }
for (Artifact artifact : process.getArtifacts()) { drawArtifact(processDiagramCanvas, bpmnModel,
for (Artifact artifact : process.getArtifacts()) { createXML(artifact, model, xtw);
newMainProcess.setId(subElement.getId()); newMainProcess.getFlowElements().addAll(subFlowElements); newMainProcess.getArtifacts().addAll(((SubProcess)subElement).getArtifacts()); subModel.addProcess(newMainProcess);
for (Artifact artifact : process.getArtifacts()) { createXML(artifact, model, xtw);
for (Artifact artifact : process.getArtifacts()) { createXML(artifact, model, xtw);
@Override public void validate(BpmnModel bpmnModel, List<ValidationError> errors) { // Global associations Collection<Artifact> artifacts = bpmnModel.getGlobalArtifacts(); if (artifacts != null) { for (Artifact artifact : artifacts) { if (artifact instanceof Association) { validate(null, (Association) artifact, errors); } } } // Process associations for (Process process : bpmnModel.getProcesses()) { artifacts = process.getArtifacts(); for (Artifact artifact : artifacts) { if (artifact instanceof Association) { validate(process, (Association) artifact, errors); } } } }
protected ProcessDefinitionEntity transformProcess(BpmnParse bpmnParse, Process process) { ProcessDefinitionEntity currentProcessDefinition = Context.getCommandContext().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; }
processArtifacts(bpmnParse, process.getArtifacts(), currentProcessDefinition);