Why shared flow is not supported in PostClientFlow

Hi,

I am wondering why shared flow is not supported in PostClientFlow? I have message logging in the post client flow and it is common across all the API proxies. So this is an ideal usecase where we should be using shared flow. Is there any reason why this is not supported?

Thanks,

Krish

2 13 1,028
13 REPLIES 13

Save the proxy as new revision and deploy. APIGEE confirmed that it is an UI issue. I tried this and worked out for me.

Nope, its not working, still i can deploy a new revision, but no use of it

@Krish

Were you able to call MessageLogger policy inside a shared flow from a PostCilentFlow? I am trying to achieve this, but I don't see the ML policy being executed.

Thanks in Advance,

Siva Appali

Hi @Venkata Siva Ram Prasad Appali I am using Message Logger Policy inside Sharedflow which is used in Post Client flow, make sure your host and port are open and working. that should be the only issue.

@bhanumurthyuriti

- Appreciate the prompt resopnse! I am using the ML to log to Loggly and was able to get this executed directly, but failing via SharedFlow from a PostClient Flow.

Let me try a simple message with one or two variables and see.

Will update this forum .

Thank you,

Siva Appali

What error are you seeing? is policy skipping ?

Hi BhanuMurthy,

I don't see any error , I rather see 200 OK in the trace when the SF is executed in the PostClientFlow.

8879-trace.jpg

Let me paste here what I have in the SF/ML policy -

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<MessageLogging async="false" continueOnError="false" enabled="true" name="ML-log-to-loggly">
    <DisplayName>ML-log-to-loggly</DisplayName>
    <Syslog>
        <Message variablePrefix="%" variableSuffix="#">
		[%private.logging_key#@41058 tag="apigee-edge-syslog" tag="%environment.name#" ]
			{
			"messageId":"%messageid#",
			"environmentName":"%environment.name#",
			"requestVerb":"%log.request.verb#"
			}
		</Message>
        <Host>logs-01.loggly.com</Host>
        <Port>514</Port>
        <FormatMessage>true</FormatMessage>
    </Syslog>
</MessageLogging>

The same works very well in all other flows and even in the PostClientFlow directly, but I am surprised what am I doing wrong here. Is there anything obvious that I am missing?

Thank you,

Siva Appali

and also I don't see any message logging policy triggered in your trace, I am pretty sure its configuration problem

Can you also add <Protocol></Protocol> and test, because For sending syslog messages over TLS/SSL, only TCP is supported.

Hi BhanuMurthy,

I tried adding Protocol element as well, but it did not help, not sure why.

However it works even without that when I use the ML policy directly in the PostClientFlow.

Also, I developed a simple no-target proxy and a sf-logging-v1 bundle to test this out. Even in this simple proxy, ML is logging to Loggly but when I attach Flow CallOut to sf-logging-v1 in the PostClientFlow, it is not executing the ML policy within it.

I am attaching both the proxy and sf bundle here. Would you please execute this in your environment and see the difference that I am facing ?

Note: Please replace the loggly key with your env specific if you are trying.

Thank you,

Siva Appalino-target-rev4-2019-07-23.zipsf-logging-v1-rev2-2019-07-23.zip

missing step in your shared flow

<Step>
        <Name>LogToSyslog</Name>
    </Step> 

Please add step and name of the ML policy in default policy on your shared flow.

Good morning @Ravindra Singh , that's the step I missed, never noticed it 🙂

Thank you, it helped.

Thank you @bhanumurthyuriti as well for promptly answering my questions.

Glad to hear that small hint helped you.