AnsweredAssumed Answered

PooledAction & groupAssignee

Question asked by tpeelen on Aug 22, 2007
Latest reply on Sep 10, 2007 by davidc
Hi all,

My purpose is to have a process that assigns a task to a predefined group of people. First one that takes the task prevents others from taking the same task. the group names participating are known and defined on forehand in the process definition…

I have the model:

<model name="wfictu: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.ictu.nl/model/workflow/1.0" prefix="wfictu"/>
  </namespaces>
     
  <types>

     <type name="wfictu:initTask">
        <parent>bpm:startTask</parent>

        <properties>

           <property name="wfictu:juridisch">
              <type>d:boolean</type>
              <default>true</default>
           </property>

           <property name="wfictu:controller">
              <type>d:boolean</type>
              <default>true</default>
           </property>

           <property name="wfictu:directie">
              <type>d:boolean</type>
              <default>true</default>
           </property>

     </properties>

     <mandatory-aspects>
           <aspect>bpm:groupAssignee</aspect>
      </mandatory-aspects>

    </type>

     <type name="wfictu:behandelTask">
        <parent>bpm:workflowTask</parent>

      <properties/>
        <mandatory-aspects>
           <aspect>bpm:groupAssignee</aspect>
        </mandatory-aspects>

     </type>


     <type name="wfictu:inkoopEindTask">
        <parent>bpm:workflowTask</parent>

      <properties/>

      <mandatory-aspects>
           <aspect>bpm:groupAssignee</aspect>
        </mandatory-aspects>

     </type>
     
  </types>
  
</model>

And the process definition:


<process-definition xmlns="urn:jbpm.org:jpdl-3.2" name="wfictu:bewakenvoortgang">

 
  <swimlane name="initiator"/>
  <start-state name="start">
    <task name="wfictu:initTask" swimlane="initiator" />
    <transition name="NaarJuridischeZaken" to="startJuridischeZaken"/>
  </start-state>
 
  <swimlane name="inkoop">
    <assignment class="org.alfresco.repo.workflow.jbmp.AlfrescoAssignment">
          <pooledactors>#{people.getGroup("GROUP_Inkoop")}</pooledactors>
    </assignment>
  </swimlane>

  <swimlane name="controller">
    <assignment class="org.alfresco.repo.workflow.jbmp.AlfrescoAssignment">
          <pooledactors>#{people.getGroup("GROUP_Controllers")}</pooledactors>
    </assignment>
  </swimlane>

  <swimlane name="juridischezaken">
    <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
          <pooledactors>#{people.getGroup("GROUP_Juridische Zaken")}</pooledactors>
    </assignment>
  </swimlane>

  <swimlane name="directie">
    <assignment class="org.alfresco.repo.workflow.jbmp.AlfrescoAssignment">
          <pooledactors>#{people.getGroup("GROUP_Directie")}</pooledactors>
    </assignment>
  </swimlane>
   

   
  <task-node name="startJuridischeZaken">
    <task name="wfictu:behandelTask" swimlane="juridischezaken"/>
    <transition name="NaarController" to="startController"/>   
  </task-node>

  <task-node name="startController">
    <task name="wfictu:behandelTask" swimlane="controller"/>
    <transition name="NaarDirectie" to="startDirectie"/>
  </task-node>

  <task-node name="startDirectie">
    <task name="wfictu:behandelTask" swimlane="directie"/>
    <transition name="NaarInkoop" to="eindInkoop"/>
  </task-node>
 
  <task-node name="eindInkoop">
    <task name="wfictu:inkoopEindTask" swimlane="inkoop"/>
    <transition name="done" to="end"/>
  </task-node>
 
  <end-state name="end"/>
  
</process-definition>


A snippit of the web-client-config-custom.xml:


   <config evaluator="node-type" condition="wfictu:initTask" replace="true">
    <property-sheet>
     <separator name="sep1" display-label="tralala loempia" component-generator="HeaderSeparatorGenerator"/>
     <show-property name="wfictu:juridisch" />
     <show-property name="wfictu:controller" />
     <show-property name="wfictu:directie" />
     <!– show-association name="bpm:groupAssignee" / –>
   </property-sheet>
   </config>
  
    <config evaluator="node-type" condition="wfictu:behandelTask" replace="true">
    <property-sheet>
     <separator name="sep1" display-label="tralala loempia" component-generator="HeaderSeparatorGenerator"/>
     <show-property name="wfictu:juridisch" />
     <show-property name="wfictu:controller" />
     <show-property name="wfictu:directie" />
     <show-association name="bpm:groupAssignee" />
   </property-sheet>
   </config>
  
    <config evaluator="node-type" condition="wfictu:eindInkoop" replace="true">
    <property-sheet>
     <separator name="sep1" display-label="tralala loempia" component-generator="HeaderSeparatorGenerator"/>
     <show-property name="wfictu:juridisch" />
     <show-property name="wfictu:controller" />
     <show-property name="wfictu:directie" />
     <show-association name="bpm:groupAssignee" />
   </property-sheet>
   </config>

The result is dissapointing, I haven't got it running for days. It complains:


ERROR [ui.common.Utils] A system error happened during the operation: Mandatory task properties have not been provided: {http://www.alfresco.org/model/bpm/1.0}groupAssignee
org.alfresco.service.cmr.workflow.WorkflowException: Mandatory task properties have not been provided: {http://www.alfresco.org/model/bpm/1.0}groupAssignee
        at org.alfresco.repo.workflow.jbpm.JBPMEngine$19.doInJbpm(JBPMEngine.java:1034)
        at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:87)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:365)
        at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:333)
        at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:80)
        at org.alfresco.repo.workflow.jbpm.JBPMEngine.endTask(JBPMEngine.java:1017)
        at org.alfresco.repo.workflow.WorkflowServiceImpl.endTask(WorkflowServiceImpl.java:347)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
….

If I include the <show-association name="bpm:groupAssignee" /> in the initTask definition I can select a group. I don't want to, because the groups are predefined…. I noticed a similar question in the forum, but the answer is not really working out (using #{people.getGroup("GROUP_…")}

Anyone a good idea or pointer???

Thanks in advance!

Tjarda Peelen

Outcomes