Question

Business Process Loop for Read Data Element

I have a newbie question related to reading data.  The read data element has the mode called "Read the first record in the selection", but what if you want to read through the entire result set and pass one record at a time to the next element?  I seem to missing something fundamental here.  The next element in line seem to only read the first record in the collection: "Read Contacts.First item of resulting collection.Id".  How do you loop a record collection?

The start type is "Simple" in my case.

 

 

Like

5 comments

Hi John,

In your case you can use just one Read data element to filter the activities by the contact who follows your conditions. In such a way one activity record will be selected to pass it to the next element.

For example,

Regards,

Lily

I should of showed more or told you what I'm trying to acheive. ​​ I want to find out what customer contacts i have not talked to in 30 days and create a new call task for the owner of the contact.  My technical question or newbie question is trying to understand "Read the first record in the selection​", is this a loop or will you always only get the first record?

Other words, if there is more than one record returned, does the read data keep looping and passing the record information to the next element until done?   

 

 

 

Dear John,

To fulfill your need, you can use just Add data element. Here is the more detailed info about this element: https://academy.bpmonline.com/documents/technic-bpms/7-9/add-data-process-element

The example of the process is below:

The example columns to be set on the Activity page for each record:

As a result, for each contact, who doesn't have activities of call type created during the previous month, a new activity with the corresponding columns filled in will be added. 

If you have any additional questions, feel free to ask.

Best regards,

Lily

 

Thanks for the insight and solution, I just realized I went about the whole thing the wrong way.  I need to get to know how each component or element works. The add data can define the collection for selection, the light just went on for me.

Thanks John

 

John Adkins,

 Hey mate,

 

Just wondering how were you able to solve this. Stuck in similar situation and can't seem to find any solution.

Cheers.

Show all comments