Hi, Here is my use case.
I am creating a token using a flow hook and storing it in the cache. I have to validate whether the token is expired or not when API is called. If the token is expired I need to invoke the flow hook to generate a token and store in the cache.
Can you please help me with this ?
Thanks in advnace !!
Let's be careful about terminology.
shared flow = a re-usable sequence of policy steps
Flow hook = a way to enforce the invocation of a shared flow
I think you want to invoke a Shared Flow (not a flow hook).
the logical sequence is probably somehrting like:
And I guess you probably can make your way through all of that? It looks something like this:
<Step> <Name>LookupCache-1</Name> </Step> <Step> <Name>FC-ObtainAndCacheToken</Name> <Condition>retrieved_token = null</Condition> </Step> <Step> <Name>CheckExpiry-1</Name> </Step> <Step> <Name>FC-ObtainAndCacheToken</Name> <Condition>retrieved_token.expired = true</Condition> </Step>
Thanks for the response. Actually I pass values to jar file(shared flow) from KVM to generate a token, so when I invoke the KVM when the cache is null or expired does it invoke the next step i.e does shared flow invoke as the next step after we invoke KVM ?
I'm not clear. "Does it invoke the next step?"
The Flow proceeds with each step. If you have a Condition on a step, then the flow may skip that step, depending on the evaluated value of the Condition.
I may be misunderstanding your question.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |