Activiti工作流引擎:部署不成功

时间:2014-03-12 14:24:01

标签: xml deployment workflow activiti

目前我正在使用活动工作流引擎和XML来开发业务流程图。仅供参考,activiti工作流程图在Tomcat服务器上运行。

但我不知道为什么,我总是无法部署我的流程。这是我的XML代码:

<definitions id="definitions"
  targetNamespace="http://activiti.org/bpmn20" 
  xmlns:activiti="http://activiti.org/bpmn"
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL">

        <process id="accidentForm" name="accidentFormProcess">

          <startEvent id="startEvent" />

          <sequenceFlow id='flow1' sourceRef='startEvent' targetRef='submitForm' />

          <userTask id="submitForm" name="Submit Accident Form" >
            <documentation>
             Submit Accident Form
            </documentation>
            <potentialOwner>
              <resourceAssignmentExpression>
                <formalExpression>employee</formalExpression>
              </resourceAssignmentExpression>
            </potentialOwner>
          </userTask>

          <sequenceFlow id='flow2' sourceRef='submitForm' targetRef='parallelTask' />

          <intermediateCatchEvent id="parallelTask" >
            <messageEventDefinition messageRef="submission" />
          </intermediateCatchEvent>

          <sequenceFlow id='flow3' sourceRef='parallelTask' targetRef='sendBoss' />

          <userTask id="sendBoss" name="Send Email Notification to Boss or Sacharbeiter" >
            <documentation>
             Send Email Notification to Boss or Sacharbeiter
            </documentation>
            <potentialOwner>
              <resourceAssignmentExpression>
                <formalExpression>smtp</formalExpression>
              </resourceAssignmentExpression>
            </potentialOwner>
          </userTask>

          <sequenceFlow id='flow4' sourceRef='parallelTask' targetRef='sendEmployee' />

          <userTask id="sendBoss" name="Send Email Confirmation to Employee" >
            <documentation>
             Send Email Confirmation to Employee
            </documentation>
            <potentialOwner>
              <resourceAssignmentExpression>
                <formalExpression>smtp</formalExpression>
              </resourceAssignmentExpression>
            </potentialOwner>
          </userTask>

          <sequenceFlow id='flow5' sourceRef='sendBoss' targetRef='parallelTask2' />

          <intermediateCatchEvent id="parallelTask2" >
            <messageEventDefinition messageRef="submission" />
          </intermediateCatchEvent>

          <sequenceFlow id='flow6' sourceRef='sendEmployee' targetRef='parallelTask2' />

          <sequenceFlow id='flow7' sourceRef='parallelTask2' targetRef='reviewForm' />

          <userTask id="bossSign" name="Form Reviewed and Signed By The Boss or Sacharbeiter" >
            <documentation>
             Form Reviewed and Signed By The Boss or Sacharbeiter
            </documentation>
            <potentialOwner>
              <resourceAssignmentExpression>
                <formalExpression>boss</formalExpression>
              </resourceAssignmentExpression>
            </potentialOwner>
          </userTask>

          <sequenceFlow id='flow8' sourceRef='reviewForm' targetRef='sendFormBO' />

          <userTask id="sendFormBO" name="Boss or Sacharbeiter Submit Signed Form to The System" >
            <documentation>
             Boss or Sacharbeiter Submit Signed Form to The System
            </documentation>
            <potentialOwner>
              <resourceAssignmentExpression>
                <formalExpression>boss</formalExpression>
              </resourceAssignmentExpression>
            </potentialOwner>
          </userTask>

          <sequenceFlow id='flow9' sourceRef='sendFormBO' targetRef='sendEmailBO' />

          <userTask id="sendEmailBO" name="Send Email Notification to Back Office" >
            <documentation>
             Send Email Notification to Back Office
            </documentation>
            <potentialOwner>
              <resourceAssignmentExpression>
                <formalExpression>smtp</formalExpression>
              </resourceAssignmentExpression>
            </potentialOwner>
          </userTask>

          <sequenceFlow id='flow10' sourceRef='sendEmailBO' targetRef='claimAccident' />

          <userTask id="claimAccident" name="Back Office Claim Accident to Insurance Company" >
            <documentation>
             Back Office Claim Accident to Insurance Company
            </documentation>
            <potentialOwner>
              <resourceAssignmentExpression>
                <formalExpression>backoffice</formalExpression>
              </resourceAssignmentExpression>
            </potentialOwner>
          </userTask>

          <sequenceFlow id='flow11' sourceRef='claimAccident' targetRef='endProcess' />

          <endEvent id="endProcess" />

         </process>
</definitions>

我的XML有什么问题吗?有没有办法做调试。例如,通过使用一些日志或错误控制台?提前致谢

2 个答案:

答案 0 :(得分:0)

  • 首先,有多个带有ID值的userTask&#39; sendBoss&#39;。可能被称为“sendEmploye&#39;”。
  • IDREF没有ID / IDREF绑定&#39; reviewForm&#39;顺序流程&#39; flow7&#39;。
  • 在中间事件中并未引用消息定义&parallelTask​​&#39;。

提示: 您可以使用activiti designer插件进行eclipse。 http://docs.alfresco.com/4.2/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Ftasks%2Fwf-install-activiti-designer.html

在activiti中配置记录器。 http://activiti.org/userguide/index.html#loggingConfiguration

答案 1 :(得分:0)

最好的方法是在Eclipse中使用Activiti Designer插件。 利用Maven来激活依赖。 一定要试试吧。而且,对于部署,必须使用“存储库服务”。 它是Activiti流程Engine提供的API服务之一。