Unable to start 2 or more smartservice at the same time

Good afternoon,

we have the following requirement and we are unable to solve it:

we need to launch at the same moment two smartservice (a!startProcess and a!deleteFromDataStoreEntities) from an interface when the user clicks on one single button "Delete", but the following error mesage appears:

Interface Definition: Expression evaluation error: An error occurred while executing a save: Expression evaluation error : Attempted to run a second smart service, but only one smart service can be run per expression evaluation. 

The interface is something like that

a!buttonwidgetSubmit(
value: true,
saveInto: {
a!save(ri!boolean, value),
a!startProcess(paraemter to start the process),
a!deleteFromDataStoreEntities(parameter to delete from datastore)
}

OriginalPostID-242872

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer
    @marcoc918 I too have faced the Same issue a Month Ago having same requirement, because if we call more than one smart Service Function At a time Through interface then the first Smart Service function gets Execute well but while executing second one the Page gets Break by raising an Error

    So the solution which i did was, i created a process Model having Parameterised variables required for both the operation and i created the Process Model as per my need, later the same process model i referred using a Constant, and then i used a!startProcess(cons!MyConstant, list of Parameters) function on Each click, which Did my Job.


    So rather than calling a!deleteFromDataStoreEntities and a!startProcess individually, i recommend you better configure Delete From DataStore Entities smart Service in Process Model.


    i Hope this will be resolution of our Query
Reply
  • 0
    Certified Lead Developer
    @marcoc918 I too have faced the Same issue a Month Ago having same requirement, because if we call more than one smart Service Function At a time Through interface then the first Smart Service function gets Execute well but while executing second one the Page gets Break by raising an Error

    So the solution which i did was, i created a process Model having Parameterised variables required for both the operation and i created the Process Model as per my need, later the same process model i referred using a Constant, and then i used a!startProcess(cons!MyConstant, list of Parameters) function on Each click, which Did my Job.


    So rather than calling a!deleteFromDataStoreEntities and a!startProcess individually, i recommend you better configure Delete From DataStore Entities smart Service in Process Model.


    i Hope this will be resolution of our Query
Children
No Data