Using the last document in a DocumentReferenceList as BusinessData in MWS/CAF

Hello folks,

my process document looks like this:


parentDoc
  prop1
  prop2
  childDocRefList
    childDocRef[0]
      childProp1
      childProp2
    ...
    childDocRef[n]
      childProp1
      childProp2

How do I declare the childDocRef[n] as BusinessData for a User Task? The User Task will have input fields for childProp1 and childProp2 and should store that in the last childDocRef’s childProp1 and childProp2.

How do you go about that?

I tried to use a service that puts that last childDocRef as a separate variable on the pipeline. CAF would use that an store the variables in there, BUT after the User Task completes, changes to childDocRef are no longer reflected in parentDoc.childDocRefList.childDocRef[n]. Do I have to write a “merge service” to bring that data home?

(It looks to me like the reference between childDocRef and parentDoc/childDocRefList is broken, when the data passes from the process engine to the task engine (or on the way back).)

Best regards,
Andreas

Hi andreas,

Document in question is set as business data in CAF; if i understand correctly.

All the child elements belonging to the document will be available in CAF as supplied.

And you will find the updated document as an output to the TASK step in BPM