4 Replies Latest reply on Jul 17, 2007 10:42 AM by (James_Dee)

    Two XDPs, one XSD, one Workflow

    Level 1
      Is the following scenario supposed to work in WorkSpace ES or not?

      One Workflow Process, uses two XDP forms.
      Form A has 20 fields,
      Form B has 70 fields,
      they both use the same XSD Data Connection, this XSD has 100 simple elements.

      20 fields on A are mapped to 20 elements in the XSD.
      70 fields on B are mapped to 70 elements in the XSD.

      10 of the fields on A and 10 of the fields on B
      are mapped to the same 10 elements in the XSD.

      First User task, uses Form A;
      2nd User task, switches to Form B.

      Will the values in those 10 fields on A be paased to the 2nd User task and show up on Form B?

      This didn't work in my test. But I don't know if it's my server's problem or what, hence I ask here.

        • 1. Re: Two XDPs, one XSD, one Workflow
          Jasmin Charbonneau Level 4
          You can definitely use the same schema for different XDPs using different fields.

          The part you're missing (I think) is to assign the data from the FormA variable to the FormB variable you're probably using on the second user operation.

          You're probably using two user operations where
          for user A, you set the input and output mapping to FormA variable and
          for user B, you set the input and output mapping to FormB variable.

          The problem is there is no place where you specify that the data element for FormB has to equals the data element from FormA.

          To achieve that, you can have an intermediate setValue operation that will make sure to set the data element of the FormB variable to FormA. Something like:

          /process_data/xfaFormB/object/data = /process_data/xfaFormA/object/data

          This way your second XDP contains the same data as the first XDP.

          Something else you can try (I've never tried it myself) is to set the Output Form Data (from Form Data Mappings) to be the Form B variable on the first user operation. That might work and would be a better solution. I'll give it a try on Monday.

          Let me know.

          • 2. Re: Two XDPs, one XSD, one Workflow
            Level 1
            yes Jasmin, that makes sense. I shall try that. thank you.

            I want to mention though, in LC-7, I didn't need to do the SetValue. I could use one Form Variable, and at the User QPAC, it has an option for me to select another form. But I can't find this feature in ES anymore...
            • 3. Re: Two XDPs, one XSD, one Workflow
              Jasmin Charbonneau Level 4
              That LC 7 option might be replaced with the second option I just explained(setting the output Form Data from Data Mappings).

              • 4. Re: Two XDPs, one XSD, one Workflow
                Level 1
                I tried the "SetValue" method, and it worked. Thanks Jasmin.

                I also tried the "Output Form Data mapping", but it did not work. Somehow the User task #2 displayed Form A, even though its "Input" form variable was set to Form B. And the Output form mapping was set to Form B at task #1 as well.

                But that's ok. As long as the "SetValue" works, it's fine. Because, suppose I have multiple routes coming out of Task #1, and there are multuple User tasks (each uses different forms sharing the same XSD) downstream, I think I'll still need to use the "SetValue" method anyway.

                I still hope ES could merge this extra SetValue step into the User task property sheet...much like what LC-7 had.