Passing on association with microflow

1
Hi all, I have the following task at hand: I have an OrderLine with associated BoMItems. User shall be able to create an workOrder. The workOrder is a new entity and contains some attribute data from OrderLine and others. I would also like to pass on the association "OrderLine => BoMItems" to the workOrder entity (workOrder => BoMItems). In the domain model the association is established. I have created a microflow to create a new workOrder object and to copy data from OrderLine. But how can I pass on the association? Many thanks in advance!
asked
2 answers
1

When the type of association is the same (1..* or ...) than you should be able to set/add the reference in workOrder-BoMItems based on OrderLine-BoMItems. I miss the context, but when there is an association between workOrder and OrderLine, you can always retrieve the association between OrderLine and BoMItems instead of setting the association. This will keep your domainmodel less redundant.

answered
0

Tim

If you pass the OrderLine entity into your microflow and it has objects set in the OrderLine=>BoMitems association, you can retrieve the list of items in that association (in your microflow) and set the value of workOrder=>BoMItems to the resulting list. In other words, when you pass an object into a microflow, you are able to access all of the associations of that object.

Food for thought, if workOrder object is associated to OrderLine object(s), you can also access the associated BoMitems objects via retrieves at any point in your app. In other words, you don't need to propogate that association to the workOrder. You may choose to propogate it if you wish, but will then need to ensure that the 2 associations stay synchronized (i.e. if you change the value of OrderLine=>BoMItems association after a workOrder has been created, you may need to update the workOrder=>BoMItems association.

Hope that helps,

Mike

answered