3 Replies Latest reply on Aug 11, 2010 11:40 AM by John Head - ACP TX

    Need to extract information from Task Result Collection

    Ashok Deivasigamani Level 1

      Hi Friends,

      I have a requirment in which I use "Assign multiple task" so that I send my form to multiple approvers, and each approvers can perform "Approve" or "Reject" operation. The output of the "Assign Multiple Task" is a "Task Result Collection" which has the list of Task Results of each Approvers,

      I need to fetch the data of the users who have rejected the task and create a list of users, so that the initiator of the process can resubmit the form to only those who have rejected the form earlier.

      I don't know or I am not able to find the necessary information on how to retrieve the data from "Task Result Collection".

      Kindly help me out.

       

      Thnaks

      - Ashok Deivasigamani

        • 1. Re: Need to extract information from Task Result Collection
          Jasmin Charbonneau Level 4

          You'll need to create a loop in your process to go through all the Task Result from the Task Result Collection object. Then create another list that will contain the users that have rejected the form.

           

          Here the pseudo code:

           

          1- i = 1

          2- Task Result = Task Result Collection[i]

          3- increment i

          4- loop back to 1 if i < TaskCollection size.

           

          Jasmin

          1 person found this helpful
          • 2. Re: Need to extract information from Task Result Collection
            John Head - ACP TX

            I am also trying to extract information the TaskResultCollection and am not having any luck.  I am using a Flex form.

             

            For testing simplicity, I decided to use an AssignTask activity.  I have ALL 3 output options set as:

            Task Result - variable - result, data type Task Result

            Output data - variable - out_data, data type document

            Task Result Collection - variable - results, data type Task Result Collection

             

            When I look at the completed process using a Recording, I see

            1. out_data (document) is correct and contains the XML that was edited by the user
            2. result (Task Result) has a lot of information, but does NOT contain a formDataXML and I don't see the XML data from my Flex form present.
            3. results (Task Result Collection) has a lot of information, but does NOT contain a formDataXML and I don't see the XML data from my Flex form present.  Include captured data is checked.

             

            Obviously the data was returned, just not in the Task Result where I would of expected it also to be.  How am I supposed to extract the XML that is passed by the Flex form from a Task Result data type?  I will need to do this because my next step is to try this with Assign Multiple Tasks.

             

            What am I missing?

            • 3. Re: Need to extract information from Task Result Collection
              John Head - ACP TX Level 1

              If you coerce the formDataDocument to a document, you can see the XML.  The formDataXML is available, even if you don't see it in the TaskResult. I am guessing that when you access it, it gets computed on the fly?