App File Persistence

Your Flogo app files get persisted to the directory that you specify on your local machine. You can use an external source control system such as Git or SVN to store your apps. You can then check in and check out your apps locally from the remote repository. This makes it possible for you to implement the continuous Integration/Continuous deployment (CI/CD) pipeline by leveraging any tool available in the market to integrate your app development with the app deployment.

When you start the UI, you are prompted to point to the directory where you have checked out your apps. If you do not provide any path, the apps are stored in the default directory, which is: <FLOGO_HOME>/data/localstack/apps.

If you restart the UI, at the time of restart, if you want to continue using the same directory that you had specified, click Enter on your keyboard when it prompts you to set the path. It stores the path preference that you set the last time.

After the UI starts, you should be able to see all your apps on the app list page in the UI. From this point on, when you create an app or modify an existing app, the changes are saved to the directory location that you provided when starting Flogo Enterprise.

Each app that you store on your local machine has its folder and the folder name must be identical to the app name. If another user makes changes to your app, you must sync your local repository with the remote repository (do a pull) to get the changes made by that user.

Warning:

  • The app file name must be called flogo.json.
  • The folder name containing the app must be identical to the app name appearing in the flogo.json file for the app.

Loading new apps from the disk - When a new app is added to the directory, refreshing the browser loads the app into the UI. You do not need to restart the UI.

Loading the updated app from the disk - In case the flogo.json on the disk is updated (due to minor changes or checkout a newer version from the source control system), click the Reload from Disk to load the updated app into the UI. Be aware that this action overrides existing changes in the app. Reload from Disk option is available under the shortcut menu that is next to the other buttons on the app page.

If another user adds an app to your remote repository, the app gets downloaded to your local repository when you do a pull from the remote repository. For the new app to display on the UI, you must refresh your browser. You do not need to restart either the browser or Flogo Enterprise.

You can import any exported app to Flogo Enterprise. To do so, create a folder with an identical name as the app name in your local repository, then copy the flogo.json file for the app to the folder. For apps that are created using the UI, Flogo Enterprise automatically generates a unique ID for each app. But, if you load an existing flogo.json file, the app may or may not have an app ID defined in it. Flogo Enterprise checks to see if an ID exists in the flogo.json file for the app. If an ID does not exist for the app, Flogo Enterprise generates a unique ID and adds an ID attribute in the flogo.json file before loading the app.

Note the following:

  • If you change the ID of the app in your flogo.json file, you see a duplicate app on the UI. Refresh your browser to fix this issue. If you continue to work on the app with the old app ID, your changes are lost when you restart the UI.
  • All apps that exist in the path that you provided during Flogo Enterprise installation get loaded on the UI. You cannot selectively choose the apps to be loaded on the UI.
  • Any Launch Configurations (containing your test data for the app) associated with the app are stored in the <app_folder> > test folder along with the flogo.json file for the app.
  • File permissions - You must have "write" permission for the app directory on your local machine. Otherwise, the app is not loaded and displayed in the UI. An error is displayed in the log located in <FLOGO_HOME>/<FLOGO_VERSION>/logs/studio.logs.
  • When importing an app, if any extensions are missing, a broken plug-in icon is displayed on the missing Activity.
  • If the app has any missing extension or if a connector uses the associated connection, you see the connection post-installation of the missing extension or connector.
  • If you add an app to your local app repository, if that app has any missing extension, after uploading the missing extension, the connection in the extension maintains the secrets and passwords that were already configured in the connection for the app. Refer to the Resolving Missing Extensions section for details on how to resolve missing extensions in an app.
  • You may notice a change in secret encrypted values in flogo.json after opening the apps using the UI. This does not affect the run time.
  • We recommend that you do not modify flogo.json manually to avoid any mishaps.
  • When upgrading to Flogo Enterprise the current version from an older Flogo Enterprise version, the existing apps automatically get migrated to the directory that you have created on your local disk. You do not need to migrate them manually.
  • If your app repository gets deleted while in use, you must restart the UI and set a new app repository. Do not continue to work with the deleted repository. Also keep in mind that even if you recreate a directory with the same name, your changes do not take effect until you restart the UI.