Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To ensure Job Sequences and external Schedules in tools like Control-M continue to work without change, a sequence is created which will be run in place of the original job. It is the sequences sequence’s responsibility to check the current value of the Feature Toggle and run the approriate version of the job:

...

When familiar with this design pattern, a new feature toggle can be added in less than 15minwithin minutes.

Info

This feature toggle implementation relies on a Basic Routine called IsFeatureoggleEnabled and . This is available for download from the Attachments section at the bottom of this page.

  1. Add a DataStage Project Environment Variable to store the state of our feature toggle. It is recommended that all Feature Toggles follow a naming conventions such as “FEATURE_XXX” to ensure they are easy to identify and remain grouped together in DataStage selection dialogs. In this example, we chose FEATURE_UPGRADED_TARGET:

  2. Create a copy of the job being changed and name it to reflect the logic when the Feature Toggle is on. In this example, we copied the Load job and renamed it to Load_Upgraded:

    Image RemovedImage Added

  3. Rename the job being changed to reflect the logic when the Feature Toggle is off (i.e. DataStage may the pre-change state). DataStage might notify you that the job is being referenced by another item, click continue. You can ignore this by clicking “yes”. In this this example, we renamed the Load Job to Load_Legacy:

    Image RemovedImage Added

  4. Create a new Sequence Job and call it Loadgive it the same name as the original Job ( Load in our example). This sequence will be run by your scheduler / execution system instead of our the original Load job and will . This Sequence will, in turn, run either Load_Legacy or Load_Upgraded when the Feature Toggle is On or Off, respectively. Ensure that the Sequence has the same combination of all parameters as in both the Load_Upgraded and Load_Legacy jobs and the “Automatically handle activities that fail” option is set in the Job properties:

    Image RemovedImage Added

  5. Setup the sequence design as follows:

  6. The Load_Upgraded and Load_Legacy job activities call the relevant job versions. All Job Parameters are transferred directly from the Job Sequence Parameters

    Image RemovedImage Added

Removing a Feature Toggle

  1. Remove the Sequence Job. In the example, this is called Load

  2. Renamed Rename the job version which contains the intended behavior. In this example, we would rename Load_Upgraded to Load

  3. Remove the job version which is no longer required. In this example, we would remove Load_Legacy

  4. Remove the Project Environment variable. In this example, we would remove FEATURE_UPGRADED_TARGET

  5. Check in your changes (including the deletions).

Attachments

View file
nameFeatureToggleExample.dsx
View file
nameIsFeatureToggleEnabled.dsx

...