use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData in project kie-wb-common by kiegroup.
the class BaseEndEventTest method testGetAdvancedData.
@Test
public void testGetAdvancedData() {
final FakeBaseEndEvent baseEndEvent = new FakeBaseEndEvent(null, null, null, null, advancedData);
AdvancedData result = baseEndEvent.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 BaseSubprocessTest method testGetAdvancedData.
@Test
public void testGetAdvancedData() {
final FakeBaseSubprocess baseSubprocess = new FakeBaseSubprocess(null, null, null, null, null, advancedData);
AdvancedData result = baseSubprocess.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 CallActivityConverterTest method setUp.
@Before
public void setUp() {
final ReusableSubprocess definition = new ReusableSubprocess(new BPMNGeneralSet(), new ReusableSubprocessTaskExecutionSet(), new DataIOSet(), new BackgroundSet(), new FontSet(), new RectangleDimensionsSet(), new SimulationSet(), new AdvancedData());
final View<ReusableSubprocess> view = new ViewImpl<>(definition, Bounds.create());
Node<View<ReusableSubprocess>, Edge> node = new NodeImpl<>(UUID);
node.setContent(view);
when(callActivity.getId()).thenReturn(UUID);
when(callActivity.getCalledElement()).thenReturn(CALLED_ELEMENT);
when(factoryManager.newNode(eq(UUID), eq(ReusableSubprocess.class))).thenReturn(node);
when(propertyReaderFactory.of(callActivity)).thenReturn(propertyReader);
when(propertyReader.getName()).thenReturn(NAME);
when(propertyReader.getDocumentation()).thenReturn(DOCUMENTATION);
when(propertyReader.getAssignmentsInfo()).thenReturn(ASSIGNMENTS_INFO);
when(propertyReader.getBounds()).thenReturn(BOUNDS);
when(propertyReader.getSimulationSet()).thenReturn(SIMULATION_SET);
when(propertyReader.getRectangleDimensionsSet()).thenReturn(RECTANGLE_DIMENSIONS_SET);
when(propertyReader.getFontSet()).thenReturn(FONT_SET);
when(propertyReader.getBackgroundSet()).thenReturn(BACKGROUND_SET);
when(propertyReader.isIndependent()).thenReturn(INDEPENDENT);
when(propertyReader.isAbortParent()).thenReturn(ABORT_PARENT);
when(propertyReader.isWaitForCompletion()).thenReturn(WAIT_FOR_COMPLETION);
when(propertyReader.isAsync()).thenReturn(IS_ASYNC);
when(propertyReader.isSequential()).thenReturn(SEQUENTIAL);
when(propertyReader.getCollectionOutput()).thenReturn(COLLECTION_OUTPUT);
when(propertyReader.getCollectionInput()).thenReturn(COLLECTION_INPUT);
when(propertyReader.getDataInput()).thenReturn(DATA_INPUT);
when(propertyReader.getDataOutput()).thenReturn(DATA_OUTPUT);
when(propertyReader.getCompletionCondition()).thenReturn(COMPLETION_CONDITION);
when(propertyReader.getOnEntryAction()).thenReturn(ON_ENTRY_ACTION);
when(propertyReader.getOnExitAction()).thenReturn(ON_EXIT_ACTION);
when(propertyReader.getSlaDueDate()).thenReturn(SLA_DUE_DATE);
converter = new CallActivityConverter(factoryManager, propertyReaderFactory);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData in project kie-wb-common by kiegroup.
the class TaskConverterPriorityTest method setPriorityMvel.
@Test
public void setPriorityMvel() {
propertyWriterFactory = new PropertyWriterFactory();
taskConverter = spy(new TaskConverter(propertyWriterFactory));
when(n.getContent()).thenReturn(view);
when(view.getBounds()).thenReturn(Bounds.create(0, 0, 10, 10));
when(view.getDefinition()).thenReturn(definition);
when(general.getName()).thenReturn(new Name("Name"));
when(general.getDocumentation()).thenReturn(new Documentation());
when(definition.getGeneral()).thenReturn(general);
when(definition.getSimulationSet()).thenReturn(new SimulationSet());
when(definition.getExecutionSet()).thenReturn(baseUserTaskExecutionSet);
when(baseUserTaskExecutionSet.getTaskName()).thenReturn(new TaskName("taskName"));
when(baseUserTaskExecutionSet.getActors()).thenReturn(new Actors());
when(baseUserTaskExecutionSet.getAssignmentsinfo()).thenReturn(new AssignmentsInfo());
when(baseUserTaskExecutionSet.getReassignmentsInfo()).thenReturn(new ReassignmentsInfo());
when(baseUserTaskExecutionSet.getNotificationsInfo()).thenReturn(new NotificationsInfo());
when(baseUserTaskExecutionSet.getSkippable()).thenReturn(new Skippable(true));
when(baseUserTaskExecutionSet.getGroupid()).thenReturn(new Groupid("groupId"));
when(baseUserTaskExecutionSet.getSubject()).thenReturn(new Subject());
when(baseUserTaskExecutionSet.getDescription()).thenReturn(new Description());
when(baseUserTaskExecutionSet.getPriority()).thenReturn(new TaskPriority("#{varOne}"));
when(baseUserTaskExecutionSet.getIsAsync()).thenReturn(new IsAsync(true));
when(baseUserTaskExecutionSet.getCreatedBy()).thenReturn(new CreatedBy());
when(baseUserTaskExecutionSet.getAdHocAutostart()).thenReturn(new AdHocAutostart());
when(baseUserTaskExecutionSet.getIsMultipleInstance()).thenReturn(new IsMultipleInstance(false));
when(baseUserTaskExecutionSet.getOnEntryAction()).thenReturn(new OnEntryAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))));
when(baseUserTaskExecutionSet.getOnExitAction()).thenReturn(new OnExitAction(new ScriptTypeListValue().addValue(new ScriptTypeValue("java", ""))));
when(baseUserTaskExecutionSet.getContent()).thenReturn(new Content());
when(baseUserTaskExecutionSet.getSlaDueDate()).thenReturn(new SLADueDate());
when(definition.getAdvancedData()).thenReturn(new AdvancedData(new MetaDataAttributes()));
doCallRealMethod().when(taskConverter).userTask(any());
final UserTaskPropertyWriter propertyWriter = (UserTaskPropertyWriter) taskConverter.userTask(n);
assertTrue(propertyWriter.getPriority().equals("<![CDATA[#{varOne}]]>"));
System.out.println("Priority: " + propertyWriter.getPriority());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData in project kie-wb-common by kiegroup.
the class IntermediateCatchEventConverter method signalEvent.
protected Result<BpmnNode> signalEvent(CatchEvent event) {
String nodeId = event.getId();
Node<View<IntermediateSignalEventCatching>, Edge> node = factoryManager.newNode(nodeId, IntermediateSignalEventCatching.class);
IntermediateSignalEventCatching 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 CancellingSignalEventExecutionSet(new CancelActivity(p.isCancelActivity()), new SLADueDate(p.getSlaDueDate()), new SignalRef(p.getSignalRef())));
return Result.success(BpmnNode.of(node, p));
}
Aggregations