1 Reply Latest reply on Dec 27, 2010 9:35 PM by $Nith$

    How to set programatically set instructions for drafts of initial tasks?

    Filipe Toscano

      Good afternoon,


      The use-case is:

      • User logs into workbench;
      • Starts a process, fills in the form, and presses Save: this creates draft #1. Closes form;
      • Starts the same process, fills in the form with different data and presses Save: this creates draft #2. Closes form.


      If the user now navigates to the Todo/Drafts, he will see two drafts with empty instructions. The goal is to have the task cards of the drafts of initial tasks containing a summary/outline of the data that the user filled in. This would allow the user to scan through his drafts and quickly select the desired draft.


      Please note that this is completely different from defining, in the process, a default instruction: that would be a fixed value. Moreover, since initial tasks are not yet associated with a process, it is not possible to use process variable expansions using the {$$} syntax. As such, these instructions are *fixed* values, and not dynamically associated with the data.


      The following attempts have been performed/evaluated:


      Setting SwfConnetor.task.instructions

      The .task property of the SwfConnector does have an instruction property. Furthermore, it is possible to change this value in Flex/AS and the workbench application does show the updated instruction. However, this value isn't saved: if we force a reload of the page, we see that the instruction has reverted to the initival value (ie, whatever was defined in the process definition).

      <lc:SwfConnector id="lcConnector" />

      private function taskInfoInst_onClick( event: MouseEvent ) : void
           lcConnector.task.instructions = "Instructions from Flex";

      The failed concept was that task.instructions would be set during the SwfConnector/@formSaveDataRequest callback.



      Use of Java API

      I could only see a setInstruction() method associated with the CreateTaskInfo class. This is not usable in the specific use case since we're not *creating* the task ourselves, we just want to update the instruction.


      Is this possible? Have I overlooked some base functionality?