use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData in project kie-wb-common by kiegroup.
the class IntermediateThrowEventConverterTest method setUp.
@Before
public void setUp() {
Event throwEvent = bpmn2.createIntermediateThrowEvent();
throwEvent.setId("throwEventID");
throwEventPropertyWriter = spy(new ThrowEventPropertyWriter((ThrowEvent) throwEvent, new FlatVariableScope(), new HashSet<>()));
propertyWriterFactory = spy(PropertyWriterFactory.class);
when(propertyWriterFactory.of(any(ThrowEvent.class))).thenReturn(throwEventPropertyWriter);
generalSet = new BPMNGeneralSet(NAME, DOCUMENTATION);
assignmentsInfo = new AssignmentsInfo(ASSIGNMENTS_INFO);
dataIOSet = new DataIOSet(assignmentsInfo);
advancedData = new AdvancedData();
signalRef = mock(SignalRef.class);
signalScope = mock(SignalScope.class);
linkRef = mock(LinkRef.class);
messageRef = mock(MessageRef.class);
escalationRef = mock(EscalationRef.class);
tested = spy(new IntermediateThrowEventConverter(propertyWriterFactory));
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData in project kie-wb-common by kiegroup.
the class GenericServiceTaskTest method setAndGetExecutionSet.
@Test
public void setAndGetExecutionSet() {
GenericServiceTask genericServiceTask = new GenericServiceTask(new TaskGeneralSet(new Name("Service Task"), new Documentation("")), new GenericServiceTaskExecutionSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new TaskType(TaskTypes.SERVICE_TASK), new AdvancedData());
assertEquals(new GenericServiceTaskExecutionSet(), genericServiceTask.getExecutionSet());
GenericServiceTaskExecutionSet set = new GenericServiceTaskExecutionSet();
genericServiceTask.setExecutionSet(set);
assertEquals(set, genericServiceTask.getExecutionSet());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData in project kie-wb-common by kiegroup.
the class IntermediateErrorEventCatchingTest method setUp.
@Before
public void setUp() {
general = mock(BPMNGeneralSet.class);
backgroundSet = mock(BackgroundSet.class);
fontSet = mock(FontSet.class);
dimensionSet = mock(CircleDimensionSet.class);
dataIOSet = mock(DataIOSet.class);
advancedData = new AdvancedData();
cancellingErrorEventExecutionSet = mock(CancellingErrorEventExecutionSet.class);
tested = new IntermediateErrorEventCatching(general, backgroundSet, fontSet, dimensionSet, dataIOSet, advancedData, cancellingErrorEventExecutionSet);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData in project kie-wb-common by kiegroup.
the class BaseIntermediateEventTest method testGetAdvancedData.
@Test
public void testGetAdvancedData() {
final FakeBaseIntermediateEventTest baseIntermediateEvent = new FakeBaseIntermediateEventTest(null, null, null, null, null, advancedData);
AdvancedData result = baseIntermediateEvent.getAdvancedData();
assertEquals(advancedData, result);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData in project kie-wb-common by kiegroup.
the class BaseTaskConverter method bpmnServiceTask.
BpmnNode bpmnServiceTask(org.eclipse.bpmn2.ServiceTask task) {
Node<View<GenericServiceTask>, Edge> node = factoryManager.newNode(task.getId(), GenericServiceTask.class);
GenericServiceTask definition = node.getContent().getDefinition();
GenericServiceTaskPropertyReader p = propertyReaderFactory.of(task);
if (p == null) {
throw new NullPointerException(task.getClass().getCanonicalName());
}
definition.setGeneral(new TaskGeneralSet(new Name(p.getName()), new Documentation(p.getDocumentation())));
definition.setExecutionSet(new GenericServiceTaskExecutionSet(new GenericServiceTaskInfo(p.getGenericServiceTask()), p.getAssignmentsInfo(), new AdHocAutostart(p.isAdHocAutostart()), new IsAsync(p.isAsync()), new IsMultipleInstance(p.isMultipleInstance()), new MultipleInstanceExecutionMode(p.isSequential()), new MultipleInstanceCollectionInput(p.getCollectionInput()), new MultipleInstanceDataInput(p.getDataInput()), new MultipleInstanceCollectionOutput(p.getCollectionOutput()), new MultipleInstanceDataOutput(p.getDataOutput()), new MultipleInstanceCompletionCondition(p.getCompletionCondition()), new OnEntryAction(p.getOnEntryAction()), new OnExitAction(p.getOnExitAction()), new SLADueDate(p.getSLADueDate())));
node.getContent().setBounds(p.getBounds());
definition.setDimensionsSet(p.getRectangleDimensionsSet());
definition.setBackgroundSet(p.getBackgroundSet());
definition.setFontSet(p.getFontSet());
definition.setSimulationSet(p.getSimulationSet());
definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
return BpmnNode.of(node, p);
}
Aggregations