Search in sources :

Example 11 with StartNoneEvent

use of org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent in project kie-wb-common by kiegroup.

the class ContextUtilsTest method testIsFormGenerationSupported.

@Test
public void testIsFormGenerationSupported() {
    Assert.assertTrue(ContextUtils.isFormGenerationSupported(createNode(new UserTask())));
    Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new ScriptTask())));
    Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new BusinessRuleTask())));
    Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new NoneTask())));
    Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new StartNoneEvent())));
    Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new EndNoneEvent())));
    Assert.assertFalse(ContextUtils.isFormGenerationSupported(createNode(new ParallelGateway())));
}
Also used : ScriptTask(org.kie.workbench.common.stunner.bpmn.definition.ScriptTask) NoneTask(org.kie.workbench.common.stunner.bpmn.definition.NoneTask) ParallelGateway(org.kie.workbench.common.stunner.bpmn.definition.ParallelGateway) UserTask(org.kie.workbench.common.stunner.bpmn.definition.UserTask) BusinessRuleTask(org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask) EndNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.EndNoneEvent) StartNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent) Test(org.junit.Test)

Example 12 with StartNoneEvent

use of org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent in project kie-wb-common by kiegroup.

the class BPMNDiagramMarshallerTest method testUnmarshallStartNoneEvent.

@Test
@SuppressWarnings("unchecked")
public void testUnmarshallStartNoneEvent() throws Exception {
    Diagram<Graph, Metadata> diagram = unmarshall(BPMN_STARTNONEEVENT);
    assertDiagram(diagram, 4);
    assertEquals("startNoneEvent", diagram.getMetadata().getTitle());
    Node<? extends Definition, ?> startNoneEventNode = diagram.getGraph().getNode("processStartEvent");
    StartNoneEvent startNoneEvent = (StartNoneEvent) startNoneEventNode.getContent().getDefinition();
    assertNotNull(startNoneEvent.getGeneral());
    assertEquals("MyStartNoneEvent", startNoneEvent.getGeneral().getName().getValue());
    assertEquals("MyStartNoneEventDocumentation", startNoneEvent.getGeneral().getDocumentation().getValue());
}
Also used : Graph(org.kie.workbench.common.stunner.core.graph.Graph) Metadata(org.kie.workbench.common.stunner.core.diagram.Metadata) StartNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent) Test(org.junit.Test)

Example 13 with StartNoneEvent

use of org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent in project kie-wb-common by kiegroup.

the class StartNoneEventTest method testStartNoneEventNameValid.

@Test
public void testStartNoneEventNameValid() {
    StartNoneEvent startNoneEvent = new StartNoneEvent.StartNoneEventBuilder().build();
    startNoneEvent.getGeneral().setName(new Name(NAME_VALID));
    Set<ConstraintViolation<StartNoneEvent>> violations = this.validator.validate(startNoneEvent);
    assertTrue(violations.isEmpty());
}
Also used : ConstraintViolation(javax.validation.ConstraintViolation) StartNoneEvent(org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name) Test(org.junit.Test)

Aggregations

StartNoneEvent (org.kie.workbench.common.stunner.bpmn.definition.StartNoneEvent)13 Test (org.junit.Test)11 Metadata (org.kie.workbench.common.stunner.core.diagram.Metadata)6 Graph (org.kie.workbench.common.stunner.core.graph.Graph)6 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)3 ConstraintViolation (javax.validation.ConstraintViolation)2 BPMNViewDefinition (org.kie.workbench.common.stunner.bpmn.definition.BPMNViewDefinition)2 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)2 ShapeView (org.kie.workbench.common.stunner.core.client.shape.view.ShapeView)2 StartEvent (org.eclipse.bpmn2.StartEvent)1 CatchEventPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.CatchEventPropertyWriter)1 CatchEventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.CatchEventPropertyReader)1 EventPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.EventPropertyReader)1 BaseStartEvent (org.kie.workbench.common.stunner.bpmn.definition.BaseStartEvent)1 BusinessRuleTask (org.kie.workbench.common.stunner.bpmn.definition.BusinessRuleTask)1 EndNoneEvent (org.kie.workbench.common.stunner.bpmn.definition.EndNoneEvent)1 NoneTask (org.kie.workbench.common.stunner.bpmn.definition.NoneTask)1 ParallelGateway (org.kie.workbench.common.stunner.bpmn.definition.ParallelGateway)1 ScriptTask (org.kie.workbench.common.stunner.bpmn.definition.ScriptTask)1 UserTask (org.kie.workbench.common.stunner.bpmn.definition.UserTask)1