cancel
Showing results for 
Search instead for 
Did you mean: 

My workflow doesn't get to the second node

roseta
Champ in-the-making
Champ in-the-making
I'm creating my first customized workflow. It is the same that the 'out of the box' xample called Adhoc. I have almost the same code, with the same nodes and steps, I've only changed some names. Everythings executes perfectly with apparently "no errors" but, when the initiator of the workflow asing the task to another user, this user does not recieve the workflow. Can anyone help me? Did I miss something? I've also followed the WorfklowAdministration explanation in the wiki and I don't see any differences. I attach my code here:


my-processdefinition.xml
<?xml version="1.0" encoding="UTF-8"?>

<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="mywf:mywf">

   <swimlane name="initiator"/>

   <start-state name="start">
      <task name="mywf:submitAdhocTask" swimlane="initiator"/>
      <transition name="" to="adhoc"/>
   </start-state>
  
   <swimlane name="assignee">
        <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
            <actor>#{bpm_assignee}</actor>
        </assignment>   
    </swimlane>
  
   <task-node name="adhoc">
      <task name="mywf:adhocTask" swimlane="assignee"/>
    
      <transition name="" to="completed"/>
   </task-node>
  
   <task-node name="completed">
      <task name="mywf:completedAdhocTask" swimlane="initiator"/>
      <transition name="" to="end"/>
   </task-node>
     
   <end-state name="end"/>
  
</process-definition>


my-workflowmodel.xml

<?xml version="1.0" encoding="UTF-8"?>

<model name="mywf:workflowmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

  <imports>
     <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
     <import uri="http://www.alfresco.org/model/bpm/1.0" prefix="bpm"/>
  </imports>

  <namespaces>
     <namespace uri="http://www.alfresco.org/model/adhocgroupworkflow/1.0" prefix="mywf"/>
  </namespaces>
     
  <types>


     <type name="mywf:submitAdhocTask">
        <parent>bpm:startTask</parent>
        
        <properties>
           <property name="mywf:notifyMe">
              <type>d:boolean</type>
              <default>false</default>
           </property>
        </properties>

        <mandatory-aspects>
           <aspect>bpm:assignee</aspect>
        </mandatory-aspects>
     </type>

     <type name="mywf:adhocTask">
        <parent>bpm:workflowTask</parent>
     </type>

     <type name="mywf:completedAdhocTask">
        <parent>bpm:workflowTask</parent>
      <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
    </type>
     
  </types>
  
</model>



web-client-config-custom.xml
<alfresco-config>
         
               
<config evaluator="node-type" condition="mywf:submitAdhocTask" replace="true">
   <property-sheet>
      <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
      <show-property name="bpm:workflowDescription" component-generator="TextAreaGenerator" display-label-id="description"/>
      <show-property name="bpm:workflowPriority" display-label-id="adhocPriority"  />
      <show-property name="bpm:workflowDueDate" display-label-id="mywf_adhocDueDate"/>
      <show-property name="mywf:notifyMe" display-label-id="adhocNotifyMe"/>
      <separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator" />
      <show-association name="bpm:assignee" display-label-id="mywf_assignee"/>
   </property-sheet>
</config>

<config evaluator="node-type" condition="mywf:adhocTask" replace="true">
   <property-sheet>
      <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
      <show-property name="bpm:taskId" />
      <show-property name="bpm:workflowDescription" component-generator="TextAreaGenerator" />
      <show-property name="bpm:status" />
      <show-property name="bpm:dueDate" />
      <show-property name="bpm:priority" />
   </property-sheet>
</config>

<!– I have only two dialogs, since the second one does not executes in fact–>


</alfresco-config>



mywf-context.xml

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>

<beans>

    <bean id="adhoc.group.workflowBootstrap" parent="workflowDeployer">
      <property name="workflowDefinitions">
         <list>
            <props>
               <prop key="engineId">jbpm</prop>
               <prop key="location">alfresco/extension/my-processdefinition.xml</prop>
               <prop key="mimetype">text/xml</prop>
               <prop key="redeploy">false</prop>
            </props>
         </list>
      </property>
      <property name="models">
         <list>
               <value>alfresco/extension/my-workflowmodel.xml</value>
         </list>
      </property>
      <property name="labels">
         <list>
               <value>alfresco/extension/my-messages</value>
         </list>
      </property>
   </bean>

</beans>


I would really appreciate any comment, thanks in advance! 😃
6 REPLIES 6

thestorm
Champ in-the-making
Champ in-the-making
maybe I'm totaly wrong now since I'm also new to this, but dont u need a transition to reassign the workflow to another user?

roseta
Champ in-the-making
Champ in-the-making
I have the transitions in "my-processdefinition.xml" From "start" to "adhoc", from "adhoc" to "completed" and form "completed" to "end". Did you mean that? Or anything else?

thestorm
Champ in-the-making
Champ in-the-making
Dont you need one from adhoc to start since thats the reassign?!

roseta
Champ in-the-making
Champ in-the-making
Do you mean a transition from the second node "adhoc" to the first node "start"??? But… Why? I dont want to go back? From the first node I want to go to the second; from the second I want to go to the third "completed"… not back to "start" again, that would be a loop, not a workflow! I think… Do you get me now?

Any more ideas, please??? 😃

thestorm
Champ in-the-making
Champ in-the-making
Okay sorry, got you wrong, how do you assign the value bpm:assignee ??

roseta
Champ in-the-making
Champ in-the-making
I reinstalled Alfresco and suddenly it worked! Thanks anyway 😃