Importing an App

You can import the triggers and flows from an exported app into an existing app or into a new app. The target app into which you want to import must exist. You can import an app by dragging and dropping its .json file into the Web UI.

Note: Flogo apps that are exported from TIBCO Cloud Integration - Flogo (PAYG) 2.5.0 and later cannot be imported into previous versions of TIBCO Cloud Integration - Flogo (PAYG).

Here are a few things to keep in mind before you import an app:

  • If any flow in the app uses extensions developed by the community, you need to make sure that those extensions are available to the app into which you are importing when importing. Flows that make use of extensions that are not present will not be imported.
  • Passwords configured in any activity within any flow or connection in the app to be exported will be stripped out in the exported app. You must manually configure the credentials in the flows after importing such apps.
  • Some apps created in Project Flogo™ use the any data type. The any data type is not supported in TIBCO Cloud Integration - Flogo (PAYG). Such apps get imported successfully, but the element of type any gets converted into an empty object. You must explicitly use the mapper to populate the empty object with member elements.
  • When importing an app, be aware that the long and double data types get converted to the number data type.

When importing an app containing a connection, if you have an existing connection with an identical internal ID as the connection in the app being imported, a new connection does not get created. The imported app uses the existing connection in such a case. However, since the connection credentials do not get exported with the app, if a new connection gets created, you must re-configure the connection credentials after the app has been imported.

Note: The suffixes used in the Mapper have undergone some changes, because of which, you may receive a mapper-related warning in the Import app dialog when importing an existing app. Click Continue and the app will import successfully. After the import completes, be sure to re-map the properties in the activities that show errors. This will ensure that they switch to the new suffix format. The following table shows you the changes in the suffixes:
Original suffix appearing in imported apps New suffix used by the Mapper (after you re-map) For example... Used when mapping...
activity_id.activity_parameter $activity[activity_id].activity_parameter Old suffix:

$InvokeRESTService.responseBody.userId

New suffix after re-mapping property:

$activity[InvokeRESTService].responseBody.userId

When mapping to a parameter in the activity's output. Used to resolve activity params.

$TriggerData $trigger Old suffix:

$TriggerData.queryParams.title

New suffix after re-mapping property:

$trigger.queryParams.title

When mapping from the output of the trigger to flow input
N/A

There was no equivalent for this in the old mapper

$flow.headers.parameter

$flow.body.parameter

$flow is a newly introduced suffix which did not have an equivalent suffix in the old mapper

When mapping to any parameter in the flow's header or input schema (schema entered in the Input tab of Flow Inputs & Outputs dialog) which is the same as the output of the trigger since the output of the trigger is mapped to the input of the flow in a blank flow.

Used to resolve parameters from within the current flow. If a flow has a single trigger and no input parameters defined, then the output of the trigger is made available via $flow

Note:
  • In imported apps, the passwords and secrets for any connections configured in the app do not get imported. You must reconfigure any password or secret for the connection after the app has been imported.
  • When you import an app which does not have a Return activity in any flow (main or branched flow), the Return activity is not added automatically by default. However, if an existing app already has Return activities in main or branched flows, the app is imported as expected.

Importing into a new or empty app

  1. Create a new app if you do not already have one. See Creating a Flogo App for details on creating an empty app.
  2. On the app details page, select Import app.
  3. Navigate to or drag and drop the .json file for the app that you want to import.
  4. Click Upload. The Import app dialog displays some generic errors and warnings as well as any specific errors or warnings pertaining to the app you are importing. It validates whether all the activities and triggers used in the app are available in the Extensions tab.
  5. You have the option to import all flows from the source app or selectively import flows.
    • Import all - To import all the triggers and flows in the app, select Import All. If any activities/triggers are missing in the Extensions tab, the import process ignores the flows that contain those activities and those flows are not imported. If the existing app already has activities or triggers with the same name as the ones you are importing, you see a warning that they will be overwritten. If you do not want to overwrite the flows, you can click Back and clear the selection and click Next. If you do so, the duplicate flows that you de-selected will not get imported. You have the option to rename the flows in the Web UI and export the app and re-import it.
    • Selective import - Select Selective Import, to import only specific triggers and flows from the app. The Import app dialog displays a list of triggers with a check box next to each one. If any activities/triggers are missing in the Extensions tab, the activities/triggers missing in the Extensions tab are not listed in the Import app dialog, hence you will not be able to select them to import. By default, all check boxes are selected. Clear the check box next to the triggers that you do not want to import. By default, all flows associated with the selected trigger(s) get imported. If you do not select a trigger, the flows and their subflows associated with the unselected trigger(s) are listed in the next screen.
  6. Click Next.

    If you had not selected a trigger in the previous dialog, the flows associated with that trigger are displayed. You have the option to select one or more of these flows such that the flows get imported as blank flows that are not attached to any trigger. By default, all flows are selected. Clear the check box for the flows that you do not want to import. If your flow(s) have subflows, and you select only the main flow but do not select the subflow, the main flow gets imported without the subflow. Click Next.

