Search in sources :

Example 6 with ProcessVariables

use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables in project kie-wb-common by kiegroup.

the class VariableProviderTest method mockRootNode.

private Element mockRootNode(String processVariables, String caseFileVariables) {
    BPMNDiagramImpl rootNode = new BPMNDiagramImpl();
    rootNode.setProcessData(new ProcessData(new ProcessVariables(processVariables)));
    rootNode.setCaseManagementSet((new CaseManagementSet(new CaseIdPrefix(""), new CaseRoles(""), new CaseFileVariables(caseFileVariables))));
    return mockNode(rootNode);
}
Also used : ProcessVariables(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables) CaseFileVariables(org.kie.workbench.common.stunner.bpmn.definition.property.cm.CaseFileVariables) CaseRoles(org.kie.workbench.common.stunner.bpmn.definition.property.cm.CaseRoles) BPMNDiagramImpl(org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl) ProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData) CaseManagementSet(org.kie.workbench.common.stunner.bpmn.definition.property.cm.CaseManagementSet) CaseIdPrefix(org.kie.workbench.common.stunner.bpmn.definition.property.cm.CaseIdPrefix)

Example 7 with ProcessVariables

use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables in project kie-wb-common by kiegroup.

the class BaseSubProcessConverter method convertEmbeddedSubprocessNode.

private BpmnNode convertEmbeddedSubprocessNode(SubProcess subProcess) {
    Node<View<EmbeddedSubprocess>, Edge> node = delegate.factoryManager.newNode(subProcess.getId(), EmbeddedSubprocess.class);
    EmbeddedSubprocess definition = node.getContent().getDefinition();
    SubProcessPropertyReader p = delegate.propertyReaderFactory.of(subProcess);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setExecutionSet(new EmbeddedSubprocessExecutionSet(new OnEntryAction(p.getOnEntryAction()), new OnExitAction(p.getOnExitAction()), new IsAsync(p.isAsync()), new SLADueDate(p.getSlaDueDate())));
    definition.setProcessData(new ProcessData(new ProcessVariables(p.getProcessVariables())));
    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);
}
Also used : EmbeddedSubprocessExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.subProcess.execution.EmbeddedSubprocessExecutionSet) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) OnExitAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction) OnEntryAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction) View(org.kie.workbench.common.stunner.core.graph.content.view.View) BaseProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.BaseProcessData) ProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) SubProcessPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.SubProcessPropertyReader) MultipleInstanceSubProcessPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.MultipleInstanceSubProcessPropertyReader) AdHocSubProcessPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.AdHocSubProcessPropertyReader) ProcessVariables(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) EmbeddedSubprocess(org.kie.workbench.common.stunner.bpmn.definition.EmbeddedSubprocess) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) Edge(org.kie.workbench.common.stunner.core.graph.Edge)

Example 8 with ProcessVariables

use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables in project kie-wb-common by kiegroup.

the class BaseSubProcessConverter method convertEventSubprocessNode.

private BpmnNode convertEventSubprocessNode(SubProcess subProcess) {
    Node<View<EventSubprocess>, Edge> node = delegate.factoryManager.newNode(subProcess.getId(), EventSubprocess.class);
    EventSubprocess definition = node.getContent().getDefinition();
    SubProcessPropertyReader p = delegate.propertyReaderFactory.of(subProcess);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setExecutionSet(new EventSubprocessExecutionSet(new IsAsync(p.isAsync()), new SLADueDate(p.getSlaDueDate())));
    definition.setProcessData(new ProcessData(new ProcessVariables(p.getProcessVariables())));
    definition.setSimulationSet(p.getSimulationSet());
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    definition.setDimensionsSet(p.getRectangleDimensionsSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    node.getContent().setBounds(p.getBounds());
    return BpmnNode.of(node, p);
}
Also used : Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) BaseProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.BaseProcessData) ProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) SubProcessPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.SubProcessPropertyReader) MultipleInstanceSubProcessPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.MultipleInstanceSubProcessPropertyReader) AdHocSubProcessPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.AdHocSubProcessPropertyReader) ProcessVariables(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) EventSubprocess(org.kie.workbench.common.stunner.bpmn.definition.EventSubprocess) EventSubprocessExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.subProcess.execution.EventSubprocessExecutionSet) IsAsync(org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync) Edge(org.kie.workbench.common.stunner.core.graph.Edge)

