Chapter 5. Drag & Drop Apps Lifecycle Management

5.1. Overview of Lifecycle Management and Drag & Drop Apps

The basics of Lifecycle Management and Drag & Drop Apps are covered in the product features page. Essentially, Lifecycle Management allows users to clearly understand what versions of their applications are deployed to which environment. It also enables them to easily deploy and promote applications between those environments. Drag & Drop Apps allow users to easily define forms for collecting data via a Drag & Drop interface. These forms can then be used and integrated within Client Apps.

App Forms Relationship

5.1.1. How Does Lifecycle Management Work with Drag & Drop Apps

Drag & Drop Apps Lifecycle Management allows users to deploy and promote new and updated Drag & Drop Apps to individual environments as opposed to all at once. Drag & Drop Apps Lifecycle Management also enables users to clearly see which Drag & Drop Apps are available across each of their environments.

5.2. Lifecycle Management Interface

The Red Hat Mobile Application Platform (RHMAP) includes a simple interface that allows users to manage the full lifecycle of all Drag & Drop Apps as a whole as well as at the individual level.

To access the Lifecycle Management page for all Drag & Drop Apps:

  1. Navigate to the Platform and click on Drag & Drop Apps at the top of the screen.
  2. Click on Lifecycle in top navigation. This screen shows the status of every Drag & Drop App across every environment. All Lifecycle
  3. Click on the + button for any Drag & Drop App to reveal the details. Lifecycle Details

To access the Lifecycle Management page for a single Drag & Drop App:

  1. Navigate to the Platform and click on Drag & Drop Apps at the top of the screen.
  2. Click on Forms Builder in top navigation. Forms Builder
  3. Click on the desired Drag & Drop App from the list.
  4. Click on Lifecycle in left navigation. This screen shows the status of the chosen Drag & Drop App across every environment. Lifecycle Left Nav

Both pages offer the following functionality in the Drag & Drop App details:

  • Deploy Now
  • Preview
  • Live Edit
  • Promote
  • Submissions
  • Copy
  • Deploy

Operations

The typical flow of operations might be as follows: the user creates a form, saves it in the Core Platform and may perform subsequent edits safely before the form gets deployed to an environment. When the form is ready, it can be deployed to a Development environment, or even straight to Production. In case of any urgent issues found after deployment, live edits can be made to the form deployed in any of the environments. Live edits don’t automatically propagate to the Core Platform, the user needs to do that manually using the Copy function, which overwrites the master copy in the Core Platform.

Operation sequence

5.2.1. Deploy Now

Deploy Now appears in the Drag & Drop App details on the Lifecycle page and allows you to deploy a Drag & Drop App directly to a specific environment from the Core instance of the Drag & Drop App on the Platform.

Important

When associating projects with a Drag & Drop App, the project will only see and will only use the Drag & Drop Apps in the same environment. For instance, if a project is associated with a Drag & Drop App that is only deployed to Development, when that project is deployed to Production, it will be unable to see or use that Drag & Drop App. The same applies to updates made to a Drag & Drop App. If an update is deployed to a Drag & Drop App in Development but not to Production, associated projects will see the updated Drag & Drop App when they are in Development but will not see the update when they are in Production.

5.2.2. Preview

Preview brings up a live preview of the Drag & Drop App currently in that environment. Lifecycle Preview

5.2.3. Live Edit

The lifecycle for publishing a Drag & Drop App usually resembles:

  1. Create or make changes to the Core Drag & Drop App in the Platform.
  2. Deploy changes to a testing or staging environment.
  3. Once changes are approved, promote them to production.

In addition to this type of lifecycle, the Platform also enables users to do a Live Edit. Live Editing allows user with sufficient privileges to make changes to a form and save those changes directly in an environment without having to follow any promotion process.

For example, a user could make a change to a Drag & Drop App and deploy it only to a development or testing environment, leaving all other environments with the original version. Alternatively, a user could see a critical issue in Production and use the Live Edit functionality to make the change directly in Production to resolve the issue immediately. The user could then copy those edits back to the Core project and propagate that change to the rest of the environments.

To Live Edit a form:

  1. From the Lifecycle page, show the details of the desired Drag & Drop App by click on +.
  2. Click on Live Edit in the desired environment. Lifecycle Live Edit
  3. Make the desired edits and click Save and Deploy to save the changes to the environment.
Important

Clicking on Save and Deploy will save and deploy your changes to the current environment only and will do so immediately. To save these changes to the Core instance of the Drag & Drop App, Copy must also be used after you click Save and Deploy.

5.2.4. Promote

Promote allows you to replicate the deployed version of a Drag & Drop App from one environment to another. The main difference between doing a Promote versus doing a Deploy is that Promote does not involve the Core instance of a Drag & Drop App on the Platform. Meaning, Live Edits made to an environment can be Promoted to another environment without doing a Copy back to the Core instance of a Drag & Drop App on the Platform.

To Promote a form:

  1. From the Lifecycle page, show the details of the desired Drag & Drop App by click on +.
  2. Click on Promote in the desired environment and choose the destination environment. Lifecycle Promote

5.2.5. Submissions

Submissions allows you to see all submissions made to a Drag & Drop App for that specific environment.

5.2.6. Copy

Copy will copy any Live Edits made to an environment back to the Core instance of the Drag & Drop App on the Platform. This is useful for preserving changes made while doing Live Edits as well as deploying those changes out to other environments.

Important

Copy performs a rudimentary copy, not a merge, of the chosen environment back to the Core instance of the Drag & Drop App on the Platform. Meaning this has the potential to destroy changes that are not deployed to the environment that was live edited. Carefully review both the live edited environment as well as the Core instance of the Drag & Drop App prior to using Copy, to avoid losing changes made on the Core instance.

Important

Make sure you have used Copy to save any Live Edits you wish to save prior to using Undeploy or Redeploy.

5.2.7. Deploy

The Deploy menu provides two options: Redeploy and Undeploy.

Deploy Details

Redeploy allows you to deploy the Drag & Drop App from the Core instance to the chosen environment. This will overwrite any live edits made to that environment. Undeploy allows you to remove a Drag & Drop App from the chosen environment. Neither of these operations affect the other environments that Drag & Drop App is deployed to.

5.3. Permissions

All operations related to Drag & Drop Apps Lifecycle Management adhere to the existing permissions system of the Platform.

To Deploy and/or Live Edit a Drag & Drop App, the user must have:

  • Write access on the Deploy permission under forms
  • Write access on the form being deployed
  • Write access to the environment they are deploying the form to

To view a Drag & Drop App in the Lifecycle Management interface, a user must have:

  • Read access on the environment
  • Read access on the form being viewed

For example, a user with Read access on a form and Read access to all environments will be able to view all deployed forms, but not Live Edit those Drag & Drop Apps.

For more details on permissions in general, see the User Roles section of the Administration Guide.

5.4. Drag & Drop Apps Lifecycle Management and $fh.forms

The $fh.forms API allows you to call the Drag & Drop Apps API from javascript Client Apps. When making calls using $fh.forms, results will be filtered automatically depending on the current environment the application is running in. For example, an application may be associated with three Drag & Drop Apps, but if only one of them is deployed to the current environment, $fh.forms.getForms will only return that one.

For more details on using the $fh.forms API, consult the API documentation.