How to check shared flow existence in Environment Flow Hook through maven plugin ?

Not applicable

Hello Guys,

I have a scenario, where i am bound not to use Apigee UI tool. So following work should be done through the maven plugin only.

Case Study :

First we check a shared flow named DemoFlow exists in the Environment Flow Hook under Pre-Target Flow.

If the shared flow exists

Then do nothing, even do not update the existing shared flow DemoFlow.

If the shared flow does not exist

Then deploy the shared flow DemoFlow as provided with maven plugin, then set it under the Pre-Target Flow of Environment Flow Hook.

0 4 735
4 REPLIES 4

sarthak
Participant V

@Sai Saran Vaidyanathan any thoughts on how this can be done?

Hi @Harsh Sharma

As of now, we do not have Flow hooks enabled in any of our maven plugins (however we are discussing about it)

For your scenario, you will have to write a customized script - something like this

1) Use the "update" option of the maven deploy plugin to deploy the shared flow, so that the revision does not change but make sure the source code of the shared flow in your Version control is up to date

2) Then script calls the Mgmt API to add the shared flow to the flow hook - check "Attach a shared flow to a flow hook" for more details here

To avoid my first point above, you can also have the script first check the shared flow using the GET shared flow call and then call the maven script if sharedflow is not available.

The reason I recommended deploy is to make sure that the shared flow is deployed. It is required that its deployed to include in the Flow hook.

Hope this clarifies.

Hi @Harsh Sharma - Did that clarify ? Any followup questions ? Can you accept this if it answered your question ?

@Sai Saran Vaidyanathan I also have a similar requirement at my end. So, ciuld you please confirm if the maven deploy plugin now supports flow hooks enablement? And, if so, what is the exact process.