cancel
Showing results for 
Search instead for 
Did you mean: 

Show property of previous Task

jayjayecl
Confirmed Champ
Confirmed Champ
Hi, I'd like to manage to show a property of a previous task.

To be clear, let's say I have the simplest workflow : 2 steps only : submitCustomWF and ApproveCustomWF
Let's say I have added a custom text property ("fca:eimms") to the submitTask, that the intiator has to fill in.

How could I show the property that was entered in the next step.

My Model :

<types>

     <type name="fca:submitPoc1Task">
        <parent>bpm:startTask</parent>
         <properties>
           <property name="fca:eimms">
              <type>d:text</type>
           </property>
        </properties>

   <overrides>
      <property name="bpm:packageActionGroup">
   <!–     <type>d:text</type>  –>
        <default>add_package_item_actions</default>
      </property>
   </overrides>
   <mandatory-aspects>
           <aspect>bpm:assignee</aspect>
        </mandatory-aspects>
     </type>

     <type name="fca:poc1Task">
        <parent>fca:basePoc1Task</parent>
   <overrides>
      <property name="bpm:packageActionGroup">
   <!–     <type>d:text</type>  –>
        <default>read_package_item_actions</default>
      </property>
   </overrides>
     </type>
     
  </types>


My webclient-config :

<config evaluator="node-type" condition="fca:submitPoc1Task" replace="true">
   <property-sheet>
      <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
      <!– <show-property name="bpm:workflowDescription" component-generator="TextAreaGenerator" /> –>
      <show-property name="bpm:description" component-generator="TextAreaGenerator" />
     <!– <show-property name="bpm:workflowPriority" /> –>
      <separator name="sep2" display-label-id="users_and_roles" component-generator="HeaderSeparatorGenerator" />
      <show-association name="bpm:assignee" />
      <show-property name="fca:eimms"/>
   </property-sheet>
</config>

<config evaluator="node-type" condition="fca:poc1Task" replace="true">
   <property-sheet>
      <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
      <show-property name="bpm:taskId" />
      <show-property name="bpm:description" component-generator="TextAreaGenerator" />
      <show-property name="bpm:status" />
   </property-sheet>
</config>

Here is what I tried :
- 1/ just add <show-property name="fca:eimms"/> to the second task.
Of course, it could not work as this property was not part of the type of this second task
- 2/ I then naively tried to add the property "fca:eimms" to the type of the second task (in the model). It could not work, as it failed to parse the model (doublon for this property)
- 3/ I then tried to have those two tasks heritate of a custom type (and not of bpm:startTask)
 <type name="fca:basePoc1Task">
        <parent>bpm:startTask</parent>
   <properties>
           <property name="fca:eimms">
              <type>d:text</type>
      
              <default></default>
         <constraints>
      <constraint ref="list:eimms" />
         </constraints>

           </property>
        </properties>
   <overrides>
      <property name="bpm:packageActionGroup">
   <!–     <type>d:text</type>  –>
        <default>add_package_item_actions</default>
      </property>
   </overrides>
   <mandatory-aspects>
           <aspect>bpm:assignee</aspect>
        </mandatory-aspects>
     </type>

Then, they both have the property "fca:eimms"… I then set up the web-client-config so that this property is read-only on the second task screen… but of course on this screen I hava no data for fca:eimms, because this property from first task and this same property from second task are separate and do not hold the same data.

Then, How can I achieve what I am trying to ?
6 REPLIES 6

jayjayecl
Confirmed Champ
Confirmed Champ
I also tried the following :

SECOND TASK :
 <task-node name="step1">
   <task name="fca:poc1Task" swimlane="assignee"/>
   <event type="task-create">
            <script>
               if (fca_eimms != void) taskInstance.fca_eimmsBis = fca_eimms;
      </script>
   </event>
      <transition name="endName" to="end"/>
   </task-node>

where fca:eimmsBis is a property of this second task. It is not working :
"Caused by: Sourced file: inline evaluation of: ``                   if (fca_eimms != void) taskInstance.fca_eimmsBis = fca_eimms;               ;'' : 
Field access: bsh.ReflectError: No such field: fca_eimmsBis : at Line: 2 : in file: inline
evaluation of: ``                  if (fca_eimms != void) taskInstance.fca_eimm
sBis = fca_eimms;               ;'' : taskInstance .fca_eimmsBis"

jayjayecl
Confirmed Champ
Confirmed Champ
In order to be really CRYSTAL CLEAR let's just try to find an answer to this question (you can forget the previous messages if they're too hard to understand) :
"in the adhoc process example", how could we manage to display in the "wf:adhocTask" screen (second step) the value of "wf:notifyMe" that was set by the initiator during the first phase ?

Thank you all, that problem is breaking my nerves

jayjayecl
Confirmed Champ
Confirmed Champ
Please …
I can't be the only one willing to show a property - that was entered on the first form / first task - on the other steps ????

jayjayecl
Confirmed Champ
Confirmed Champ
found the solution :


<task name="fca:poc1Task" swimlane="assignee">
   <event type="task-create">
            <script>
               if (fca_eimms != void) taskInstance.setVariable("fca_eimmsBis", fca_eimms);
      </script>
   </event>
      <transition name="endName" to="end"/>
   </task-node>
</task>

cleseach
Star Contributor
Star Contributor
Hi,

- 3/ I then tried to have those two tasks heritate of a custom type (and not of bpm:startTask)
That's the right way.
What went wrong when you tried it ? What was your exact configuration ?

Regards,
Charlse Le Seac'h

jayjayecl
Confirmed Champ
Confirmed Champ
Well, I can't tell you because I did it wrong : in fact, the custom type I made was heritating of bpm:startTask … and then my two tasks was children of it, which is wrong because my second task should be a child of bpm:workflowTask.

Then, it did not work out, and as I thought it as really the dirty way to do what I needed, I got back to basic bpmModel, and tried again with a better way.