How to write a microflow to extract each object of list object?

1
Hi  I have a situation in which I have list of animals entity then i have created a list of sibling animals from association with animal entity. So Next time when I am creating new sibling animal object i should not able to assign already sibling animals. for example I have lion, tiger, cat, dog, zebra. Sibling Animal object 1 for that i picked tiger and Cat. so next Time if I try to map Tiger with Lion. I should get an error message that tiger is already mapped.   I try to that by using two loops in first loop i am iterating the Sibling animal list and in second loop i am iterating the current object in our scenario tiger and Lion. But i am getting the desired result. How can i write, I am thinking to write third loop in which Individual Animal I should compare but not sure how to acheive
asked
2 answers
1

Hi Shubhransh,

What you can do is, in the second loop, you can add a decision, that whether the first list contains the object or not, if the first list already has the object then dont link it in the second list.

Hope it helps!

answered
1

Hi Shubhransh,

 

What you should do is, to create a list with animals that has no association with a sibling. This would look like a retrieve with an Xpath constrain [animals/animals_sibling = empty] . This will retrieve only the animals that do not have a sibling associated. When using that list for connecting to new animals objects, you can be assure that there was not sibling (animal association) already in place.

 

Good luck with it,

Jan

answered