Retrieving and importing deployed resources into your workspace

If you have resources that are deployed to an integration server, you can retrieve and import the resources into your workspace in the IBM® App Connect Enterprise Toolkit. Many possible reasons exist for retrieving and importing the resources. For example, you might need to run some problem determination on your message flows. Another reason can be to check the contents of the deployed message flow against the contents in your version control system. Not all types of resources can be retrieved back into your workspace.

Before you begin

About this task

You can retrieve and import resources that belong to an integration server or an application into your workspace, for example .msgflow, .esql, and .map files.

Some resources cannot be imported into your workspace. For example, .mset files. You cannot retrieve applications that are stopped because of missing dependencies on the integration server.

Some limitations can apply due to legacy message flow formats in the retrieved message flows. For more information, see Limitations of legacy message flow formats.

Procedure

Import resources from an integration server, or import a deployed application by completing the following steps:

  1. In the Integration Explorer view, open the menu by completing one of the following actions:
    • Right-click the integration server from which you want to import and retrieve resources into your workspace.
    • Right-click the deployed application that you want to retrieve and import into your workspace.
  2. Select Retrieve and Import Resources

    The Retrieve and import resources wizard is displayed, and it contains a table that is headed "Select an application."

    If you right-clicked an application in step 1, it is preselected in this table.

    If you right-clicked an integration server in step 1, select one application from the list of applications that is displayed. You can retrieve only one application at a time.

    If Retrieve and Import Resources is disabled in the menu, there are two possible reasons:
    • The application is in stopped state due to missing dependencies.
    • The option to retrieve a BAR file is disabled in the server.conf.yaml file.
  3. Click Next
    The Select resources wizard wizard displayed, and it contains a table for each of the following artifacts:
    • Policy projects
    • Referenced shared libraries
    • Included static libraries

In the Select resources wizard that you opened in step 3, select the policy projects, shared libraries, and static libraries that you want to import by completing step 4, step 5, and step 6.

  1. If any policy projects are referenced by the selected application, they are preselected by default in the table of policy projects. The radio button Import policy projects that are referenced by the selected application is selected by default and the table is in read-only mode. If you want to manually select which policy projects to import, select the radio button Select one or more policy projects to import to make the items in the table available for selection. Select the policy projects that you want to import and deselect the policy projects that you do not want to import.
    When Import policy projects that are referenced by the selected application is selected, the integration server calculates which policy projects are being used by the application at the point of retrieval. If an application or a message flow is in stopped state, then it is not actively accessing the referenced policy projects. In this scenario, the referenced policy projects are not returned.
  2. If any shared libraries are referenced by the selected application, they appear in the Reference shared libraries table. The radio button Import all referenced shared libraries is selected by default. If you do not want to import the shared libraries, deselect this radio button.
  3. If any static libraries are included in the selected application, they appear the Included static libraries table. The radio button Import all included static libraries is selected by default. If you do not want to import the included static libraries, deselect this radio button.
  4. Click Next
    The application that you selected is listed on the Resources summary page. If you opted to import any policy projects or shared libraries that are referenced by the application, or any static libraries that it contains, these items also appear on the Resources summary page.

    If the application contains one or more resources that cannot be retrieved, the Finish button is disabled, and a warning message is displayed.

    Enable the Finish button by completing any actions that are advised in the warning message.
  5. Confirm your selection by completing the following steps:
    1. Click Finish
    2. If you are prompted by messages about deleting projects in your workspace, click Delete projects to continue or click Cancel if you want to keep the existing projects in your workspace.
    When your workspace finishes building, the deployed application and its resources, including any policy projects or shared libraries that are referenced by the application, or any static libraries that it contains appear in the Application Development view. If the application references static libraries, errors appear in the Application Development view and in the Problems tab of the Properties view. To resolve the errors (which are caused by a missing library reference), follow the instructions in Step 9.
  6. To confirm that the application was imported successfully, open the application and review its resources in the Application Development view. If the deployed application references any static libraries, errors are displayed because the reference to the static library is missing. Resolve the errors by completing the following steps:
    1. Right-click the application in the Application Development view to open the menu.
    2. Select Manage Library references to open the Manage Library references wizard.
    3. Select the static library in the Manage Library references wizard.
    4. Click OK. The errors no longer appear in the IBM App Connect Enterprise Toolkit.
  7. Optional: If the resources that you retrieve include a message flow that contains a JavaCompute node, the Java source code is not imported into your workspace. Only the .jar file that was compiled when the message flow was deployed is imported. You can deploy the message flow but you cannot edit the Java code in the JavaCompute node. If you do retrieve the Java source code from a source code repository, then you can double-click the JavaCompute node to create a new Java project and then copy the .java files into the Java project.
  8. Optional: If the resources that you retrieve include a message flow that contains a Mapping node, the Java source code is not imported into your workspace. Only the .jar file that was compiled when the message flow was deployed is imported. You can enable rebuilding of the project by completing the following steps:
    1. Create a Java project.
    2. Add the .jar file (that is in the imported application) into the build path of the Java project.
    3. Add the Java project as an included project of the Application.

      For more information, see Creating a Java project.

    4. Clean the workspace by completing the following steps:
      1. Click Project > Clean.
      2. Click Clean all projects and Finish.
    If you do retrieve the Java source code from a source code repository, then you can double-click the Mapping node to create a new Java project and then copy the .java files into the Java project.

What to do next

Edit the retrieved and imported resources to meet your requirements. For more information, see Developing message flows.