Step 1: Go to Package -> Create Common Package for Script (Generic Script or name as per the
naming convention you follow) -> Add Artifact -> Scrip Collection
Step 2: Put the name and description of the collection
Step 3: Click on Script collection & edit. Create or Upload the Groovy or Java Script
repository under this artefact
Step 4: Create required reusable Java/Groovy scripts.
Step 5: Save and Deploy the artifact.
Step 6: Go to Integration flow where you want to use script collection. Click on Resources
tab. Under that References and Add References.
Step 7: Add the Script Collection References. It will list down all the packages those are
having Script Collection. Select your package and Script Collection to create a reference
link.
Step 8: Now simply add Groovy/Java Script palette and assign the script from reference
tab. It will list down all the scripts available in script collection artifact.
Step 9: Save and Deploy the Flow and Script Collection artifact