...
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 |
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
: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 toLoad_Upgraded
: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 toLoad_Legacy
:Create a new Sequence Job and call it
Load
give 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 originalLoad
job and will . This Sequence will, in turn, run eitherLoad_Legacy
orLoad_Upgraded
when the Feature Toggle is On or Off, respectively. Ensure that the Sequence has the same combination of all parameters as in both theLoad_Upgraded
andLoad_Legacy
jobs and the “Automatically handle activities that fail” option is set in the Job properties:Setup the sequence design as follows:
The
Load_Upgraded
andLoad_Legacy
job activities call the relevant job versions. All Job Parameters are transferred directly from the Job Sequence Parameters
Removing a Feature Toggle
Remove the Sequence Job. In the example, this is called
Load
Renamed Rename the job version which contains the intended behavior. In this example, we would rename
Load_Upgraded
toLoad
Remove the job version which is no longer required. In this example, we would remove
Load_Legacy
Remove the Project Environment variable. In this example, we would remove
FEATURE_UPGRADED_TARGET
Check in your changes (including the deletions).
Attachments
View file | ||
---|---|---|
|
View file | ||
---|---|---|
|
...