Shared Flow not allowing variables {config.abc} in configuration/XML

Not applicable

Unable to externalize shared flow variable using external flow/env/org variables that can be configured for a different value when the shared flow is used in different flows.

Need some ideas to make this happen.

As a sample this is what is needed. Check the {conf.var.abc} as a sample.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Quota-policy" type="calendar">
    <DisplayName>Quota-policy</DisplayName>
    <Properties/>
    <Allow count="2000" countRef="request.header.allowed_quota"/>
    <Interval ref="request.header.quota_count">{conf.var.abc}</Interval>
    <Distributed>false</Distributed>
    <Synchronous>false</Synchronous>
    <TimeUnit ref="request.header.quota_timeout">{conf.var.cde}</TimeUnit>
    <StartTime>2017-2-23 12:00:00</StartTime>
    <AsynchronousConfiguration>
        <SyncIntervalInSeconds>{conf.var.hjk}</SyncIntervalInSeconds>
        <SyncMessageCount>{conf.var.cde}</SyncMessageCount>
    </AsynchronousConfiguration>
</Quota>

This is possible:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Quota async="false" continueOnError="false" enabled="true" name="Quota-policy" type="calendar">
    <DisplayName>Quota-policy</DisplayName>
    <Properties/>
    <Allow count="2000" countRef="request.header.allowed_quota"/>
    <Interval ref="request.header.quota_count">1</Interval>
    <Distributed>false</Distributed>
    <Synchronous>false</Synchronous>
    <TimeUnit ref="request.header.quota_timeout">month</TimeUnit>
    <StartTime>2017-2-23 12:00:00</StartTime>
    <AsynchronousConfiguration>
        <SyncIntervalInSeconds>50</SyncIntervalInSeconds>
        <SyncMessageCount>50</SyncMessageCount>
    </AsynchronousConfiguration>
</Quota>									
0 1 238
1 REPLY 1

You are not seeing a problem with shared flows. Instead you have an expectation regarding the behavior of the Quota policy that does not reflect the real behavior.

The Quota policy does have some things that can be set via references to variables: Allow, Interval, TimeUnit. But these are denoted with "ref" attributes, except for the Allow, which uses countRef. I'm not sure why it's not consistent. But anyway, you'd need to do this:

<Quota name="Quota-policy" type="calendar">
    <Allow count="2000" countRef="conf.var.allowed"/>
    <Interval ref="conf.var.interval">1</Interval>
    <TimeUnit ref="conf.var.timeunit">month</TimeUnit>
    ...

You cannot set a {curly-braced} variable name in the text value of those elements and expect that the variable gets resolved at runtime. The quota policy doesn't do that, regardless of where or how you set the variables - whether in a shared flow or not.

Also I think the AsynchronousConfiguration is never configurable with variables. You need to specify integers there.

It seems like a very edge use case to want to fiddle with the AsynchronousConfiguration via context variables. Can you explain why you need this?