Hello,
by use of a "Raise fault" policy we can halt a flow and return a message back to the caller. Is there something similiar without raising a fault? Something like a "Message End" in CPI? (I want to halt the flow and return a message to the caller when a specific condition is raised, but I don't want this to be shown as "Failed" call in the statistics, but more like a "planned shutdown".)

Request clarification before answering.
I could figure out how to solve my request. Instead of raising a fault message when condition X is true, I added a second routing rule to the proxy endpoint with target "NONE" and condition X as condition. Thus the target endpoint is bypassed if the condition is true. To send out the specific message (the one I originally set up in the Raise Fault policy) I added an Assign Message policy as last step in the Proxy Endpoint PostFlow for the response and marked it with condition X.
Thus the behaviour is:
Thus I can "gracefully stop" (it's not a full stop as in Raise Fault, but a logical stop in the processing flow) the flow without throwing an error that would show up in the monitoring.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
You can change the http.status of the response, but you will need to add the error codes as valid success codes first.
This you can do by adding "success.codes" with values e.g. "2xx,5xx" on the tab "Targend EndPoint" as Target EndPoint Property.
Regards, Cedric
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Cedric,
thanks for your answer. Your method works to "bypass" errors of the target without logging an error in API. What I search for is a bit different. I added my flow to the question above. As you can see there's a point (1) where I check a specific condition. In case the condition is true, I want to send a specific / manually setup message to the caller and the flow. (=Don't call the target endpoint). This behaviour works totally fine by use of the "Raise Fault" policy. (It stops the flow and sends back a response of my favor to the caller.) The only thing I want to change is the "status" which is shown in logging. I want the logging/analytics to count this "stops" as successful api calls.
Can we parametrize the "Raise Fault" policy so that it doesn't count as failed in the statistics? Or is there another policy which is able to gracefully (not throwing an error) stop a flow?
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.