Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content
  • How to Clone from Test Org to Production When a Description Changes


    Manoj Chaurasia

    Screenshot2022-11-14at4_13_50PM.thumb.png.a079c89c3e70c7b6c35585a5a48911e1.png
     

    In a previous article, Paul Varley showed how you can implement a Version Control System for maps. Today we will talk about deployment pipelines and Continuous Delivery for TIBCO Cloud Integration solutions.

    Having separate environments for testing and production is a useful development and release management best practice that can prevent bugs in production. At the same time, this practice creates another problem ? moving changes between testing and production and ensuring they stay in sync over time. Of course, it can be done manually, but this is error-prone and inefficient. Here?s where Continuous Delivery (CD) arises. In this article, we will explore one of the ways we can apply CD to TIBCO Cloud Integration solutions with help of the API Connector.

    Use Case

    We have two TIBCO Cloud Integration organizations: Testing and Production. We want to automatically clone solutions from Testing to Production when they?re ready for production.

    Implementation

    First, we should install the Scribe Platform API connector from the Marketplace and establish the connection to Scribe Platform API.

    Next, let?s create an integration solution with the name ?Continuous Delivery? in the Testing organization. This solution will clone other solutions to the Production organization when they are ready. The Testing organization has solutions that we want to clone to the Production organization when they?re ready. ?Integration Solution? is one of them.

    The following diagram illustrates the initial state :

    Screenshot2022-11-14at4_14_04PM.thumb.png.c71509b22aaddbca4c15301a20937dd2.png

    Iteration #1: The basis

    How will we determine that a solution is ready to deploy into Production? We can use several conventions: for example, we put ?Production Ready? in the description of solutions ready to deploy into production. So, let?s create in the ?Continuous Delivery? solution a new map with the name ?Clone Production Ready Maps to Production Org? which will:

    1. Query all solutions from the Testing organization
    2. Clone any solutions whose description equals ?Production Ready? to Production
      1. ?Note that this comparison is case-sensitive ? so put exactly the same string as the solution?s description (without extra whitespace)
    Screenshot2022-11-14at4_14_14PM.thumb.png.77f30b4be3d0d71bcaa9bd97f343570d.png

    The CloneSolution command requires that you fill in the following fields:

    • DestinationOrganizationId ? ID of the target Organization where the Solution is being copied to.
    • DestinationAgentId ? ID of the Agent in the target Organization to associate with the copied Solution.
    • OrganizationId ? ID of the source Organization.
    • SolutionId ? ID of the source Solution.

    In our example, we use hard-coded DestinationAgentId, but you could also use a Fetch or Lookup block with the Agent entity.

    Iteration #2: Redefine the production readiness

    Let?s run the map. Whoops, we got an error: ?All maps must be valid to Clone a Solution?. According to API documentation ?To successfully clone a Solution, all Maps in the source Solution must be valid, and the destination Organization must use the same Connection types and names. The cloned Solution is incomplete until a Solutions POST prepare command is issued against it?.

    Based on this, it is like we should filter out all incomplete solutions because we can?t clone them.

    Screenshot2022-11-14at4_14_25PM.thumb.png.89aa175c8d3315ce3bcf1565f387d809.png

    Let?s try to put ?Production Ready? in the description of ?Integration Solution?, run the ?Continuous Delivery? solution, and check the Production organization?

    Whoo-hoo, we have the first solution successfully passed through our deployment pipeline!

    Iteration #3: Preventing duplicate cloning

    What if we run our ?Continuous Delivery? multiple times? What will happen with already-cloned solutions? It looks like our map clones all production-ready solutions on every run.

    Screenshot2022-11-14at4_14_38PM.thumb.png.0fdc6c53d9cf74f5fa6a2306a351ebf9.png

    Summary

    We implemented a basic scenario for cloning solutions from our Testing organization to Production. Here are some ideas for those of you who want to take this a step further. Consider implementing one or both of the following:

    • Fetch the most suitable agent (for example, by name) instead of hardcode Agent IDs
    • Use Lookup Tables instead of hardcoded ?Production Ready? descriptions. Both of the options should work:
      • good old formula editor
      • or fetch block for Lookup Table Values of Scribe Platform API Connector

    I hope that this article piqued your interest in exploring the features of Platform API Connector and its possibilities. You?ve got this!

    This blog post was created by Aquiva Labs. Learn more about their services here.


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...