You can export and import apps and use them as templates to quick start development or simply put them in a version control system such as GitHub.
Flogo apps that are exported from Flogo Enterprise 2.5.0 and later cannot be imported into previous versions of Flogo Enterprise.
Here are a few things to keep in mind before you export or import an app:
● Both exporting and importing apply to all flows within your app. You cannot pick and choose flows to export or import.
● 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.
● Importing an app only works when there are no flows present in the app into which you are importing.
● 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 Flogo Enterprise. 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.
Exporting an App
When exporting an app, if the app contains Launch Configurations to hold its test data, the Launch Configurations will not be exported with the app. Launch Configurations in an app will need to be exported independent of the app export.
To export an app, follow these steps:
1. On the Apps page, click the app to open the app details page.
2. Click Export.
The Export button in Flogo Studio has a dropdown menu which gives you the option to download any of the following and either import the app using the drag-and-drop method or push it using the TIBCO Cloud CLI:
● App - exports a single <appname>.json file. Drag and drop this file into TIBCO Cloud Integration Web UI to import the app. Use this option to download an app which you plan to import into TIBCO Cloud Integration using the drag-and-drop method.
● TIBCO Cloud Integration artifacts - downloads two files - manifest.json and flogo.json. The manifest.json contains the manifest details such as the endpoints, memory resource details, and so on. The flogo.json contains the application itself. These are the artifacts needed to push the app directly from Flogo Enterprise using TIBCO Cloud CLI. You must have the TIBCO Cloud CLI installed on your local machine in order to do so. Use this option to push a Flogo app created in Flogo Enterprise to TIBCO Cloud Integration without having to import it into TIBCO Cloud Integration. See the section, Pushing Apps Created in Flogo Enterprise to
TIBCO Cloud Integration Using the TIBCO® Cloud - Command Line Interface for details on how
to do this.
Importing an App
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.
An exported app can be imported into an empty app only. No other flows should exist in the app into which you are importing the exported app.
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
Original suffix appearing in imported apps
New suffix used by the Mapper (after you
re-map) For example...
Used when mapping...
the trigger is made available via $flow 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.
To import an app that was exported, do the following:
1. Create a new empty app if you do not already have one. See Creating a Flogo app for details on creating an empty app.
2. On the app page, click Import App. If you are using an existing empty app, click the Apps link, then click the app name to open the app details page.
3. Navigate to or drag and drop the .json file for the app that you want to import.
4. Click Upload. If any activity in a flow was configured with credentials or a connection, you will be prompted with a reminder to reconfigure them.
5. Click Continue to finish importing the app.
All the flows from the imported app will now be added to your new app.
6. 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.