multiple smart services are not working in single save into

Certified Senior Developer

hi team,

we are trying to run 2 smart services in signle saveinto but one smart service is running in the backend but 2 nd smart service not working, is that validation in appian?or did i missed anything, could you please suggest me?

thanks

  Discussion posts and replies are publicly visible

  • +1
    Certified Lead Developer

    The best approach here would be to move the writeRecords logic into the process model itself.

    Appian only allows one smart service per expression evaluation in an interface. Even if you try to run the second smart service (like writeRecords) inside the onSuccess of a!startProcess(), it will still trigger the same error because both smart services are being evaluated in the same context.

    This limitation is clearly documented in Appian’s official documentation:

    Note: While you can use any number of saves, only one smart service can be executed in an interface saveInto parameter.
    Executing Smart Services

    To avoid this, it’s best to move the logic into the process model. That way, your interface stays clean, avoids evaluation errors, and aligns with Appian’s best practices.

  • 0
    Certified Lead Developer

    This is by design (though sometimes it does seem like overkill) - their intent is to keep developers from throwing a whole string of smart services into one save, thereby overloading the system.  I do sometimes wish they'd extend the limit to 2 or 3 instead of 1, but alas...

    The "official" method of doing this when needed is to invoke a process model which, of course, can generally perform as many as you want.