Search in sources :

Example 51 with AdvancedData

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

the class IntermediateCatchEventConverter method compensationEvent.

protected Result<BpmnNode> compensationEvent(CatchEvent event) {
    String nodeId = event.getId();
    Node<View<IntermediateCompensationEvent>, Edge> node = factoryManager.newNode(nodeId, IntermediateCompensationEvent.class);
    IntermediateCompensationEvent definition = node.getContent().getDefinition();
    CatchEventPropertyReader p = propertyReaderFactory.of(event);
    node.getContent().setBounds(p.getBounds());
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setFontSet(p.getFontSet());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    CancelActivity cancelActivity = new CancelActivity(false);
    SLADueDate slaDueDate = new SLADueDate(p.getSlaDueDate());
    BaseCancellingEventExecutionSet executionSet = new BaseCancellingEventExecutionSet(cancelActivity, slaDueDate);
    definition.setExecutionSet(executionSet);
    return Result.success(BpmnNode.of(node, p));
}
Also used : Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) BaseCancellingEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.BaseCancellingEventExecutionSet) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) IntermediateCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateCompensationEvent) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) CatchEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader) Edge(org.kie.workbench.common.stunner.core.graph.Edge) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)

Example 52 with AdvancedData

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

the class IntermediateCatchEventConverter method conditionalEvent.

protected Result<BpmnNode> conditionalEvent(CatchEvent event, ConditionalEventDefinition e) {
    String nodeId = event.getId();
    Node<View<IntermediateConditionalEvent>, Edge> node = factoryManager.newNode(nodeId, IntermediateConditionalEvent.class);
    IntermediateConditionalEvent definition = node.getContent().getDefinition();
    CatchEventPropertyReader p = propertyReaderFactory.of(event);
    node.getContent().setBounds(p.getBounds());
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setFontSet(p.getFontSet());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    definition.setExecutionSet(new CancellingConditionalEventExecutionSet(new CancelActivity(p.isCancelActivity()), new SLADueDate(p.getSlaDueDate()), p.getConditionExpression(e)));
    return Result.success(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) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) IntermediateConditionalEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateConditionalEvent) CatchEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader) CancellingConditionalEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.conditional.CancellingConditionalEventExecutionSet) Edge(org.kie.workbench.common.stunner.core.graph.Edge) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)

Example 53 with AdvancedData

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

the class IntermediateCatchEventConverter method escalationEvent.

protected Result<BpmnNode> escalationEvent(CatchEvent event, EscalationEventDefinition e) {
    String nodeId = event.getId();
    Node<View<IntermediateEscalationEvent>, Edge> node = factoryManager.newNode(nodeId, IntermediateEscalationEvent.class);
    IntermediateEscalationEvent definition = node.getContent().getDefinition();
    CatchEventPropertyReader p = propertyReaderFactory.of(event);
    node.getContent().setBounds(p.getBounds());
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setFontSet(p.getFontSet());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
    definition.setExecutionSet(new CancellingEscalationEventExecutionSet(new CancelActivity(p.isCancelActivity()), new SLADueDate(p.getSlaDueDate()), new EscalationRef(EventDefinitionReader.escalationRefOf(e))));
    return Result.success(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) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) CancellingEscalationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.CancellingEscalationEventExecutionSet) DataIOSet(org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet) SLADueDate(org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate) IntermediateEscalationEvent(org.kie.workbench.common.stunner.bpmn.definition.IntermediateEscalationEvent) AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) CatchEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader) Edge(org.kie.workbench.common.stunner.core.graph.Edge) EscalationRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef) CancelActivity(org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)

Example 54 with AdvancedData

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

the class EndEventConverter method endNoneEvent.

private BpmnNode endNoneEvent(EndEvent event) {
    Node<View<EndNoneEvent>, Edge> node = factoryManager.newNode(event.getId(), EndNoneEvent.class);
    EndNoneEvent definition = node.getContent().getDefinition();
    EventPropertyReader p = propertyReaderFactory.of(event);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return BpmnNode.of(node, p);
}
Also used : AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) EndNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.EndNoneEvent) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) EventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader) ThrowEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)

Example 55 with AdvancedData

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

the class EndEventConverter method compensationEventDefinition.

private BpmnNode compensationEventDefinition(EndEvent event, CompensateEventDefinition eventDefinition) {
    Node<View<EndCompensationEvent>, Edge> node = factoryManager.newNode(event.getId(), EndCompensationEvent.class);
    EndCompensationEvent definition = node.getContent().getDefinition();
    EventPropertyReader p = propertyReaderFactory.of(event);
    definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    definition.setExecutionSet(new CompensationEventExecutionSet(new ActivityRef(EventDefinitionReader.activityRefOf(eventDefinition))));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getCircleDimensionSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    return BpmnNode.of(node, p);
}
Also used : AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) Documentation(org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation) ActivityRef(org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.ActivityRef) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) CompensationEventExecutionSet(org.kie.workbench.common.stunner.bpmn.definition.property.event.compensation.CompensationEventExecutionSet) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) EndCompensationEvent(org.kie.workbench.common.stunner.bpmn.definition.EndCompensationEvent) EventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader) ThrowEventPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)

Aggregations

AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)70 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)51 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)50 Documentation (org.kie.workbench.common.stunner.bpmn.definition.property.general.Documentation)49 Edge (org.kie.workbench.common.stunner.core.graph.Edge)47 View (org.kie.workbench.common.stunner.core.graph.content.view.View)47 DataIOSet (org.kie.workbench.common.stunner.bpmn.definition.property.dataio.DataIOSet)34 SLADueDate (org.kie.workbench.common.stunner.bpmn.definition.property.general.SLADueDate)28 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)20 Test (org.junit.Test)18 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)16 ThrowEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.ThrowEventPropertyReader)12 BackgroundSet (org.kie.workbench.common.stunner.bpmn.definition.property.background.BackgroundSet)11 FontSet (org.kie.workbench.common.stunner.bpmn.definition.property.font.FontSet)11 IsAsync (org.kie.workbench.common.stunner.bpmn.definition.property.task.IsAsync)11 EscalationRef (org.kie.workbench.common.stunner.bpmn.definition.property.event.escalation.EscalationRef)10 IsInterrupting (org.kie.workbench.common.stunner.bpmn.definition.property.event.IsInterrupting)9 TaskName (org.kie.workbench.common.stunner.bpmn.definition.property.task.TaskName)9 CancelActivity (org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity)8 TaskGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.TaskGeneralSet)8