Example 9 with ProcessVariables

use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables in project kie-wb-common by kiegroup.

the class RootProcessConverter method convertProcessNode.

private BpmnNode convertProcessNode(String id, Process process) {
    Node<View<BPMNDiagramImpl>, Edge> diagramNode = factoryManager.newNode(id, BPMNDiagramImpl.class);
    BPMNDiagramImpl definition = diagramNode.getContent().getDefinition();
    ProcessPropertyReader e = propertyReaderFactory.of(process);
    definition.setDiagramSet(new DiagramSet(new Name(process.getName()), new Documentation(e.getDocumentation()), new Id(process.getId()), new Package(e.getPackage()), new Version(e.getVersion()), new AdHoc(e.isAdHoc()), new ProcessInstanceDescription(e.getDescription()), new Executable(process.isIsExecutable())));
    definition.setProcessData(new ProcessData(new ProcessVariables(e.getProcessVariables())));
    diagramNode.getContent().setBounds(e.getBounds());
    definition.setFontSet(e.getFontSet());
    definition.setBackgroundSet(e.getBackgroundSet());
    return BpmnNode.of(diagramNode);
}
Also used : Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) ProcessInstanceDescription(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.ProcessInstanceDescription) View(org.kie.workbench.common.stunner.core.graph.content.view.View) ProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) ProcessVariables(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables) Version(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Version) DiagramSet(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.DiagramSet) BPMNDiagramImpl(org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl) Id(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Id) Package(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Package) AdHoc(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.AdHoc) Executable(org.kie.workbench.common.stunner.bpmn.definition.property.diagram.Executable) Edge(org.kie.workbench.common.stunner.core.graph.Edge) ProcessPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ProcessPropertyReader)

Example 10 with ProcessVariables

use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables 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);
}
Also used : Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) AdHocSubprocessTaskExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocSubprocessTaskExecutionSet) AdHocSubprocess(org.kie.workbench.common.stunner.bpmn.definition.AdHocSubprocess) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) OnExitAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction) OnEntryAction(org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction) View(org.kie.workbench.common.stunner.core.graph.content.view.View) ProcessData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData) AdHocCompletionCondition(org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocCompletionCondition) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) ProcessVariables(org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables) AdHocOrdering(org.kie.workbench.common.stunner.bpmn.definition.property.task.AdHocOrdering) AdHocSubProcessPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.AdHocSubProcessPropertyReader) Edge(org.kie.workbench.common.stunner.core.graph.Edge)

Aggregations

ProcessVariables (org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessVariables)20 ProcessData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.ProcessData)15 View (org.kie.workbench.common.stunner.core.graph.content.view.View)10 BPMNDiagramImpl (org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagramImpl)9 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)8 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)8 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)7 Edge (org.kie.workbench.common.stunner.core.graph.Edge)7 Test (org.junit.Test)6 AdHocSubProcessPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.AdHocSubProcessPropertyReader)5 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)5 IsAsync (org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync)5 OnEntryAction (org.kie.workbench.common.stunner.bpmn.definition.property.task.OnEntryAction)5 OnExitAction (org.kie.workbench.common.stunner.bpmn.definition.property.task.OnExitAction)5 AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)4 ProcessPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ProcessPropertyReader)3 SubProcessPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.SubProcessPropertyReader)3 BPMNDiagram (org.kie.workbench.common.stunner.bpmn.definition.BPMNDiagram)3 IsMultipleInstance (org.kie.workbench.common.stunner.bpmn.definition.property.task.IsMultipleInstance)3 MultipleInstanceCollectionInput (org.kie.workbench.common.stunner.bpmn.definition.property.task.MultipleInstanceCollectionInput)3