use of org.eclipse.bpmn2.di.BPMNDiagram in project kie-wb-common by kiegroup.
the class CallActivityPropertyReaderTest method setUp.
@Before
public void setUp() {
Definitions definitions = bpmn2.createDefinitions();
definitions.getRootElements().add(bpmn2.createProcess());
BPMNDiagram bpmnDiagram = di.createBPMNDiagram();
bpmnDiagram.setPlane(di.createBPMNPlane());
definitions.getDiagrams().add(bpmnDiagram);
definitionResolver = new DefinitionResolver(definitions, Collections.emptyList());
}
use of org.eclipse.bpmn2.di.BPMNDiagram in project kie-wb-common by kiegroup.
the class ProcessPropertyReaderTest method setUp.
@Before
public void setUp() {
definitions = bpmn2.createDefinitions();
process = bpmn2.createProcess();
definitions.getRootElements().add(process);
BPMNDiagram bpmnDiagram = di.createBPMNDiagram();
bpmnDiagram.setPlane(di.createBPMNPlane());
definitions.getDiagrams().add(bpmnDiagram);
definitionResolver = new DefinitionResolver(definitions, Collections.emptyList());
tested = new ProcessPropertyReader(process, definitionResolver.getDiagram(), definitionResolver.getShape(process.getId()), definitionResolver.getResolutionFactor());
}
use of org.eclipse.bpmn2.di.BPMNDiagram in project kie-wb-common by kiegroup.
the class PropertyReaderFactoryTest method setUp.
@Before
public void setUp() {
definitions = bpmn2.createDefinitions();
process = bpmn2.createProcess();
definitions.getRootElements().add(process);
BPMNDiagram bpmnDiagram = di.createBPMNDiagram();
bpmnDiagram.setPlane(di.createBPMNPlane());
definitions.getDiagrams().add(bpmnDiagram);
definitionResolver = new DefinitionResolver(definitions, Collections.emptyList());
tested = new PropertyReaderFactory(definitionResolver);
}
use of org.eclipse.bpmn2.di.BPMNDiagram in project kie-wb-common by kiegroup.
the class RootProcessConverter method convertProcessNode.
private ProcessPropertyWriter convertProcessNode(Node<Definition<BPMNDiagram>, ?> node) {
Process process = bpmn2.createProcess();
BPMNDiagram definition = node.getContent().getDefinition();
ProcessPropertyWriter p = propertyWriterFactory.of(process);
BaseDiagramSet diagramSet = definition.getDiagramSet();
p.setName(replaceIllegalCharsAttribute(diagramSet.getName().getValue()));
p.setDocumentation(diagramSet.getDocumentation().getValue());
p.setId(replaceIllegalCharsAttribute(diagramSet.getId().getValue()));
p.setPackage(diagramSet.getPackageProperty().getValue());
p.setType(diagramSet.getProcessType().getValue());
p.setVersion(diagramSet.getVersion().getValue());
p.setAdHoc(diagramSet.getAdHoc().getValue());
p.setDescription(diagramSet.getProcessInstanceDescription().getValue());
p.setDefaultImports(diagramSet.getImports().getValue().getDefaultImports());
p.setExecutable(diagramSet.getExecutable().getValue());
p.setSlaDueDate(diagramSet.getSlaDueDate());
BaseProcessData processData = definition.getProcessData();
p.setProcessVariables(processData.getProcessVariables());
BaseRootProcessAdvancedData advancedData = definition.getAdvancedData();
p.setGlobalVariables(advancedData.getGlobalVariables());
p.setMetaData(advancedData.getMetaDataAttributes());
// Case Management
final CaseIdPrefix caseIdPrefix = definition.getCaseManagementSet().getCaseIdPrefix();
p.setCaseIdPrefix(caseIdPrefix);
final CaseRoles caseRoles = definition.getCaseManagementSet().getCaseRoles();
p.setCaseRoles(caseRoles);
final CaseFileVariables caseFileVariables = definition.getCaseManagementSet().getCaseFileVariables();
p.setCaseFileVariables(caseFileVariables);
return p;
}
use of org.eclipse.bpmn2.di.BPMNDiagram in project kie-wb-common by kiegroup.
the class DefinitionsConverter method toDefinitions.
public Definitions toDefinitions() {
Definitions definitions = bpmn2.createDefinitions();
DefinitionsPropertyWriter p = propertyWriterFactory.of(definitions);
ProcessPropertyWriter pp = processConverter.convertProcess();
Node<Definition<BPMNDiagram>, ?> node = converterFactory.context.firstNode();
BPMNDiagram definition = node.getContent().getDefinition();
BaseDiagramSet diagramSet = definition.getDiagramSet();
p.setExporter("jBPM Process Modeler");
p.setExporterVersion("2.0");
p.setProcess(pp.getProcess());
p.setDiagram(pp.getBpmnDiagram());
p.setRelationship(pp.getRelationship());
p.setWSDLImports(diagramSet.getImports().getValue().getWSDLImports());
p.addAllRootElements(pp.getItemDefinitions());
p.addAllRootElements(pp.getRootElements());
p.addAllRootElements(pp.getInterfaces());
return definitions;
}
Aggregations