Saving data to a using gateways, write to data store entities in a process model

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

Parents
  • 0
    Certified Lead Developer

    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. 

Reply
  • 0
    Certified Lead Developer

    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. 

Children