use of org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkEventExecutionSet in project kie-wb-common by kiegroup.
the class HashCodeAndEqualityTest method testLinkEventExecutionSet.
@Test
public void testLinkEventExecutionSet() {
LinkRef link = new LinkRef("link");
LinkEventExecutionSet executionSet = new LinkEventExecutionSet(link);
assertNotEquals(executionSet, null);
assertNotEquals(executionSet, "");
assertEquals(executionSet, executionSet);
LinkRef link2 = new LinkRef("link");
LinkEventExecutionSet executionSet2 = new LinkEventExecutionSet(link2);
assertEquals(executionSet, executionSet2);
link2.setValue("link2");
assertNotEquals(executionSet, executionSet2);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkEventExecutionSet in project kie-wb-common by kiegroup.
the class HashCodeAndEqualityTest method testIntermediateLinkCatchEventEquals.
@Test
public void testIntermediateLinkCatchEventEquals() {
IntermediateLinkEventCatching linkEvent = new IntermediateLinkEventCatching();
IntermediateLinkEventCatching linkEvent2 = new IntermediateLinkEventCatching();
assertNotEquals(linkEvent, null);
assertNotEquals(linkEvent, "");
assertEquals(linkEvent, linkEvent);
assertEquals(linkEvent, linkEvent2);
BackgroundSet backgroundSet = new BackgroundSet();
backgroundSet.setBgColor(new BgColor("black"));
linkEvent.setBackgroundSet(backgroundSet);
assertNotEquals(linkEvent, linkEvent2);
linkEvent2.setBackgroundSet(backgroundSet);
assertEquals(linkEvent, linkEvent2);
linkEvent.setBackgroundSet(backgroundSet);
linkEvent.setExecutionSet(new LinkEventExecutionSet(new LinkRef("value")));
assertNotEquals(linkEvent, linkEvent2);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkEventExecutionSet in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverter method linkEvent.
protected PropertyWriter linkEvent(Node<View<IntermediateLinkEventThrowing>, ?> n) {
IntermediateThrowEvent event = bpmn2.createIntermediateThrowEvent();
event.setId(n.getUUID());
ThrowEventPropertyWriter p = propertyWriterFactory.of(event);
IntermediateLinkEventThrowing definition = n.getContent().getDefinition();
p.setAbsoluteBounds(n);
BPMNGeneralSet general = definition.getGeneral();
p.setName(general.getName().getValue());
p.setDocumentation(general.getDocumentation().getValue());
p.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
p.setAssignmentsInfo(definition.getDataIOSet().getAssignmentsinfo());
LinkEventExecutionSet executionSet = definition.getExecutionSet();
p.addLink(executionSet.getLinkRef());
return p;
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkEventExecutionSet in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method linkEvent.
protected Result<BpmnNode> linkEvent(CatchEvent event) {
String nodeId = event.getId();
Node<View<IntermediateLinkEventCatching>, Edge> node = factoryManager.newNode(nodeId, IntermediateLinkEventCatching.class);
IntermediateLinkEventCatching 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 LinkEventExecutionSet(new LinkRef(p.getLinkRef())));
return Result.success(BpmnNode.of(node, p));
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.link.LinkEventExecutionSet in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverterTest method createIntermediateLinkEventCatchingNode.
private Node createIntermediateLinkEventCatchingNode() {
LinkEventExecutionSet executionSet = new LinkEventExecutionSet(linkRef);
IntermediateLinkEventCatching eventCatching = new IntermediateLinkEventCatching(generalSet, mock(BackgroundSet.class), mock(FontSet.class), mock(CircleDimensionSet.class), dataIOSet, advancedData, executionSet);
Node dockNode = mockNode();
Node node = mockDockedNode(dockNode, eventCatching);
return node;
}
Aggregations