cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying data in different Tasks

mitschi
Champ in-the-making
Champ in-the-making
Hi,

I have a little problem with my workflows. Smiley Sad

I tried to display Data in a Task, which was entered a Task before. For Example:

In Task A i set a date and the following task B should only display the date given by Task A. I tried to access those variables through process instance variables by using the <controller> and <variable> Tags in the processdefinition file and also without that.

Which variables are accessible by default and how can i access them? (I read about the "standard" variables like bpm:dueDate or bpm:description but i can't access these either)

How can I force my data, beeing entered in Task A, to be visible to Task B, and how can Task B access this data?

Here are parts of my Definition Files:

processdefinition:
TASK A:

<task name="rso:submitReviewTask" swimlane="initiator" >
           <controller>
              <variable name="gleittagdatum" access="read,write" mapped-name="rso_gleittagdatum"/>
           </controller>
        </task>


TASK B:
<task name="rso:reviewTask" swimlane="reviewer">
            <event type="task-create">
              <script>
                 taskInstance.gleittagdatum = rso_gleittagdatum;
                 taskInstance.test = 5;
              </script>
          </event>
        </task>

Workflow Model:
 <type name="rso:submitReviewTask">
         <parent>bpm:startTask</parent>
         <properties>
            <property name="rso:gleittagdatum">
               <type>d:date</type>
               <mandatory>true</mandatory>
            </property>
         </properties>
         <mandatory-aspects>
            <aspect>bpm:assignee</aspect>
         </mandatory-aspects>
      </type>

AND

      <type name="rso:reviewTask">
         <parent>bpm:workflowTask</parent>  
         <properties>
            <property name="rso:gleittag">
                <type>d:date</type>
                <mandatory>true</mandatory>
            </property>
            <property name="rso:test">
               <type>d:int</type>
            </property>
         </properties>
         <overrides>
            <property name="bpm:packageItemActionGroup">
               <default>edit_package_item_actions</default>
            </property>
         </overrides>
      </type>

And finally web-client-config-custom.xml :
   <config evaluator="node-type" condition="rso:reviewTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label="Datenangabe" component-generator="HeaderSeparatorGenerator" />
         <show-property name="rso:gleittagdatum" display-label="Tag"/>
         <show-property name="rso:test" display-label="Test"/>
         <show-property name="rso:create" display-label="Ersteller" />
      </property-sheet>
   </config>

Thanks for helping,
Mitschi
4 REPLIES 4

mrogers
Star Contributor
Star Contributor
There are property values for the workflow and property values for each task.   When a task starts or ends it can transfer property values to/from the workflow.

What you need to do is to make sure that at the end of task A the property value updates the workflow and when task b starts with the value from the workflow.

If you have the equivalent of "global variables" for a workflow its easiest to put them into an aspect which is shared by all tasks in your workflow.

mitschi
Champ in-the-making
Champ in-the-making
Thank you for your very quick answer. I'm gonna try your aspect suggestion and i will report whether i was succesful or not.

Cheers,
Mitschi

mitschi
Champ in-the-making
Champ in-the-making
Hello again,

i've created a aspect with those properties and now everything is working perfektly Smiley Happy  (for those who have same troubles like me)

thank you again for your help

cheers,
mitschi

hyperation
Champ on-the-rise
Champ on-the-rise
Hi,

Can you give me an example of how you did it in aspects?

Thanks
Smiley Happy