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
hi marco.basolu you want display success message in interface if integration is successful? Am I correct
marco.basolu If you are expecting error node data output to come to the interface using fv!processInfo.pv.error, that is not possible AFAIK. Do you want the Integration Node output data in the Interface?
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.
Correct. And I want also that shows me an error message in case of KO.
For your question yes, I want a way to show in the interface a message that confirm the result of the integration.
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().
marco.basolu Then you can get the data output of integration in interface using processInfo.pv.name_of_pv.Remember this while implementing: Smart service follows activity-chaining, completing only when the activity chain is complete or broken. The smart service then returns the process variables as of the completion of activity chaining through the processInfo.pv output.
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).