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.

Reply
  • 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.

Children