“Add” resources to your Integration Flow via SAP Cloud Integration’s Web Application
In my previous blog, I shared about the new “Resources” view added in SAP Cloud Integration’s Web Application, where I talked about the actions like download and delete of resources of the integration flow.
As the next increment to the “Resources” view, we have now added the possibility to add resources to the integration flow. This would allow the integration developers to include resources directly from the file system or copy resources from other integration flows across packages within the same tenant.
Once a resource is available within your integration flow, you can consume it in a flow-step or an adapter from their respective configuration (or property sheet).
In the “Resources” view, you can click on the “Add” button to select the type of resource you want to include into the Integration Flow. Currently adding of these types of resources are supported;
- XSLT Mapping
Image 1: “Add” button and types
This would open up a dialog which gives you an option to choose the source from where you want to pick up the resource, it can be either “File System” or “Integration Flow”.
Image 2: Add dialog with “Source” as File System or Integration Flow
“Add” Resources from File System
If you choose the “File System” as the source, then you can click on the “Browse” to select the respective type of resource you want to add into your integration flow.
Image 3: Select resources from File System
You can also add multiple resources of the same type from the file system by selecting them all and adding them together.
Image 4: Multiple resource selection
“Add” resources from file system is now extended to accept zip files to allow adding of dependent or related resources of different types for a particular resource.
For example, if you have a WSDL which requires an XSD as a dependent resource and has to be in the same path as the WSDL. In this case, you can create a zip file which contains the WSDL & its dependent resources and add it using the Add -> Schemas -> WSDL option.
Image 5: Adding multiple related resources as an archive
On add, the zip is unzipped and the content of the archive placed in the current selected path within the integration flow.
You can also add the dependent resources with a folder structure by adding this within the zip file, and on upload, the same folder structure (or path) is retained within the integration flow.
“Add” Resources from other Integration Flows
If you choose the “Integration Flow” as the source, you need to first select the package and then find the integration flow from where you want to copy the resources.
Image 6: Select resources from Integration Flows
The package and integration flow selection drop down also supports filtering which can be used to search for a particular package or integration flow. Just start typing the package or integration flow name and the list will be filtered accordingly. This filter comes in handy in case you have too many packages or integration flows in your tenant.
Image 7: Filtering packages and integration flows
You can also add multiple resources of the same type from an integration flow by selecting them all and adding them together.
Image 8: Multiple resource selection
“Add” resources from integration flow is now extended to allow adding of dependent or related resources of different types for a particular resource.
For example, if you have a WSDL which requires an XSD as a dependent resource and has to be in the same path as the WSDL. In this case, you can click on “Include Additional Resources” and select required XSD available in the same path and add in into your target integration flow.
Image 9: Adding multiple related resources
While adding resources either from file system or from an integration flow, if the your integration flow already contains resource of the same type and same name, then there is a confirmation dialog shown which lists all the conflicts and gives you an option to either overwrite them or cancel the add operation.
Image 10: Overwrite existing resource with the same name
Every resource that is added in the integration flow via the “Resources” view is a copy of resource and not a reference of a resource, which means that any changes made to the resource within your integration flow doesn’t impact the resource with the same name in other integration flows.
You can also add message mapping into your integration flow via the “Resources” View using the Import from ESR feature.
Hope this blog was useful and helps you consume the “Add” of resources in the Web.
Great updates to the Web UI tooling lately, Finny. One small item on my Christmas wishlist: The ability to rename resources 🙂
Thanks for your feedback.
Renaming resources is already part of our road map for "Resources" view. Sorry that we could not give it to you for this Christmas but for sure it will make it before next Christmas :-).
Looking forward to it 🙂
This is really great , is there some way to also find in resources view where are these resources used ? e.g. old scripts generated but script steps deleted later ; so to cleanup these old scripts ?
Is it possible to reuse resources across flows rather than copying them in duplicate scenarios ?
Thanks Sachit for your feedback.
Showing the usage of resources within an integration flow is part of the road map and would come in the future.
Using resources across iflows is also something we have it in our minds but not yet started detailing it out.
Any clue, whether "where-used" and "reuse" resource options have been released in CPI?
Thank you for explain, do you know if is possible to read a resource from groovy script ?
We need xml / csv / sql / json on resources.
This script generate list of file from "current directory" recursively but I can't find my xml un filesystem. There is some "special word" to find an mapping/file.xsl or zip ?
Another funny think... in this blogs (of sap) coding list doesn't contain Groovy 🙂 (I userd Java)
Thanks for sharing this, from my knowledge scripts files is also part of the resource, so do you know should there be any reuse/encapsulation concept for scripts in a iFlow? provided I have two groovy script files file1.groovy and file2.groovy, in file2.groovy I want to call some function/object defined in file1.groovy, should that be possible?