Copy packages

What is the best way of copying package contents to a new one.

We have an interface/application with lot of reference IDOCs, flat file schemas. There is a need for replicating the entire package under a new name. When we copy services across folders, the references are still pointing to the old package records.

Could anyone throw more light on this…

Bhavani Shankar

Might be you hard coded the path in the Services, just check it out.

Hello Narendra,
There is no hardcoding!!

We want to replicate a complete package under a new name. The contents of the package include flow services, java services, structure/record definitions.

The services in the new package, when copied continue to refer to the old package services/record definitions.

Hope I have make my problem clear…

Bhavani Shankar

Hello Bhavani,

How do you copying the Services into package?

  1. Creating the package from developer with New Package and then Copying the Services into the New Package.
  2. Export the package using the developer, Unzip the package in packages directory with new package name and Activating the package using the webMethods Administrator Package Management .

Which method you are using?


Better way is Create a brand new Package, but follow the same folder naming convention which was used in existing package and drag the existing services to this new package and delete the old package,this is the simplest way…

So that there will be not dependencies.


Better way is Create a brand new Package, but follow the same folder naming convention which was used in existing package and drag the existing services to this new package and delete the old package,this is the simplest way…

So that there will be no dependencies.


We are doing it by procedure 1. (A new package is created, and a folder is created with the same name. Records, Services and folders are then copied to the new package)

The problem is that we need to create a new package with the same content and retain the old one too…
The same naming convention cannot be used, as “Folders Merge, Services Collide”!! So the root folder needs to be different.

Bhavani Shankar


No Need to delete the old package. Just inactive the package in Package Management.


Copy the existing package and rename the package name. this will create the new package as good as old one.
Change the root directory name in the “ns” folder. Using find and replace open each .ndf file replace the old root directory name with the new one. but It is not formal way of doing. before doing this stop your server, once after complition of this process start your server.

I think Bhavani is tired with all these answers …as all are concentrated to copying the services, rather than the actual problem of record references and referred services.
I assume Bhavani’s problem is not with the reference of copied services, but the reference of records and services used /invoked within the copied flow services.

Take this eg. for the scenario:

----service1 invoking service2

service1 and service2 are copied to package2.

----service1 invoking service2

service1 in package2 will invoke the service2 in package1 until the reference is manually changed.
I don’t think there is any generic way to automatically change the reference of service1 in package2 to service2 in package2. Because any such solution can create more issues considering scenarios when partial copying of services are required and existance of same service names in two packages are allowed.

Thanks for making the problem more clearer to everyone. I face problems with record definitions referenced in services.

“The find dependents for the servie, will list the records defined in other packages, which is not desired…”

To over come this, I have to remap all the statements from and to the reference structure, which is the last I want to do!!!

Bhavani Shankar

yes this should work…but pain is manually you need to thoroughly check the recordReferences where ever it was applied…

It has not worked in our case. When we check the dependents, the record references existed across package.

The only way, we were able to overcome this, was by removing the map link and just remapping it. Sometimes it is very tedious, when IDOC segment fields are mapped to a different structure…

We are through with the problem, but was wondering, whether there is any easier way to do this…


yes,it is possible when modifying the record reference try to use the same existing name (only change part is recordreference),as long as the record structure remains same and after the effect no need to remap manually and make sure existing mappings is not destructed…

Hope this should help…

Instead of copying services/references from the old package to the new, move them using drag/drop. This will bring up a dialog that offers to update all references to the item being moved.

at IS v4.6 there is one catch with moving or copying records.
The new record definition (the OS level file at packages/NewPackage/ns/folder/record/node.ndf) will continue to have a reference to the original record name/location. See the tag node_nsName is this file.
You will have runtime errors if this original record name/location no longer exists (i.e. when you deploy to your next environment).
You need to edit the node.ndf file (at the OS level, we produced a script for this) and reload the package.
Better still - always create your records in their final destination package/folder.


i have couple of questions regarding the packages
1)is the sub folder a must in the package.
2)can one package can be used by 2 users if yes how?

Thanx in adavnce

Yes, the subfolder is a must in a package; due to the namespace of wM. Packages don’t appear in the namespace at all, so wM will store your service in the root of the ns. Also keep in mind: imagine you name your first package “pack1” which contains “folder1”. In folder1, you place “service1”. Next you create “pack2”, also with “folder1” in which you also place a new service, also named “service1”. The only difference would be the package name.
wM will not recognize this difference and service1 in pack2 will not be created, as it will conflict with service1 in pack1. If you would name it service2, then wM would store both services in the same folder1 in the namespace, wM wouldn’t make the difference between the 2 packages.

As for your question concerning one package to be used by 2 users - could you be more specific? do you mean: can 2 users work on the development of the same package?


I think the original thread has been stretched too long… however as long as it serves the purpose, nobody should be worried.

I have a question in this new context of the thread.

The developer does not allow to create same named folders in multiple packages. for e.g. if I have Pack1 and Pack2 and if I want to create folder_x under both packages, developer prevents me when I try that. Since I would like to build a common structure of service names even if I distribute them under multiple packages (for a better control of disabling and enabling those), I need to have some folder hierarchy. How can we do this?


Check the following Ezine article regarding package structure.