IData document and Recursive Flow

Hi,
I have a flow service (we will named fs1 which call another flow service fs2 which all fs1 recursively.
In fs2 I have a document (we call doc1).

In first step doc1 is initialized with value (for instance value1).
In second step doc1 is initialized with another valuer (for instance value2).

After debuging the service I see after calling fs2 the value of my doc (which must be value1) because we come back in first step is value2 and I don’t understand why.

Sorry sorry sorry,
It’s me,
Obviously my document was not correctly dropped in my sub call of fs1

Hi Vital,

you can try to invoke the service by using a map step with transfromer instead of direct invoke.

This will ensure proper handling of the inputs/outputs of the service being called.

Regards,
Holger

OK I noticed it

Calling the service via trasformer or via invoke will not affect how the doc is handled. If you pass the doc into the call and then change a value inside the doc, you will change the value in the original since the doc is passed by reference. Drops will not help here, only a deep copy (clone).

I am completely agree with you fml2. I think I thougt the same thing when you post you reply.
Instead of put my value value1 to doc1 with a map step.
I define value in previous step doc1 to void. (As we make Something like IData doc1 = new IData(); in Java to instance an object. Even if it is not possible in this case because IData is an interface).
And thats work.
Because if I do not this, I do doc1.value = value1; (in Java) and if my doc1 exist as reference it is modified.