cancel
Showing results for 
Search instead for 
Did you mean: 

Fork-Join, how to send different set of properties?

addonin
Champ in-the-making
Champ in-the-making
I have workflow model with set of properties, for example, prop1…prop4. How can I using fork send or made visible only prop1,prop2 for first assignee and prop3,prop4 for second respectively. At the same time join must send all the set of workflow properties for receiver. I use JBPM engine. Thanks!
6 REPLIES 6

addonin
Champ in-the-making
Champ in-the-making
I forgot to add - both subset of properties described in a separate aspects.

mitpatoliya
Star Collaborator
Star Collaborator
You can configure the set of properties to be shown during particular task in
web-client-config-custom.xml (for explorer)
share-config-custom.xml (for share).
Let me know if there is any other problem.

addonin
Champ in-the-making
Champ in-the-making
Thaks for help! I knew about this files, they are for configuring visibility and appearence of properties, but the question is how assignees can get different set of aspects?

addonin
Champ in-the-making
Champ in-the-making
IT director send task:
<task name="astWfItRequest:itDirectorConsider" swimlane="itDirector" />
    <transition name="approve" to="departmentFork">
        <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <runas>admin</runas>
            <script>
                &lt;import resource="/Company Home/Data Dictionary/Scripts/astItRequest.js"&gt;
                getExecutorList();
            </script>
        </action>
    </transition>
    <transition name="reject" to="revise"/>

Model for this task: 
<type name="astWfItRequest:itDirectorConsider">
  <parent>bpm:workflowTask</parent>
    <mandatory-aspects>
     <aspect>astItRequest:requestProperties</aspect>
     <aspect>astItRequest:accessProperties</aspect>
     <aspect>astItRequestSmiley TongueermissionProperties</aspect>
     <aspect>astItRequest:equipmentList</aspect>
   </mandatory-aspects>
</type>

Fork, departments get all aspects (but I want different departments get different set of aspects): 
<node name="departmentFork">
    <action class="org.alfresco.repo.workflow.jbpm.ForEachFork">
        <foreach>#{departmentassignees}</foreach>
        <var>nextexecutor</var>
    </action>
    <transition name="toExecution" to="execution"/>
</node>

Task execution: 
<task-node name="execution">
    <task name="astWfItRequest:executionTask">
        <assignment actor-id="#{nextexecutor}"/>
        <event type="task-create">
            <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                …
            </action>
        </event>   
    </task>
    <transition name="toItDirectorJoin" to="itDirectorJoin">
        <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
         ….
        </action>
     </transition>
</task-node>

Join:
<join name="itDirectorJoin">
     <transition name="toITDdrector" to="itDirectorAdoption">
</join>

How can I sent different set of aspects?

mitpatoliya
Star Collaborator
Star Collaborator
There are various ways you can achieve this
create two different tasks for different department which run parallel.
This way you will be able to configure diff set of properties.
In the next task you can join both of them.
I think your processdefinition code is not posted properly please do that to give us more idea.

addonin
Champ in-the-making
Champ in-the-making
Thank you for advice, it's very useful - it seems my workflow starts to work properly!