Red Hat Training

A Red Hat training course is available for Red Hat Fuse

Chapter 7. Managing integrations

The following topics provide information to help you manage your integrations:

7.1. About integration lifecycle handling

After you create and publish an integration, you might want to update what the integration does. You can edit a draft of the published integration and then replace the initial running version with the updated version. To facilitate this, for each integration, Ignite maintains multiple versions as well as each version’s state. The following topics provide an understanding of the behavior to help you manage your integrations.

7.1.1. Understanding integration versions

In each Ignite environment, each integration can have multiple versions. The benefit of multiple integration versions is that if you publish a version that does not work correctly, then you can return to running a correct integration. To do that, you unpublish (stop) the incorrect version and republish a version that runs the way you want it to.

Ignite assigns a new version number each time it publishes a new version of an integration. For example, suppose you publish the Twitter to Salesforce sample integration. After it has been running, you update the integration to use a different account to connect to Twitter. You then publish the updated integration. Ignite unpublishes the running integration, which stops it, and publishes the updated integration with an incremented version number.

The initial integration that was running is version 1. The updated integration that is now running is version 2. If you edit version 2, for example to use a different account to connect to Salesforce, and you publish that version then it becomes version 3 of the integration.

See also: Section 7.2, “Publishing integrations” and Section 7.4, “Republishing older integration versions”.

7.1.2. Understanding integration states

For a given integration:

  • There can be exactly one draft version.
  • There can be exactly one published version. A published version is running.

Each version of an integration is always in one of the following states:

State

Description

Draft

Draft is always the initial state of a new version of an integration. Only one version of an integration can be in the Draft state. That is, you can update one version of an integration at a time.

Published

A Published version is running. When you publish an integration, Ignite builds the integration and starts running it. Only one version of an integration can be running. That is, only one version at a time can be in the Published state.

Unpublished

An Unpublished version is not running. It might have been published and then unpublished, but it also might never have been published. If no version of this integration is in the Published state, then you can publish an unpublished version to run it. If you publish a previously published version, then the newly published version has the same version number as when the integration was previously published. If you publish a previously unpublished version, then the published integration gets the next available version number.

Error

An integration version that is in the Error state encountered an error while being published or while running. The error suspended publication or execution. If this happens, try publishing an earlier integration version that ran correctly. Alternatively, you can contact technical support for help. To do that, in any Ignite page, in the upper right, click the InfoIcon icon and select Support.

7.1.3. Viewing integration history

To view a list of the versions of an integration:

  1. In the left panel, click Integrations to display a list of the integrations in your environment.
  2. Click the entry for the integration whose versions you want to see.

In the page that appears, the History section lists the versions of the integration. The Current Version icon identifies the current version, which is the most recently, successfully published version. For each version, you can also see the date on which it was last published.

To edit or publish a particular version, click the Kebab to the right of the version’s entry. Select the operation you want to perform.

7.2. Publishing integrations

Publishing an integration builds and deploys the integration runtime. The integration starts running. Exactly one version of an integration can be running at one time.

To publish an integration, do one of the following:

  • At the end of the procedure in which you create or edit the integration, in the upper right, click Publish.
  • Publish the draft version or an undeployed version of an integration:

    1. In the left Ignite panel, click Integrations.
    2. In the list of integrations, click the entry for an integration whose status is Draft or Unpublished.
    3. On the integration’s summary page, in the Details tab, identify the integration version that you want to publish.
    4. On the right of that entry, click Three Vertical Dots and select Publish.

7.3. Unpublishing integrations

Each integration can have exactly one version that is running. A running version is in the Published state. To stop running an integration, you unpublish it.

To unpublish an integration:

  1. In the left Ignite panel, click Integrations.
  2. In the list of integrations, identify the entry for the integration that you want to stop running. The entry shows that this integration Published.
  3. At the far right of this integration’s entry, click Kebab and select Unpublish.

Ignite stops running the integration. Unpublished appears in the integration’s entry in the list of integrations.

7.4. Republishing older integration versions

You might publish an integration that does not work the way you want it to. In this situation, you can stop the incorrect version and replace it with a version that you published previously and that runs correctly.

