Skip to Content
Technical Articles
Author's profile photo Vikas Kumar Singh

Bulk Deploy & Undeploy CPI Artifacts

It’s the possibility of thoughts & imagination coming to life, that keep life & (work) interesting”

Yes, folks recently working for customer I was given task to train user to deploy and undeploy CPI artifacts, and all they were interested in undeploying all the artifacts for some task and then deploy all when task is done.

Consider a use case some one setting up artifacts on 2 data centers for 24*7 availability, who wants to undeploy all artifacts when there is planned downtime on one data center and deploy the artifacts in the back up data center for time being. How tedious it becomes for the users to navigate through individual artifacts and manage them.

 

With this thought I started wondering the ways to make it possible and hence came up with a solution with easy to handle screen.

 

 

 

The solution can be implemented by uploading the the simple i flow developed and take care of following 2 points

  1. Configure CPI_HOST_NAME for all receivers
    • if CPI url is https://XXXXX-tmn.hci.us2.hana.ondemand.com/itspaces, then CPI_HOST_NAME = XXXXX-tmn.hci.us2.hana.ondemand.com
  2. There are multiple receivers so configure host in all receivers

 

 

 

  • All the URLs use Basic authentication with CPI S-user id (role ESBMessaging.send is necessary for S-User)
  • Please create a keyStore for BASIC AUTHENTICATION with CPI S-User and Enter it in the parameter – Credential Name

 

 

 

  • Once the Iflow is deployed the URL to call is  http/MangeIflows

 

 

And at the end here is the artifact zip which can be uploaded and configured to be used.

 

Download the Artifact Here!!

 

 

Please leave your valuable feedback and as always will reach you all with next blog!!

Assigned Tags

      19 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Raffael Herrmann
      Raffael Herrmann

      Hi Vikas,

      nice tool and thanks for sharing it. This looks pretty useful. Two thoughts on it and the article:

      • Regarding the tool: Could you add a "select all" or "select all on current page" button?
      • Regarding the article:
        • Could you make the images clickable? That would improve the readability.
        • Could you explain in some sentences how the tool works technically/what happens in background?

      Best regards,
      Raffael

      Author's profile photo Raffael Herrmann
      Raffael Herrmann

      Hi Vikas Kumar Singh ,

      I had some time to try your tool now. First: nice application design. Seems like my CPI dashboard was able to inspire you. ? Second: There’s a “bug” in the release. In the HTML code (I decoded the Base64 string) in line 96 you still have a complete url with the domain of your runtime tenant. I think the url variable in line 96 should contain only a relative path like “/http”. Otherwise it’s only runnable on your tenant.

      Besides that – one more wish. Could you please externalize the credential name also? “SAP_CPI_BASIC” may not fit to all users naming conventions. By externalizing the credential name as parameter, users could use your tool without disrespecting their specific naming conventions.

      Keep up the great work!

      Best regards,
      Raffael

      Author's profile photo Vikas Kumar Singh
      Vikas Kumar Singh
      Blog Post Author

      HI Raffael,

       

      Thank you so much for your feedback, much appreciated. I was on vacation since last one and half week and couldn't catch up with the comments. Yes I have incorporated the complete URL problem and updated the GIT link.

      And yes you are right, I have externalized the parameter for credentials as well

       

      Regards,

      Vikas

      Author's profile photo Bruno Almeida
      Bruno Almeida

      Hi Vikas,

       

      Very nice tool and thanks for sharing it, super usefull.

      I’ve uploaded into our CPI here, but i’m having a CORS issue while the jQuery request try to call the other endpoints.

      That’s the message that it’s returning at the console: “Access to XMLHttpRequest at ‘https://XXXXhana.ondemand.com/http/getRunTimeIflows’ from origin ‘https:///XXXXhana.ondemand.com’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”

      I’ve read some articles and maybe there is a issue with this parameter Access-Control-Allow-Origin.

      Have you already experienced this issue?

       

      Best Regards,

      Bruno Almeida

      Author's profile photo Vikas Kumar Singh
      Vikas Kumar Singh
      Blog Post Author

      Hi Bruno,

       

      Yes, apologies for late reply this has been corrected and updated artifact has been uploaded. Please re-download

       

      Regards,

      Vikas

      Author's profile photo Bruno Almeida
      Bruno Almeida

      Vikas,

       

      Thanks for sharing it!

       

      It's working now! Very usefull tool.

       

      BR,

      Bruno Almeida

      Author's profile photo Rashmi Joshi
      Rashmi Joshi

      Hi Vikas,

       

      Nice blog...

      I am trying to upload your artifact but getting below error -->

       

      "Upload of the resource failed. Integration flow project must contain a manifest file."

      Can you please share how to fix this?

       

       

      Regards,

      Rashmi

      Author's profile photo Siva Bommidala
      Siva Bommidala

      HI, try by unzipping the File and upload the Zip File in it.

      Thanks

      Author's profile photo Rashmi Joshi
      Rashmi Joshi

      Hi Siva Bommidala ,

       

      I am still getting same error.

      Please suggest.

       

      Regards,

      Rashmi

      Author's profile photo Manoj K
      Manoj K

      I guess you guys are uploading the wrong Zip file, the download link downloads zip file which has another Zip file inside it, you need to upload that file into your tenant.

      Thanks,

      Manoj

      Author's profile photo Rashmi Joshi
      Rashmi Joshi

      Hi Manoj,

       

      yes I am uploading the same inside file in zip format but getting error.

       

       

      Regards,

      Rashmi

      Author's profile photo Manoj K
      Manoj K

      Hi Rashmi ,

      Just to confirm, you are uploading the file with name  ManageIflows.zip into your tenant while Add iflow-->Upload.

      Thanks,

      Manoj

      Author's profile photo Vikas Kumar Singh
      Vikas Kumar Singh
      Blog Post Author

      Hi Rashmi,

       

      Thanks for trying for everyone's convenience , i have uploaded the artifact now rather than the package, Please download.

       

      Regards,

      Vikas Singh

      Author's profile photo Rashmi Joshi
      Rashmi Joshi

      Bingo!!!

      Uploaded successfully. Thank you 🙂

      But still curious to know why was getting error with package before...

       

      Regards,

      Rashmi

      Author's profile photo Vikas Kumar Singh
      Vikas Kumar Singh
      Blog Post Author

      I discussed personally with Bruno ( who has commented above) and few more folks. Even tried myself and it was working with package itself. But I think it should be useful for everyone , so updated the link with new zip. Please try out the tool, feedback is highly appreciated 🙂

       

      Author's profile photo Vijay Devulapalli
      Vijay Devulapalli

      Fantastic Blog Vikas and very well explained.

      Many Thanks for sharing this 🙂

      Author's profile photo Vikas Kumar Singh
      Vikas Kumar Singh
      Blog Post Author

      I am glad that people find it useful. Kudos!

      Author's profile photo Maicon Rosa
      Maicon Rosa

      Hi Vikas

      Do you know if this API also works when using CPI on Cloud Foundry?

       

      Thanks,

      Author's profile photo Harshitha Yadav
      Harshitha Yadav

      Hello guys,

      We are using CPI on cloud foundry. I tried using this package, performed all configurations. But, when I am using manageiflows endpoint, I am getting the HTML screen which is blank. Please find the attached screenshot. Did any one else face this issue? If yes, can you please help to understand the issue and how you have resolved it.

       

      Thank you.