@Test public void testConvertAdHocSubprocessNode_autostart() { final AdHocSubprocess definition = new AdHocSubprocess(); definition.getExecutionSet().setAdHocAutostart(new AdHocAutostart(true)); final View<BaseAdHocSubprocess> view = new ViewImpl<>(definition, Bounds.create()); final Node<View<BaseAdHocSubprocess>, ?> node = new NodeImpl<>(UUID.randomUUID().toString()); node.setContent(view); SubProcessPropertyWriter writer = tested.convertAdHocSubprocessNode(node); assertTrue(AdHocSubProcessPropertyWriter.class.isInstance(writer)); assertTrue(CustomElement.autoStart.of(writer.getFlowElement()).get()); }
protected SubProcessPropertyWriter convertAdHocSubprocessNode(Node<View<BaseAdHocSubprocess>, ?> n) { org.eclipse.bpmn2.AdHocSubProcess process = bpmn2.createAdHocSubProcess(); process.setId(n.getUUID()); AdHocSubProcessPropertyWriter p = propertyWriterFactory.of(process); BaseAdHocSubprocess definition = n.getContent().getDefinition(); BPMNGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); BaseProcessData processData = definition.getProcessData(); p.setProcessVariables(processData.getProcessVariables()); BaseAdHocSubprocessTaskExecutionSet executionSet = definition.getExecutionSet(); p.setAdHocActivationCondition(executionSet.getAdHocActivationCondition()); p.setAdHocCompletionCondition(executionSet.getAdHocCompletionCondition()); p.setAdHocOrdering(executionSet.getAdHocOrdering()); p.setOnEntryAction(executionSet.getOnEntryAction()); p.setOnExitAction(executionSet.getOnExitAction()); p.setAsync(executionSet.getIsAsync().getValue()); p.setSlaDueDate(executionSet.getSlaDueDate()); p.setSimulationSet(definition.getSimulationSet()); p.setAbsoluteBounds(n); p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue()); return p; }
SubProcessConverter extends ProcessConverterDelegate { protected SubProcessPropertyWriter convertAdHocSubprocessNode(Node<View<BaseAdHocSubprocess>, ?> n) { org.eclipse.bpmn2.AdHocSubProcess process = bpmn2.createAdHocSubProcess(); process.setId(n.getUUID()); AdHocSubProcessPropertyWriter p = propertyWriterFactory.of(process); BaseAdHocSubprocess definition = n.getContent().getDefinition(); BPMNGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); BaseProcessData processData = definition.getProcessData(); p.setProcessVariables(processData.getProcessVariables()); BaseAdHocSubprocessTaskExecutionSet executionSet = definition.getExecutionSet(); p.setAdHocActivationCondition(executionSet.getAdHocActivationCondition()); p.setAdHocCompletionCondition(executionSet.getAdHocCompletionCondition()); p.setAdHocOrdering(executionSet.getAdHocOrdering()); p.setOnEntryAction(executionSet.getOnEntryAction()); p.setOnExitAction(executionSet.getOnExitAction()); p.setAsync(executionSet.getIsAsync().getValue()); p.setSlaDueDate(executionSet.getSlaDueDate()); p.setSimulationSet(definition.getSimulationSet()); p.setAbsoluteBounds(n); p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue()); return p; } }
SubProcessConverter extends ProcessConverterDelegate { protected SubProcessPropertyWriter convertAdHocSubprocessNode(Node<View<BaseAdHocSubprocess>, ?> n) { org.eclipse.bpmn2.AdHocSubProcess process = bpmn2.createAdHocSubProcess(); process.setId(n.getUUID()); AdHocSubProcessPropertyWriter p = propertyWriterFactory.of(process); BaseAdHocSubprocess definition = n.getContent().getDefinition(); BPMNGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); BaseProcessData processData = definition.getProcessData(); p.setProcessVariables(processData.getProcessVariables()); BaseAdHocSubprocessTaskExecutionSet executionSet = definition.getExecutionSet(); p.setAdHocActivationCondition(executionSet.getAdHocActivationCondition()); p.setAdHocCompletionCondition(executionSet.getAdHocCompletionCondition()); p.setAdHocOrdering(executionSet.getAdHocOrdering()); p.setOnEntryAction(executionSet.getOnEntryAction()); p.setOnExitAction(executionSet.getOnExitAction()); p.setAsync(executionSet.getIsAsync().getValue()); p.setSlaDueDate(executionSet.getSlaDueDate()); p.setSimulationSet(definition.getSimulationSet()); p.setAbsoluteBounds(n); p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue()); return p; } SubProcessConverter(DefinitionsBuildingContext context,
                               PropertyWriterFactory propertyWriterFactory,
                               ConverterFactory converterFactory); }
