Copy Or Clone A Solution Using Shared Resources
Use the cloneAsync method with the byReference parameter enabled to copy a Solution from one Organization to another and allow those Solutions to share resources, such as Maps. Solutions that share resources cannot be edited, however sharing resources improves performance during the copying process. This is very useful when you have created standard Solutions that can be used by other Organizations.
If you do not plan to share resources, see Copy Or Clone A Solution To Another Organization.
Considerations For Solutions With Shared Resources
- You must have an administrator or user role. Users with a Read-only role cannot copy a Solution with the byReference parameter enabled.
- You must be a User in both the source and target Organizations.
- The source and target Organizations must be in the same region or data center.
- Only Scheduled or On Demand Solutions can be copied with the byReference parameter enabled. Copying Data Replication or Event Solutions is not supported.
- A target or copied Solution cannot be a source Solution to create a new copy.
- The source Solution cannot be deleted until all of the associated target Solutions in all other Organizations are deleted.
- When copying a Solution, if the target Organization has a Solution with the same name that is not a cloned Solution, the copy process fails.
- The Solution that you are copying must be complete, runnable, and all Maps must be complete and valid.
- Source Solution schedules are copied to and used by the target Solution.
- Target Solutions can be run using the Run button.
- Neither the target nor the source Solutions can be edited, except for the source Solution name.
- Solutions cannot be disabled. To stop Solutions from running, disable the associated Agent.
- Solutions with shared resources cannot be added to the TIBCO Cloud™ Integration Marketplace as a template.
- Shared resources include:
- Maps
- Connection metadata
- To update a source Solution that shares resources:
- Change the source Solution name
- Create a new Solution with the original name that matches the name of copied Solution in the target Organization
- Make the corrections in the new Solution
- Use the cloneAsync method with the byReference parameter enabled to copy the new version of the source Solution to the target Organization. The target Solution is deleted and replaced with the new version of the Solution by matching the Solution names. Execution history is retained for the target Solution.
- Some Solution API methods are not supported for cloned Solutions with shared resources:
- DELETE /v1/orgs/{orgId}/solutions/{solutionId} — Target Solutions can be deleted at any time. Source Solutions can be deleted after all associated target Solutions have been deleted.
- PUT /v1/orgs/{orgId}/solutions/{solutionId}
- PUT /v1/orgs/{orgId}/solutions/{solutionId}/schedule
- POST /v1/orgs/{orgId}/solutions/{solutionId}/prepare
- POST /v1/orgs/{orgId}/solutions/{solutionId}/clone
- POST /v1/orgs/{orgId}/solutions/{solutionId}/cloneAsync — Supported for source Solutions only.
- POST /v1/orgs/{orgId}/solutions/{solutionId}/start — Supported for target Solutions only.
- POST /v1/orgs/{orgId}/solutions/{solutionId}/history/{id}/mark
- POST /v1/orgs/{orgId}/solutions/{solutionId}/history/{historyId}/errors/{id}/mark
Agents
- Agents must be compatible with the Connectors used in the Solution. Some Connectors do not support the Cloud Agent. Refer to the documentation for the specific Connectors used in the Solution for information on supported Agents.
- The Agent ID for the copied Solution is designated when copying the Solution to the target Organization. To change the Agent, copy the source Solution to the target Organization again and designate a new Agent ID.
- Agents for the target Solutions cannot be an older version than the Agent used for the source Solution.
Connections
- All Connectors used by the source Solution must be installed and working in the target Organization.
- The target Organization must include all of the Connections used in the source Solution. Those Connections should be tested and working. The Name and Alias properties of the Connections must match the Name and Alias of the Connections that the source Solution uses.
- Metadata must be the same for the source and target Connections or data could be lost.
- If you need to reset metadata, reset it in the source Organization and copy the source Solution to the target Organization again.
- If your source Solution uses connections that access a local directory, such as a Text Connections that access local text files, the directory setup for the target Solution must be exactly the same. For example, if the text files being accessed by the source Solution are stored in C:\MyDirectory\TextFiles, then the target Solution requires that the associated Agent be able to find and access text files in the same directory on the machine hosting the Agent.
Maps
- Source Solution Maps can be viewed, but not modified.
- Target Solution Maps cannot be viewed.
- Disabled Maps are included in the target Solution. If all Maps are disabled, the Solution is not cloned.
- Incomplete Maps generate an error during the copy process and the Solution is not cloned.
- The most recent revision of each Map in the source Solution is used.
- Map revisions are not retained.
- For target Solutions, all menu options for individual Maps are disabled.
- Debug is not supported.
- If the target Solution has different metadata than the source Solution, mapped fields could be assigned null values.
- Reprocessing failed records is not supported.
- Native query is not supported.
- If Net Change is enabled for a Map, the Most Recent Record Processed date is not copied to the Maps in the target Solution. The date in the Maps in the target Solution is updated and stored when the Map runs, but the date cannot be edited manually.
- Lookup Tables referenced in Maps are not part of the shared resources. If your Maps reference Lookup Tables, the tables must exist and have the same names in both the source and target Organizations.
- Some Map API methods are not supported for Solutions with shared resources:
- DELETE /v1/orgs/{orgId}/solutions/{solutionId}/maps/{mapId}
- POST /v1/orgs/{orgId}/solutions/{solutionId}/maps/{mapId}/changeblocktype
- POST /v1/orgs/{orgId}/solutions/{solutionId}/maps/{mapId}/clone
- PUT /v1/orgs/{orgId}/solutions/{solutionId}/maps/{mapId}/enable
- PUT /v1/orgs/{orgId}/solutions/{solutionId}/maps/{mapId}/lock
- POST /v1/orgs/{orgId}/solutions/{solutionId}/maps/{mapId}/renameblock
- POST /v1/orgs/{orgId}/solutions/{solutionId}/maps/{mapId}/revert
- POST /v1/orgs/{orgId}/solutions/{solutionId}/maps/{mapId}/validateformula
- POST /v1/orgs/{orgId}/solutions/{solutionId}/maps/import
- POST /v1/orgs/{orgId}/solutions/{solutionId}/maps/{mapId}/previewquery
- POST /v1/orgs/{orgId}/solutions/{solutionId}/maps/{mapId}/nativequerytest
- POST /v1/orgs/{orgId}/solutions/{solutionId}/maps/{mapId}/validate
- GET /v1/orgs/{orgId}/solutions/{solutionId}/maps/{mapId}/revisions — Supported for source Solutions only.
- GET /v1/orgs/{orgId}/solutions/{solutionId}/maps — Supported for source Solutions only.
- GET /v1/orgs/{orgId}/solutions/{solutionId}/maps/export/{exportId}
- POST /v1/orgs/{orgId}/solutions/{solutionId}/maps/export —
- POST /v1/orgs/{orgId}/solution/{solutionId}/maps/advanced/upgrade
- GET /v1/orgs/{orgId}/solutions/{solutionId}/maplinks/{mapId} — Supported for source Solutions only.
This process assumes:
Before you perform this task, you must have the following information:
- Target Organization ID — Call the GET orgs method.
- Target Agent ID — Call the GET agents method.
To copy and enable a Solution:
- Call the GET solutions method to find the source Solution ID.
- Call the POST cloneAsync solutions method to create the Solution in the target Organization. Make sure to enable the byReference parameter if you want to share resources between the source and target Solutions.
- Call the GET cloneAsync status method with the ID returned by the previous command. Note that this is not the clonedSolutionId.
- Repeat the GET cloneAsync status method every 15 to 30 seconds until the isComplete property that is returned is set to true. If the hasError property that is returned is set to true, the error is shown in the message field.
All subsequent calls should be made using the target Organization ID.
There is no need to call the POST prepare solution because the target Solution is sharing resources with the source Solution that has already gone through the prepare process. The target Solution briefly displays a "Preparing" status in the User Interface as the information is sent to the Agent.
See