Hi All,
I have a scenario where I need to write data to multiple tables under single entity.
So I thought of using wmdse
But there s no guarantee that Everytime the data will be there to write in all the mutilple tables which I am planning to write.
So based on condition how can I load the input entity data set and how can I save the stored values into respective cdt data pvs?
TiA
Harsha
Discussion posts and replies are publicly visible
Hi Harsha,
As per my experience with Write to Multiple Data Store Entity, when the value of your data attribute is empty i.e. {} then appian do not store anything into DB. e.g:
{ a!entityData( entity: cons!FIRST_DATA_STORE_ENTITY, data: {} ), a!entityData( entity: cons!SECOND_DATA_STORE_ENTITY, data: type!MY_CDT( id: 1, name: "test" ) ) }
As shown in above code snippet, there will be a transaction to store the data into the entity mapped with SECOND_DATA_STORE_ENTITY constant, whereas another will be skipped as it's data is empty. Hence you need to form the EntityData in the similar way to be used in Write to Multiple Data Store Entity Smart Service.
Also, it's worth checking this link.
Hope this will help.
Hi Harsha, As Alok mentioned, if the data attribute doesn't have any value, that won't be stored into DB. As a best practice, instead of directly calling the Write to Multiple Data Store Entity Smart Service node in the process model in which you want to update, create an utility process model (should contain Write to Multiple Data Store Entity with all the inputs given and outputs configured) and then configure that process model as a Sub Process. You can pass the required variables as parameters. Also, you can get the necessary outputs.
Hope this helps!!!
Thanks, Hema