AnsweredAssumed Answered

Invalid content was found  with element extensionElements

Question asked by dashamo010 on Jun 7, 2012
Latest reply on Jun 7, 2012 by jbarrez
the following is a correct  segment  of  bpmn file :
<userTask id="handleRequest" name="Handle vacation request"
              activiti:formKey="org/activiti/examples/taskforms/approve.form" >
          
      <documentation>
        Vacation request by ${employeeName}
      </documentation>
      <potentialOwner>
        <resourceAssignmentExpression>
          <formalExpression>management</formalExpression>
        </resourceAssignmentExpression>
      </potentialOwner>

    </userTask>

this is one node of my business flow, i deploy this business file well.  while i insert
section
      <extensionElements>   
         <activiti:formProperty id="vacationApproved" type="boolean" required="true" />
      </extensionElements>   
into the front of the above userTask node ,like this

  <userTask id="handleRequest" name="Handle vacation request"
              activiti:formKey="org/activiti/examples/taskforms/approve.form" >


     <extensionElements>   
         <activiti:formProperty id="vacationApproved" type="boolean" required="true" />
      </extensionElements>   
          
      <documentation>
        Vacation request by ${employeeName}
      </documentation>
      <potentialOwner>
        <resourceAssignmentExpression>
          <formalExpression>management</formalExpression>
        </resourceAssignmentExpression>
      </potentialOwner>

    </userTask>

and redeploy this bpmn file,the error happened. the console complains the following message:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'documentation'. One of '{"http://www.omg.org/spec/BPMN/20100524/MODEL':auditing, "http://www.omg.org/spec/BPMN/20100524/MODEL':monitoring, "http://www.omg.org/spec/BPMN/20100524/MODEL':categoryValueRef, "http://www.omg.org/spec/BPMN/20100524/MODEL':incoming, "http://www.omg.org/spec/BPMN/20100524/MODEL':outgoing, "http://www.omg.org/spec/BPMN/20100524/MODEL':ioSpecification, "http://www.omg.org/spec/BPMN/20100524/MODEL':property, "http://www.omg.org/spec/BPMN/20100524/MODEL':dataInputAssociation, "http://www.omg.org/spec/BPMN/20100524/MODEL':dataOutputAssociation, "http://www.omg.org/spec/BPMN/20100524/MODEL':resourceRole, "http://www.omg.org/spec/BPMN/20100524/MODEL':loopCharacteristics, "http://www.omg.org/spec/BPMN/20100524/MODEL':rendering}' is expected. | org/activiti/examples/taskforms/VacationRequest.bpmn20.xml | line 21 | column 22

   at org.activiti.engine.impl.util.xml.Parse.throwActivitiExceptionForErrors(Parse.java:186)
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:201)
   at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:81)
   at org.activiti.engine.impl.persistence.deploy.DeploymentCache.deploy(DeploymentCache.java:37)
   at org.activiti.engine.impl.persistence.entity.DeploymentManager.insertDeployment(DeploymentManager.java:39)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:58)

if i removed the all the inner content of the userTask node exclude the extensionElements ,result like this

    <userTask id="handleRequest" name="Handle vacation request"
              activiti:formKey="org/activiti/examples/taskforms/approve.form" >
      <extensionElements>   
         <activiti:formProperty id="vacationApproved" type="boolean" required="true" />
      </extensionElements>   
               
    </userTask>

then the file also be deployed well.

how can i make the element "extensionElements"   effect with the other internal part of the userTask node  in the same time ?

Outcomes