use of org.kie.workbench.common.stunner.bpmn.definition.property.service.GenericServiceTaskValue in project kie-wb-common by kiegroup.
the class GenericServiceTaskEditorWidgetTest method setEmptyValue.
@Test
public void setEmptyValue() {
GenericServiceTaskValue value = new GenericServiceTaskValue();
widget.setValue(value);
assertEquals(value, widget.getValue());
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.service.GenericServiceTaskValue in project kie-wb-common by kiegroup.
the class BPMNDirectDiagramMarshallerTest method testUnmarshallFlightBooking.
@Test
public void testUnmarshallFlightBooking() throws Exception {
final Diagram<Graph, Metadata> diagram = unmarshall(BPMN_FLIGHT_BOOKING);
// User Task 1
Node<? extends View, ?> serviceTask1Node = diagram.getGraph().getNode("ServiceTask_1");
GenericServiceTask serviceTask1 = (GenericServiceTask) serviceTask1Node.getContent().getDefinition();
// Assert properties from Generic Service Task
GenericServiceTaskValue serviceTaskValue = serviceTask1.getExecutionSet().getGenericServiceTaskInfo().getValue();
assertEquals("Java", serviceTaskValue.getServiceImplementation());
assertEquals("org.acme.travels.service.FlightBookingService", serviceTaskValue.getServiceInterface());
assertEquals("bookFlight", serviceTaskValue.getServiceOperation());
assertEquals("org.acme.travels.Trip", serviceTaskValue.getInMessageStructure());
assertEquals("org.acme.travels.Flight", serviceTaskValue.getOutMessagetructure());
String marshalled = tested.marshall(diagram);
assertTrue(marshalled.contains("<bpmn2:itemDefinition id=\"ServiceTask_1_InMessageType\" structureRef=\"org.acme.travels.Trip\"/>"));
assertTrue(marshalled.contains("<bpmn2:itemDefinition id=\"ServiceTask_1_OutMessageType\" structureRef=\"org.acme.travels.Flight\"/>"));
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.service.GenericServiceTaskValue in project kie-wb-common by kiegroup.
the class GenericServiceTaskPropertyWriterTest method setUp.
@Before
public void setUp() {
PropertyWriterFactory writerFactory = new PropertyWriterFactory();
w = writerFactory.of(serviceTask);
value = new GenericServiceTaskValue("Java", "serviceInterface", "serviceOperation", "inMessageStructure", "outMessagetructure");
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.service.GenericServiceTaskValue in project kie-wb-common by kiegroup.
the class GenericServiceTaskPropertyReaderTest method setUp.
@Before
public void setUp() {
ServiceTask serviceTask = bpmn2.createServiceTask();
value = new GenericServiceTaskValue("java", "serviceInterface", "serviceOperation", "inMessageStructure", "outMessageStructure");
GenericServiceTaskPropertyWriter writer = new GenericServiceTaskPropertyWriter(serviceTask, null, new HashSet<>());
writer.setValue(value);
writer.setSLADueDate(SLA_DUE_DATE);
writer.setAsync(false);
writer.setAdHocAutostart(true);
OnEntryAction onEntryAction = new OnEntryAction();
onEntryAction.setValue(new ScriptTypeListValue());
writer.setOnEntryAction(onEntryAction);
OnExitAction onExitAction = new OnExitAction();
onExitAction.setValue(new ScriptTypeListValue());
writer.setOnExitAction(onExitAction);
writer.setAssignmentsInfo(new AssignmentsInfo());
reader = new GenericServiceTaskPropertyReader(serviceTask, diagram, definitionResolver);
}
use of org.kie.workbench.common.stunner.bpmn.definition.property.service.GenericServiceTaskValue in project kie-wb-common by kiegroup.
the class GenericServiceTaskEditorWidget method setValue.
@Override
public void setValue(GenericServiceTaskValue newValue, boolean fireEvents) {
GenericServiceTaskValue oldValue = value;
value = newValue;
implementation.setValue(value.getServiceImplementation());
serviceInterface.setValue(value.getServiceInterface());
serviceOperation.setValue(value.getServiceOperation());
if (fireEvents) {
ValueChangeEvent.fireIfNotEqual(this, oldValue, value);
}
}
Aggregations