Js Files is executing after response sent to client.

I am using a shared flow for error handling, which contains a js file for formatting the response. Its is working fine all the time, but its not working when i get 503 (target server was not enabled)

{ "fault": { "faultstring": "The Service is temporarily unavailable", "detail": { "errorcode": "messaging.adaptors.http.flow.NoActiveTargets" } } }

please find attached image of flow. js file is executing after response sent to client.

10160-flow.png

0 5 182
5 REPLIES 5

its not working when i get 503 (target server was not enabled)

What specifically are you observing that leads you to say "it's not working"?

You have a shared flow... is the shared flow executing in the case in which "it's not working"?

You said you configured the shared flow for error handling. How is it attached? Are you using faultrules? Which endpoint, target or proxy? What condition if any do you have attached to the sharedflow? Can you show the relevant configuration?

It looks to me that the entire flow you're showing is the request flow. There is nothing attached in the response flow. I don't know if that observation helps you at all.

the shared flow is working fine all the time. but when a 503 error is raised (i.e target server is not enabled) the js file is executing after the response sent to client. you can find the same thing in the screenshot i.e see the js file is executed after response sent to client.

can you attach the proxy bundle?

I haven't seen this behavior before. Either there is an error in the trace output, or the JS policy really is executing after the client gets the message. The latter case would be an extraordinary bug.

We'd need an example of a proxy that reproduces the behavior, in order to determine which it is.

I've seen this behaviour before. What's the version if you are using on-prem?

Can you attach the proxy bundle?