To republish an older integration version:

  1. In the left panel, click Integrations to display a list of the the integrations in this environment.
  2. Click the entry for the integration for which you want to publish an older version. Ignite displays a list of the versions of the integration.
  3. In the entry for the version that is running, at the far right, click Kebab and select Unpublish.
  4. Click OK to confirm that you want to stop running this version.
  5. Wait for Unpublished to appear to the right of the integration name near the top of the page.
  6. Optionally, before you publish the older version, you can update it:

    1. In the entry for the integration version that you want to update, at the far right, click Kebab and select Replace Draft.
    2. Update the integration as needed. For details, see Section 7.10, “Updating integrations”.
    3. When updates are complete, in the upper right, click Publish, and then click OK to confirm. This takes the place of the next two steps.
  7. To publish the older version as is, in the entry for the integration version that you want to start running again, at the far right, click Kebab and select Publish.
  8. Click OK to confirm that you want to publish this version of the integration.

Ignite publishes the integration, which takes a few minutes. When the integration is running, then Published version n appears to the right of the integration’s name.

7.5. Viewing integration log information

Ignite provides log information for each integration version that it executes. To see this information:

  1. In the left panel, click Integrations.
  2. Click the entry for the integration for which you want to view log information.
  3. In the integration’s summary page, click the Activity tab.
  4. Optionally, enter date and/or keyword filters to limit the versions listed.
  5. Click the integration version for which you want to view log information.

For each integration step, Ignite provides:

  • The date and time that the step was executed
  • How long it took to execute the step
  • Whether execution was successful
  • The error message if execution was not successful

To log additional information between any two steps, you can add a log step to the integration. A log step provides information about each message it receives and can provide custom text that you specify. If you add a log step, then it appears as one of the integration’s steps when you expand the integration version that you want to view log information for. You view Ignite information for a log step in the same way that you view Ignite information for any other step.

To add a log step, see Section 5.3.4, “Add a log step”.

7.6. Viewing integration metrics

To view integration metrics:

  1. In the left panel, click Integrations.
  2. Click the entry for the integration for which you want to view metrics.
  3. In the integration’s summary page, click Metrics.

Ignite provides the following metrics:

  • Total Errors indicates the number of runtime errors that all executions of this integration encountered during the past 30 days.
  • Last Processed displays the most recent date and time that this integration processed a message. The message might have been successfully processed or there might have been an error.
  • Total Messages is the number of messages that all executions of this integration processed in the last 30 days. This includes message failures.
  • Uptime indicates when this integration started running and how long it has been running without an error.

7.7. Viewing system metrics

System metrics appear on the Ignite home page. To see them, click Home in the left panel. Ignite updates the following metrics every 5 seconds:

  • The number of integrations that are defined in this environment regardless of the integration state. A red cross indicates any integrations that were running but that encountered an error that suspended execution.
  • The number of connections that are defined in this environment.
  • Total number of messages that have been processed by integrations in this environment in the last 30 days. This includes messages that were processed by integrations that might no longer be running or that might have been deleted from this environment.
  • Uptime indicates how long there has been at least one integration that is running. The date and time when uptime started appears as well.

7.8. Testing integrations

After you create an integration and it is running correctly in a development environment, you might want to run it in a different environment to test it.

To test an integration in a different Ignite environment:

  1. See Section 7.11.1, “About copying integrations”.
  2. Export the integration from the development environment. See Section 7.11.2, “Exporting integrations”.
  3. Import the integration into the test environment. See Section 7.11.3, “Importing integrations”.

7.9. Troubleshooting integration execution

If an integration stops working, check its logs and activity details. See Section 7.5, “Viewing integration log information” and Section 7.1.3, “Viewing integration history”.

For a connection to an application that uses OAuth, you might see an error message that indicates that the access token for the application has expired. Sometimes, you might get a less explicit 403 - Access denied message. The information in the message depends on the application that the integration is connecting to. In this situation, try reconnecting to the application and then republishing the integration:

  1. In the left panel, click Integrations.
  2. In the list of integrations, click the entry for the integration that stopped running.
  3. In the integration’s summary page, in the visual integration flow, click the icon for the application that you want to reconnect to.
  4. In the connection’s details page, click Reconnect.
  5. Respond to that application’s OAuth workflow prompts.

    Ignite displays a message to indicate that its access to that application has been authorized. For some applications, this takes a few seconds but it can take longer for other applications.

  6. After reconnecting to the application, republish the integration.

If reconnection is not successful, try this:

  1. Re-register Ignite as a client of the application. See Section 3.1.2, “Obtaining authorization to access applications”.
  2. Create a new connection.
  3. Edit each integration that was using the old connection:

    1. Remove the old connection.
    2. Replace it with the new connection.
  4. Publish each updated integration.

7.10. Updating integrations

