AnsweredAssumed Answered

What is the problem in my workflow ?

Question asked by vincent_roye on Dec 27, 2013
Hi,

I would like to create a workflow that sends a mail to a group user and assign a task to them. The console says :

org.alfresco.service.cmr.workflow.WorkflowException: 11270077 Failed to deploy workflow definition.

Could anyone tell me what's wrong with my workflow ? I would also like to know where I can read more about these exceptions (is there a log file somewhere ?)

Thank you very much.

————–

Here is my bpnm file :


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="myProcess" name="MyProcess" isExecutable="true">
    <extensionElements>
      <activiti:executionListener event="start" class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener">
        <activiti:field name="script">
          <activiti:string>execution.setVariable('wf_StudentsGroup', groups.getGroup('Students').getFullName());
          execution.setVariable('wf_CollaboratorsGroup', groups.getGroup('Collaborators').getFullName());</activiti:string>
        </activiti:field>
      </activiti:executionListener>
    </extensionElements>
    <startEvent id="startEventAck" name="Start" activiti:initiator="${initiator.properties.userName}" activiti:formKey="wf:DocGen"></startEvent>
    <userTask id="studentAck" name="studentAck" activiti:async="true" activiti:exclusive="false" activiti:candidateGroups="${wf_StudentsGroup}" activiti:formKey="wf:DocGenStudents">
      <extensionElements>
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate;
                 if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
                 if (typeof bpm_comment != 'undefined') task.setVariable('bpm_comment', bpm_comment);</activiti:string>
          </activiti:field>
        </activiti:taskListener>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>execution.setVariable('bpm_assignee', task.getVariable('bpm_assignee'));
                     execution.setVariable('bpm_comment', task.getVariable('bpm_comment'));
                    execution.setVariable('wf_manager', person);
                    execution.setVariable('bpm_dueDate', task.dueDate);
                    execution.setVariable('bpm_priority', task.priority);</activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
    <endEvent id="endEventAck" name="End"></endEvent>
    <sequenceFlow id="flow5" sourceRef="startEventAck" targetRef="parallelgateway1"></sequenceFlow>
    <parallelGateway id="parallelgateway1" name="Parallel Gateway"></parallelGateway>
    <sequenceFlow id="flow7" sourceRef="parallelgateway1" targetRef="studentAck"></sequenceFlow>
    <parallelGateway id="parallelgateway2" name="Parallel Gateway"></parallelGateway>
    <sequenceFlow id="flow10" sourceRef="parallelgateway2" targetRef="endEventAck"></sequenceFlow>
    <serviceTask id="mailtask1" name="Mail Task" activiti:async="true" activiti:exclusive="false" activiti:type="mail">
      <extensionElements>
        <activiti:field name="to">
          <activiti:string>mymail@mail.com</activiti:string>
        </activiti:field>
        <activiti:field name="from">
          <activiti:string>me</activiti:string>
        </activiti:field>
        <activiti:field name="subject">
          <activiti:string>work</activiti:string>
        </activiti:field>
        <activiti:field name="html">
          <activiti:string>to do</activiti:string>
        </activiti:field>
      </extensionElements>
    </serviceTask>
    <sequenceFlow id="flow11" sourceRef="parallelgateway1" targetRef="mailtask1"></sequenceFlow>
    <sequenceFlow id="flow12" sourceRef="mailtask1" targetRef="parallelgateway2"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_myProcess">
    <bpmndi:BPMNPlane bpmnElement="myProcess" id="BPMNPlane_myProcess">
      <bpmndi:BPMNShape bpmnElement="startEventAck" id="BPMNShape_startEventAck">
        <omgdc:Bounds height="35.0" width="35.0" x="60.0" y="160.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="studentAck" id="BPMNShape_studentAck">
        <omgdc:Bounds height="55.0" width="105.0" x="300.0" y="270.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endEventAck" id="BPMNShape_endEventAck">
        <omgdc:Bounds height="35.0" width="35.0" x="690.0" y="280.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="parallelgateway1" id="BPMNShape_parallelgateway1">
        <omgdc:Bounds height="40.0" width="40.0" x="206.0" y="157.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="parallelgateway2" id="BPMNShape_parallelgateway2">
        <omgdc:Bounds height="40.0" width="40.0" x="570.0" y="277.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="mailtask1" id="BPMNShape_mailtask1">
        <omgdc:Bounds height="55.0" width="105.0" x="404.0" y="150.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
        <omgdi:waypoint x="95.0" y="177.0"></omgdi:waypoint>
        <omgdi:waypoint x="206.0" y="177.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
        <omgdi:waypoint x="226.0" y="197.0"></omgdi:waypoint>
        <omgdi:waypoint x="226.0" y="297.0"></omgdi:waypoint>
        <omgdi:waypoint x="300.0" y="297.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
        <omgdi:waypoint x="610.0" y="297.0"></omgdi:waypoint>
        <omgdi:waypoint x="690.0" y="297.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
        <omgdi:waypoint x="246.0" y="177.0"></omgdi:waypoint>
        <omgdi:waypoint x="404.0" y="177.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
        <omgdi:waypoint x="509.0" y="177.0"></omgdi:waypoint>
        <omgdi:waypoint x="590.0" y="175.0"></omgdi:waypoint>
        <omgdi:waypoint x="590.0" y="277.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

Outcomes