Hi,
I have the below scenario. I have a master table to which I have to save the data initially. Later if any of the child tables have data then I need to store into respective tables. Also, I have to save the master table autogenerated key column into the child tables.
Can someone advise, if I have to use any specific smart services to achieve this. Thanks in advance.
Discussion posts and replies are publicly visible
You can add a script task after Master WDSE to prepare data for both of the child tables and set the primary key from Master table in child table fields and then use Write to Multiple DSE smart service to write the data into both child entities at once by passing an array of a!entityData in valueToStore input node.
The best practice here is to not use the WDSE smart service directly in your process but to use a subprocess with a null handling in it.
You may find this useful Write to Multiple DSE smart service, let me know if you have any other queries related to this.
I would not advice using write to multiple DSE that become harder to resue. Instead, use two sub-processes, one for each child table, and write the values. That way, you will be able to reuse these sub processes in other parts of the App as well where you may want to write values in any one of both of these tables.
Indeed absolutely.
I recommended WMDSE just because he/she asked if there is any specific smart service for this.
Is it recommended to use subprocess for WMDSE and create a pv! of type entityData? that way it can be reusable up to some extent.