Find all references to a service that is enabled


to find all references in services to “savePipeline” which are enabled, here a simple regex in combination with find and grep over the underlying flow.xml files:

find ./packages -type f -name flow.xml | xargs grep -l ‘.<INVOKE TIMEOUT="[a-zA-Z0-9$]" SERVICE=“pub.flow:savePipeline” VALIDATE-IN="[a-zA-Z0-9$]" VALIDATE-OUT="[a-zA-Z0-9$]"[^ DISABLED=“true”]’

We thought we share it, as this might be useful also to others…

Thanks for the command. Also we can include pub.flow:restorePipeline, pub.flow:restorePipelineFromFile, pub.flow:savePipelineToFile.

Thanks Stefan for sharing the details. Really it is useful in Prod environment.


Just a comment I am sure that this will not be useful in prod env. because you are not allowed to change/add the code or add save/restore pipeline manually. Its forbidden and its a best practice. The code should reach the prod using a proper deployment processes you follow as per the project.

But you can run this command on your development env before you move the code to test/prod. In this way it is very helpful.

Let me know your comments :slight_smile:

@ Mahesh : You kidding.

Mistakenly if we forget some services to disable or remove while moving the code from pre-prod to Prod then by using the given command we can find out services and we can take necessary action on those.


@ RP - I am not kidding :slight_smile:

I said you can run this command in the development environment itself or any PRE-PROD env. No need to run on Prod as you are proactively removing the save/restore pipeline steps before it would reach your PROD.

I said my views and this is what we follow in our project. I am not sure what is the process followed by you :stuck_out_tongue:

If you see the save/restore pipeline steps in PROD code its not a good practice and deployment process.

Let me know if you have any questions.

Mahes…you sound bit serious :slight_smile:

What RP was referring to…perhaps, with wide development team they tend to forget in hurry or something last minute changes…it will be very useful in such cases.

and another best way of using save/restore pipeline…every critical service should have debug mode metadata property as input that service will have branch of save and restore for NON-PROD env’s and its better to link each service with some metadata property like allowed list and denied list kind of thing. I know I’m not enough clear here but can provide more details on demand. Little short of time :slight_smile:


Raj - I was not serious here :slight_smile:

I am little interested about the debug mode metadata property, can you share us some details.