I have this domain model: http://imgur.com/P0uJbsy The owner of the application manages the TemplateProducts, these are the base version of my products. After I created a new customer a subset of these templates products should be added to the CustomizedProducts list of the customer. You then give the customer control over his CustomizedProducts. It should be the case that wen a customer changes his products this only happen to the products in his CustomizedProduct list. How can I copy the entities from the TemplateProducts to the CustomizedProduct list and make it work that this list applies to the specific customer only? It should be done by a microflow I think, but in which way? If possible provide an image or clear explanation of the steps. Thanks in advance.
If it is just copying the objects why don't you create a microflow that does the following:
retrieve all the templateproducts to copy
loop over these templateproducts in a loop activity.
per looped item create a new CustomizedProduct, and copy all attribute values
also set the association CustomizedProduct_Customer to the customer that gets ownership
make sure to add the new customizedproducts to a list that you then commit in a commit event outside of the loop.
That's it, if you don't want to manually copy all attributes you can use the copyAttributes function in the CommunityCommons appstore module.