Importing into an app that has existing flows

When importing the app into another app that has existing flows, keep the following in mind:

  • If the existing app already has flows, activities or triggers with the same name as the ones you are importing, you see a warning that they will be overwritten. In such a situation, you can opt not to import those flows, activites or triggers. You can go back and rename them in the Web UI and export the app again and re-import it.
  • If any of the flows that were imported with the app had credentials such as password or a connection, be sure to re-configure them.
  1. Open the app details page by clicking on the app name.
  2. Click the hamburger menu () and select Import.
  3. Navigate to or drag and drop the .json file for the app that you want to import.
  4. Click Upload. The Import app dialog displays some generic errors and warnings as well as any specific errors or warnings pertaining to the app you are importing. It validates whether all the activities and triggers used in the app are available in the Extensions tab.
  5. You have the option to import all flows from the source app or selectively import flows.
    • Import all - To import all the triggers and flows in the app, select Import All. If any activities/triggers are missing in the Extensions tab, the import process ignores the flows that contain those activities and those flows are not imported. If the existing app already has activities or triggers with the same name as the ones you are importing, you see a warning that they will be overwritten. If you do not want to overwrite the flows, you can click Back and clear the selection and click Next. If you do so, the duplicate flows that you de-selected will not get imported. You have the option to rename the flows in the Web UI and export the app and re-import it.
    • Selective import - Select Selective Import, to import only specific triggers and flows from the app. The Import app dialog displays a list of triggers with a check box next to each one. If any activities/triggers are missing in the Extensions tab, the activities/triggers missing in the Extensions tab are not listed in the Import app dialog, hence you will not be able to select them to import. By default, all check boxes are selected. Clear the check box next to the triggers that you do not want to import. By default, all flows associated with the selected trigger(s) get imported. If you do not select a trigger, the flows and their subflows associated with the unselected trigger(s) are listed in the next screen.
  6. Click Next.

    If you had not selected a trigger in the previous dialog, the flows associated with that trigger are displayed. You have the option to select one or more of these flows such that the flows get imported as blank flows that are not attached to any trigger. By default, all flows are selected. Clear the check box for the flows that you do not want to import. If your flow(s) have subflows, and you select only the main flow but do not select the subflow, the main flow gets imported without the subflow. Click Next.

Importing flows without importing the trigger to which they are attached

If you want to import only the flows without importing the triggers that they are attached to, select Selective Import when importing the app, and clear the check box for the triggers that you do not want to import. When you click Next, the flows attached to the triggers that you will not be importing are listed. Select the flows that you would like to import and click Next. The flows get imported as blank flows without being attached to a trigger.

Handling connections when importing an app

Each connection in TIBCO Cloud Integration - Flogo (PAYG) contains a unique internal ID. The IDs are not exposed in the Web UI and are unique based on the user who created them.

When TIBCO Cloud Integration - Flogo (PAYG) compares connections, it does so by comparing their internal IDs. It considers two connections identical if they have the same connection type and same connection ID. It considers two connections as similar, if they have the same connection type, but different connection ID.

Hence, if the app you are importing was not created by you, then any connections used in that app can not have the same ID as any existing connection of the same type that you might already have in your installation of TIBCO Cloud Integration - Flogo (PAYG). For example, if you import an app created by some other user that has some Salesforce connections, even though your installation of TIBCO Cloud Integration - Flogo (PAYG) might already have some existing Salesforce connections, the connections will be considered similar because they are of the same type (Salesforce) but not identical because they do not have the same ID.

Keep the following in mind when you import an app with connections:

Import all

If you had selected Import all when importing the app, you have the following options:
  • If you are the owner who created the app to be imported, if identical connections exist in your environment, the existing connections will automatically be re-used.
  • If identical connections do not exist, then new connections get created without passwords. You must set the password for such connections after the app has been imported.
  • If there are similar connections (same type but different IDs) in the host app, TIBCO Cloud Integration - Flogo (PAYG) does not re-use those connections. It creates new connections without passwords. You must set the password for such connections after the app has been imported.

Selective import

If you chose to do a selective import when importing an app, the Import app dialog lists the connections that are used in the flows and triggers that you selected for import in the app to be imported. It displays a drop-down menu next to each connection. You have the following options:

  • If you have any existing identical connections (same connection type and same connection ID) in the host app, that connection will automatically be selected in the drop-down menu next to the connection. You have the option to re-use the existing identical connection.
  • If there are any similar connections in the host app (same connection type but different connection ID), you can select the similar connection instead from the drop-down menu next to it.
  • You always have the option to select Create new connection from the drop-down menus for any of the connections. TIBCO Cloud Integration - Flogo (PAYG) creates new connections with no passwords. You must manually create a password for the new connection after importing the app.