After you create an integration, you might need to update it to add, edit or remove a step. To update an integration:

  1. In the left Ignite panel, click Integrations.
  2. In the list of integrations, click the entry for the integration that you want to update.
  3. On the integration’s summary page, in the upper right corner, click Edit Integration.

In the left panel, you can see that each step in the integration is represented by an icon that indicates whether it is a connection or a data operation between connections. Update the integration as needed:

  • To add a step, in the left panel, hover over the plus sign that is in the location where you want to add it. Click Add a Connection or Add a Step.
  • To delete a step, in the left panel, click TrashIcon to the right of the step that you want to delete.
  • To change the configuration of a step, in the left panel, click the step that you want to update. In the configuration page, update the parameter settings as needed.

See also: Section 7.2, “Publishing integrations”.

7.11. Copying integrations to other environments

To publish integrations across development, staging and production environments, you can export and import integrations. The environments can all be on a single OpenShift cluster, or they can be spread out across multiple OpenShift clusters. See the following topics:

7.11.1. About copying integrations

Each Ignite installation is an environment from which you can export an integration. Exporting an integration downloads a zip file that contains the information needed to recreate the integration in a different Ignite environment.

In an environment, each integration can have only one Draft version.

The result of importing an integration depends on:

  • Whether the integration was previously imported
  • Whether a connection that the integration uses was previously imported

Ignite uses an internal identifier for each integration and each connection to determine whether it already exists in the environment that it is being imported into. If you change the name of an integration or connection Ignite recognizes it as the same integration or connection, which just has a different name.

The following table describes the possible results of importing an integration:

In the importing environment:What the import operation does:

The integration has not been previously imported.

Creates the integration. The integration is in the Draft state.

The integration has been previously imported.

Ignite updates the integration. The updated integration is in the Draft state. If there was a Draft version of this integration, it is lost.

The imported integration uses a connection that did not exist in the environment before the import operation.

Ignite creates a connection that has the same settings except for secrets. You must review each new connection. If a connection is not completely configured for its new environment then you must add the missing settings. For example, you might need to obtain secret settings by registering this installation of Ignite as a client of the application that this connection accesses.

7.11.2. Exporting integrations

To export an integration:

  1. In the left panel of Ignite, click Integrations.
  2. In the list of integrations, identify the entry for the integration that you want to export.
  3. At the right of the entry, click Three Vertical Dots and select Export.

Ignite downloads a zip file to your local Downloads folder. To import the integration into another Ignite environment, open that environment and import this zip file.

Exporting an integration is also a way to have a backup of the integration. However, Ignite maintains the versions of an integration so exporting an integration is not required for having a backup copy.

7.11.3. Importing integrations

To import an integration:

  1. Open the Ignite environment that you want to import the integration into.
  2. In the left panel, click Integrations.
  3. In the upper right, click Import.
  4. Drag and drop one or more exported integration zip files, or navigate to a zip file that contains an exported integration and select it.
  5. After Ignite imports the file(s), click Done. Ignite displays information about imported integrations.
  6. In the left panel, click Connections.

    If an imported integration uses a connection that requires configuration, then there is a Configuration Required message at the bottom of the connection’s card.

  7. For each connection that requires configuration:

    1. Click it to display its details.
    2. Enter or change connection details as needed. It is possible that every field on this page is correct and that only security configuration is required.
    3. If you updated any fields, click Save.
    4. In the left panel, click Settings.

      The Settings page displays entries for applications that use the OAuth protocol.

  8. For each connection that requires configuration and that accesses an application that uses the OAuth protocol, register this installation of Ignite with the application. The steps vary for each application. See the appropriate topic:

  9. In the left panel, click Connections and confirm that there are no longer any connections that require configuration.
  10. In the left panel, click Integrations.
  11. In the list of integrations, at the right of the entry for the integration that you imported, click Three Vertical Dots and select Edit.
  12. In the upper right, click Save as Draft or, if you want to start running the imported integration, click Publish. Regardless of whether you save the integration as a draft or you publish the integration, Ignite updates the integration to use the updated connections.

7.12. Deleting integrations

To delete an integration:

  1. In the left Ignite panel, click Integrations.
  2. In the list of integrations, at the right of the entry for the integration that you want to delete, click Kebab and select Delete.
  3. In the popup, click OK to confirm that you want to delete the integration.

After you delete an integration, Ignite still has the history of that integration. If you import a version of the deleted integration, then Ignite associates the history of the deleted integration with the imported integration.