Integration Blog Posts
Whether you’re a beginner or an experienced developer, this page is your go to resource for how to guides & tutorials, FAQs, and feature highlights
cancel
Showing results for 
Search instead for 
Did you mean: 
finny_babu
Product and Topic Expert
Product and Topic Expert
6,584
Introduction

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).

 

"Add" Resources 

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;

  • Archive

  • EDMX

  • Script

  • WSDL

  • XSD

  • 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

 

Overwrite 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 

 

Conclusion

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.
8 Comments
MortenWittrock
SAP Mentor
SAP Mentor
Great updates to the Web UI tooling lately, Finny. One small item on my Christmas wishlist: The ability to rename resources 🙂
sachit_aggarwal
Product and Topic Expert
Product and Topic Expert
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 ?
finny_babu
Product and Topic Expert
Product and Topic Expert
Hi Morten

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 :-).
finny_babu
Product and Topic Expert
Product and Topic Expert
0 Kudos
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.
MortenWittrock
SAP Mentor
SAP Mentor
0 Kudos
Looking forward to it 🙂

Hello Finny,

Any clue, whether "where-used" and "reuse" resource options have been released in CPI?

Regards,

Varun

Bais
Participant
0 Kudos
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.
import com.sap.gateway.ip.core.customdev.util.Message;
import groovy.io.FileType

def Message processData(Message message) {

def list = []
def lista = ""

def dir = new File(".")
dir.eachFileRecurse (FileType.FILES) { file ->
list << file
}

list.each {
lista = lista + it.path + "\r\n"
}

message.setProperty("list_files", lista)
message.setBody(lista)
return message
}

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)

 
0 Kudos
Hello,

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?