Question

Get multiple ID from sub-process to be process Read Data Object

HIi,

I have a question regarding passing clicked data from list in business process. Using sub-process i was able to get the clicked values ( i think ). 



However i want to pass the value via Read Data for these ID's. I tried several parameter but ended not showing after i click the <?> in the read object. How do i obtain and loop for each of the ID's?



Thanks before!

Like 0

Like

3 comments

Hello,

If I understand your request correctly, you need to read a collection of records in the main process and then pass this collection into a sub-process element. The sub-process will then run as a separate iteration for each of the records.

You can find the specific instructions on how to set up processing of a collection of records in this article:

https://academy.creatio.com/docs/8.x/no-code-customization/bpm-tools/bu…

Hello.

Thanks for the reply. The screenshot i provided is the trace data from the main process, which already gets the selected ID from the list. 

 

However when i try to read the returned ID, it does not show in parameters. How do i read these ID from the Sub Process then proceed to modified them?

 

 

Kevin Samuel,

In Creatio, collection processing works the other way around. You should read the collection of records in the parent process and pass it into the sub-process. The sub-process will then automatically run one iteration per record from that collection. 

Because of that, the returned value is a collection, so it won’t appear as a single Id in Read data.

The correct setup is:

In the parent process: read a collection of records and pass the the collection into the sub-process
In the sub-process: define an input parameter for the current record Id
Use that Id directly in Read data / Modify data within the sub process.

So the sub-process itself handles the iteration. There’s no need to loop or re-read IDs in the parent.

Show all comments