0 Replies Latest reply on Apr 1, 2010 9:40 AM by clauss

    bpmn:group node and start event

      Hi all,

       

      I found in the docu the possibility to goup nodes. For me this is very intresting in combination with the timer/ time out event. But if I try this in my bpmn process I get an error message. This is my process:

       

      <?xml version="1.0" encoding="UTF-8"?>
      <bpmn:definitions id="ServiceTaskJava"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://schema.omg.org/spec/BPMN/2.0 BPMN20.xsd"
          xmlns:bpmn="http://schema.omg.org/spec/BPMN/2.0" typeLanguage="http://www.w3.org/2001/XMLSchema"
          expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://sample.bpmn.camunda.com/"
          xmlns:jbpm="http://jbpm.org/4.0/bpmn2">
      
          <bpmn:process id="group" name="my_group">
      
              <bpmn:startEvent id="s" />
      
              <bpmn:sequenceFlow id="f1" name="s_2_g" sourceRef="s" targetRef="g" />
              
              <bpmn:group id="g">
              
                  <bpmn:startEvent id="g_s" />
                  
                  <bpmn:sequenceFlow id="g_f1" name="g_s_2_g_e" sourceRef="g_s" targetRef="g_e" />
                  
                  <bpmn:endEvent id="g_e" name="g_e" />
                  
              </bpmn:group>
              
              <bpmn:sequenceFlow id="f2" name="g_2_r1" sourceRef="g" targetRef="r1" />
      
              <bpmn:receiveTask id="r1" name="r1" />
              
              <bpmn:sequenceFlow id="f3" name="r1_2_e" sourceRef="r1" targetRef="e" />
      
              <bpmn:endEvent id="e" name="e" />
                  
          </bpmn:process>
      </bpmn:definitions>
      

       

      This is my test case...

       

          @Test
          public void testGroup(){
              //deploy process
              repositoryService.createDeployment().addResourceFromClasspath("simple_group.bpmn.xml").deploy();
              
              //start instance
              ProcessInstance instance = executionService.startProcessInstanceByKey("group");
              Assert.assertNotNull(instance);
              
              //signal first execution
              Execution e1 = instance.findActiveExecutionIn("r1");
              Assert.assertNotNull(e1);
              ProcessInstance instance2 = executionService.signalExecutionById(e1.getId());
              
              Assert.assertTrue(instance2.isEnded());
          }
      

       

      ...and this is the error message I get:

       

      org.jbpm.api.JbpmException: 
        xml validation error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'bpmn:startEvent'. One of '{"http://schema.omg.org/spec/BPMN/2.0":documentation, WC[##other:"http://schema.omg.org/spec/BPMN/2.0"]}' is expected. [line=18 column=32 ]: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'bpmn:startEvent'. One of '{"http://schema.omg.org/spec/BPMN/2.0":documentation, WC[##other:"http://schema.omg.org/spec/BPMN/2.0"]}' is expected.
        xml validation error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'bpmn:sequenceFlow'. One of '{"http://schema.omg.org/spec/BPMN/2.0":artifact, "http://schema.omg.org/spec/BPMN/2.0":supports}' is expected. [line=27 column=75 ]: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'bpmn:sequenceFlow'. One of '{"http://schema.omg.org/spec/BPMN/2.0":artifact, "http://schema.omg.org/spec/BPMN/2.0":supports}' is expected.
        error: parsing exception: null : java.lang.NullPointerException
          at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:175)
          at org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:141)
      ......
      

       

      I would assume, that I can start with an other bpmn:startEvent inside my group... Does anyone have an idea what I'm doing wrong?

       

      Thanks in advance - Claus

       

      Nachricht geändert durch Claus Straube