Recover info onSuccess/OnError from a ProcessModel to an Interface after calling an Integratio

Certified Associate Developer

Hi everybody.

I want to extract information from a ProcessModel, calls from an Interface.


In particular, I want to show a message in case that the integration goes OK or KO.



But I don't know how. And also, the interface show me the "onSuccess" result immediatly after the process'calling.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    To clarify the behavior of how onError works, from the Docs: "The onError parameter will only evaluate if the process fails to start. It will not evaluate if a node in the started process pauses by exception"

    In your screenshot it looks like a Script Task is erroring. Why is that erroring? If your integration smart service node completes successfully (and returns information about any potential errors within it) then I don't see why your Script Task in the screen shot would need to error. 

    Assuming the nodes in the process don't error, then the onSuccess should return the value of the process variables you've specified because you have activity chaining enabled throughout the nodes in the process. If you do not see the updated process variable values reflected after the a!startProcess executes, then it may be security issue. User's need only "initiator" permission to start a process using a!startProcess, but may need the higher level "viewer" permission to actually see process variable values. I would double check security settings of your user / the process model if resolving the script task error doesn't work.

  • 0
    Certified Associate Developer
    in reply to Dan Lluhi

    Thank you so much for that reoly!

    About security, I started the process by myself with admin's priviliges. 
    The error node is exactly a node that made an error in the process, to stop it.


    I tried also removing this error node and launch the process witht the interface scripted like the previous screen but the example local!error remains null().

  • Don't throw an error() in the script task.  Just cause the process to end cleanly.  In your interface you probably want to make sure to capitalize "Error" the same way your pv!Error is capitalized (appian variables aren't usually case sensitive, but here i'm thinking to try it just in case).

Reply Children
No Data