write directly from interface to DB

Hi All,
I have developed a SAIL interface that is be able to directly write to DB using the function

a!writeToDataStoreEntity(cons!NCContainmentAction,local!newContainmentAction)

the local!newContainmentAction is an object created locally as

local!newContainmentAction:fn!cast('type!{www.pirelli.com/.../appian}NonConformityContainment',{})

This approach is very helpful because we are able to write directly on DB avoiding many other nodes witch, before using this approach, we used to elaborate data and write to DB
It also seems that SAIL code is simpler and faster to manage because we deal with the object and its attributes

I have never seen this kind of approach in Appian SAIL documentation so I would like to understand if it is correct and if you suggest or not to use it

Thank you in advance

Elia




OriginalPostID-249822

  Discussion posts and replies are publicly visible

Parents
  • Cons, point 1 : we should manage function returned values (successs or error).
    Cons, point 2 : how you said we can you rules to manipulate data and then write to DB ...
    Cons, point 3 : what is the difference if you delegate a smart service to change data ind db?. Nothing avoids that a smart service changes in back ground data that someone is looking in a report or something else ...
    Cons point 4: the button submit is synchronous, it call the function and when the function finishes returning "success" or "error" it goes ahead to execute other statements.. if you try to use a grid structure in a with function you can see the new added or uploaded value direclty in the page :)
Reply
  • Cons, point 1 : we should manage function returned values (successs or error).
    Cons, point 2 : how you said we can you rules to manipulate data and then write to DB ...
    Cons, point 3 : what is the difference if you delegate a smart service to change data ind db?. Nothing avoids that a smart service changes in back ground data that someone is looking in a report or something else ...
    Cons point 4: the button submit is synchronous, it call the function and when the function finishes returning "success" or "error" it goes ahead to execute other statements.. if you try to use a grid structure in a with function you can see the new added or uploaded value direclty in the page :)
Children
No Data