SubProcessConverter extends ProcessConverterDelegate { protected SubProcessPropertyWriter convertAdHocSubprocessNode(Node<View<BaseAdHocSubprocess>, ?> n) { org.eclipse.bpmn2.AdHocSubProcess process = bpmn2.createAdHocSubProcess(); process.setId(n.getUUID()); AdHocSubProcessPropertyWriter p = propertyWriterFactory.of(process); BaseAdHocSubprocess definition = n.getContent().getDefinition(); BPMNGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); BaseProcessData processData = definition.getProcessData(); p.setProcessVariables(processData.getProcessVariables()); BaseAdHocSubprocessTaskExecutionSet executionSet = definition.getExecutionSet(); p.setAdHocActivationCondition(executionSet.getAdHocActivationCondition()); p.setAdHocCompletionCondition(executionSet.getAdHocCompletionCondition()); p.setAdHocOrdering(executionSet.getAdHocOrdering()); p.setOnEntryAction(executionSet.getOnEntryAction()); p.setOnExitAction(executionSet.getOnExitAction()); p.setAsync(executionSet.getIsAsync().getValue()); p.setSlaDueDate(executionSet.getSlaDueDate()); p.setSimulationSet(definition.getSimulationSet()); p.setAbsoluteBounds(n); p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue()); return p; } SubProcessConverter(DefinitionsBuildingContext context,
                               PropertyWriterFactory propertyWriterFactory,
                               ConverterFactory converterFactory); Result<SubProcessPropertyWriter> convertSubProcess(Node<View<? extends BPMNViewDefinition>, ?> node); }
SubProcessConverter extends ProcessConverterDelegate { protected SubProcessPropertyWriter convertAdHocSubprocessNode(Node<View<BaseAdHocSubprocess>, ?> n) { org.eclipse.bpmn2.AdHocSubProcess process = bpmn2.createAdHocSubProcess(); process.setId(n.getUUID()); AdHocSubProcessPropertyWriter p = propertyWriterFactory.of(process); BaseAdHocSubprocess definition = n.getContent().getDefinition(); BPMNGeneralSet general = definition.getGeneral(); p.setName(general.getName().getValue()); p.setDocumentation(general.getDocumentation().getValue()); BaseProcessData processData = definition.getProcessData(); p.setProcessVariables(processData.getProcessVariables()); BaseAdHocSubprocessTaskExecutionSet executionSet = definition.getExecutionSet(); p.setAdHocActivationCondition(executionSet.getAdHocActivationCondition()); p.setAdHocCompletionCondition(executionSet.getAdHocCompletionCondition()); p.setAdHocOrdering(executionSet.getAdHocOrdering()); p.setOnEntryAction(executionSet.getOnEntryAction()); p.setOnExitAction(executionSet.getOnExitAction()); p.setAsync(executionSet.getIsAsync().getValue()); p.setSlaDueDate(executionSet.getSlaDueDate()); p.setSimulationSet(definition.getSimulationSet()); p.setAbsoluteBounds(n); p.setAdHocAutostart(executionSet.getAdHocAutostart().getValue()); return p; } SubProcessConverter(DefinitionsBuildingContext context,
                               PropertyWriterFactory propertyWriterFactory,
                               ConverterFactory converterFactory); Result<SubProcessPropertyWriter> convertSubProcess(Node<View<? extends BPMNViewDefinition>, ?> node);  }