use of org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method messageEvent.
private BpmnNode messageEvent(CatchEvent event, MessageEventDefinition e) {
String nodeId = event.getId();
Node<View<IntermediateMessageEventCatching>, Edge> node = factoryManager.newNode(nodeId, IntermediateMessageEventCatching.class);
IntermediateMessageEventCatching definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
definition.setExecutionSet(new CancellingMessageEventExecutionSet(new CancelActivity(p.isCancelActivity()), new MessageRef(e.getMessageRef().getName())));
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
return BpmnNode.of(node);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method signalEvent.
private BpmnNode signalEvent(CatchEvent event, SignalEventDefinition e) {
String nodeId = event.getId();
Node<View<IntermediateSignalEventCatching>, Edge> node = factoryManager.newNode(nodeId, IntermediateSignalEventCatching.class);
IntermediateSignalEventCatching definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setDataIOSet(new DataIOSet(p.getAssignmentsInfo()));
definition.setExecutionSet(new CancellingSignalEventExecutionSet(new CancelActivity(p.isCancelActivity()), new SignalRef(p.getSignalRef())));
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
return BpmnNode.of(node);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method timerEvent.
private BpmnNode timerEvent(CatchEvent event, TimerEventDefinition e) {
String nodeId = event.getId();
Node<View<IntermediateTimerEvent>, Edge> node = factoryManager.newNode(nodeId, IntermediateTimerEvent.class);
IntermediateTimerEvent definition = node.getContent().getDefinition();
EventPropertyReader p = propertyReaderFactory.of(event);
definition.setGeneral(new BPMNGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setExecutionSet(new CancellingTimerEventExecutionSet(new CancelActivity(p.isCancelActivity()), new TimerSettings(p.getTimerSettings(e))));
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getCircleDimensionSet());
definition.setFontSet(p.getFontSet());
definition.setBackgroundSet(p.getBackgroundSet());
return BpmnNode.of(node);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity in project kie-wb-common by kiegroup.
the class HashCodeAndEqualityTest method IntermediateMessageEventCatchingEquals.
@Test
public void IntermediateMessageEventCatchingEquals() {
final String MESSAGE_REF = "message ref";
final CancellingMessageEventExecutionSet A_EXECUTION_SET = new CancellingMessageEventExecutionSet(new CancelActivity(true), new MessageRef(MESSAGE_REF));
final CancellingMessageEventExecutionSet B_EXECUTION_SET = new CancellingMessageEventExecutionSet(new CancelActivity(true), new MessageRef(MESSAGE_REF));
final CancellingMessageEventExecutionSet C_EXECUTION_SET = new CancellingMessageEventExecutionSet(new CancelActivity(true), new MessageRef("Other value"));
final CancellingMessageEventExecutionSet D_EXECUTION_SET = new CancellingMessageEventExecutionSet(new CancelActivity(true), new MessageRef(MESSAGE_REF));
final String ASSIGNMENT_INFO = "some value";
final DataIOSet A_DATA_SET = new DataIOSet(new AssignmentsInfo(ASSIGNMENT_INFO));
final DataIOSet B_DATA_SET = new DataIOSet(new AssignmentsInfo(ASSIGNMENT_INFO));
final DataIOSet C_DATA_SET = new DataIOSet(new AssignmentsInfo(ASSIGNMENT_INFO));
final DataIOSet D_DATA_SET = new DataIOSet(new AssignmentsInfo("Other value"));
IntermediateMessageEventCatching.IntermediateMessageEventCatchingBuilder builder = new IntermediateMessageEventCatching.IntermediateMessageEventCatchingBuilder();
IntermediateMessageEventCatching a = builder.build();
a.setExecutionSet(A_EXECUTION_SET);
a.setDataIOSet(A_DATA_SET);
builder = new IntermediateMessageEventCatching.IntermediateMessageEventCatchingBuilder();
IntermediateMessageEventCatching b = builder.build();
b.setExecutionSet(B_EXECUTION_SET);
b.setDataIOSet(B_DATA_SET);
builder = new IntermediateMessageEventCatching.IntermediateMessageEventCatchingBuilder();
IntermediateMessageEventCatching c = builder.build();
c.setExecutionSet(C_EXECUTION_SET);
c.setDataIOSet(C_DATA_SET);
builder = new IntermediateMessageEventCatching.IntermediateMessageEventCatchingBuilder();
IntermediateMessageEventCatching d = builder.build();
d.setExecutionSet(D_EXECUTION_SET);
d.setDataIOSet(D_DATA_SET);
assertEquals(a, a);
assertEquals(a, b);
assertNotEquals(a, c);
assertNotEquals(a, d);
assertNotEquals(a, 19);
assertNotEquals(a, null);
a.setExecutionSet(null);
assertNotEquals(a, b);
assertNotEquals(b, a);
assertNotEquals(a, c);
assertNotEquals(a, d);
a.setExecutionSet(A_EXECUTION_SET);
assertEquals(a, b);
assertNotEquals(a, c);
assertNotEquals(a, d);
a.setDataIOSet(null);
assertNotEquals(a, b);
assertNotEquals(b, a);
assertNotEquals(a, c);
assertNotEquals(a, d);
EndSignalEvent.EndSignalEventBuilder builderSignal = new EndSignalEvent.EndSignalEventBuilder();
EndSignalEvent e = builderSignal.build();
assertNotEquals(a, e);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.event.CancelActivity in project kie-wb-common by kiegroup.
the class ProcessErrorRefProviderTest method mockIntermediateErrorEventCatchingNode.
private Node mockIntermediateErrorEventCatchingNode(String errorRefValue) {
IntermediateErrorEventCatching event = new IntermediateErrorEventCatching();
event.setExecutionSet(new CancellingErrorEventExecutionSet(new CancelActivity(true), new ErrorRef(errorRefValue)));
return mockNode(event);
}
Aggregations