use of org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.AdHocSubProcessPropertyReader in project kie-wb-common by kiegroup.
the class BaseSubProcessConverter method convertAdHocSubProcess.
private BpmnNode convertAdHocSubProcess(org.eclipse.bpmn2.AdHocSubProcess subProcess) {
Node<View<A>, Edge> node = createNode(subProcess.getId());
A definition = node.getContent().getDefinition();
AdHocSubProcessPropertyReader p = delegate.propertyReaderFactory.of(subProcess);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setProcessData(createProcessData(p.getProcessVariables()));
definition.setExecutionSet(createAdHocSubprocessTaskExecutionSet(p));
definition.setSimulationSet(p.getSimulationSet());
definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getRectangleDimensionsSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
return BpmnNode.of(node, p);
}
use of org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.AdHocSubProcessPropertyReader in project kie-wb-common by kiegroup.
the class SubProcessConverter method convertAdHocSubProcess.
private BpmnNode convertAdHocSubProcess(org.eclipse.bpmn2.AdHocSubProcess subProcess) {
Node<View<AdHocSubprocess>, Edge> node = factoryManager.newNode(subProcess.getId(), AdHocSubprocess.class);
AdHocSubprocess definition = node.getContent().getDefinition();
AdHocSubProcessPropertyReader p = propertyReaderFactory.of(subProcess);
definition.setGeneral(new BPMNGeneralSet(new Name(subProcess.getName()), new Documentation(p.getDocumentation())));
definition.setProcessData(new ProcessData(new ProcessVariables(p.getProcessVariables())));
definition.setExecutionSet(new AdHocSubprocessTaskExecutionSet(new AdHocCompletionCondition(p.getAdHocCompletionCondition()), new AdHocOrdering(p.getAdHocOrdering()), new OnEntryAction(p.getOnEntryAction()), new OnExitAction(p.getOnExitAction())));
definition.setSimulationSet(p.getSimulationSet());
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getRectangleDimensionsSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
return BpmnNode.of(node);
}
use of org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.AdHocSubProcessPropertyReader in project kie-wb-common by kiegroup.
the class SubProcessConverterTest method testCreateAdHocSubprocessTaskExecutionSet.
@Test
public void testCreateAdHocSubprocessTaskExecutionSet() {
AdHocSubProcess adHocSubProcess = mock(AdHocSubProcess.class);
when(adHocSubProcess.getCompletionCondition()).thenReturn(mock(FormalExpression.class));
when(adHocSubProcess.getOrdering()).thenReturn(AdHocOrdering.SEQUENTIAL);
assertTrue(AdHocSubprocessTaskExecutionSet.class.isInstance(tested.createAdHocSubprocessTaskExecutionSet(new AdHocSubProcessPropertyReader(adHocSubProcess, definitionResolver.getDiagram(), definitionResolver))));
}
Aggregations