User Guide : Managing Runtime Macros
 
Share this page                  
Managing Runtime Macros
 
Macro Hierarchy
Overview
Examples for Integration Manager Macro Hierarchy
Macro Hierarchy
This section documents the macro hierarchy in Integration Manager. You can define macros at the following levels, and they follow the top-to-bottom hierarchy where Job Execution has the highest level of precedence.
Level
Description
How to import a macrodef file into any given object
Account (Public)
Account level macros are always GLOBAL/Public. They are created by the Admin User.
If the macros must be applied to all the Account members such as JOBTEMPLATES, USERS, JOBCONFIGS, JOBS, add macros at the Account level.
Macros can be overridden in JOBTEMPLATES, USERS, JOBCONFIGS, JOB EXECUTION level.

You can add account level macros using the following methods:
From UI: Log in as Admin > Click MACROS tab > Choose Public > Click Add button to Add Macros. You may also choose the Import Macro File option to upload a macro definition file.
From API: POST /account/{id}/macros
For details about the parameters for this API endpoint, see https://api.im.actiandatacloud.com/v2/apidocs/#/Account_Manager/createAccountMacro
Macros can be added through the UI or API.
For example, to import a macrodef file for an Account, log in as the admin user, go to Macros tab > Public section > Click the Add button >
1. User can click Add Macro to add a Macro and edit the macro name if required and provide the value.
2. User can also click on 'Import Macro File' and upload the macrodef file that loads all the macros to admin user Public macros section.
Job Template
Job Templates can be shared across multiple USERS. JOB CONFIGS are added to the Job Templates, and JOBS are run on the Job configs.Add macros to the Job Template if they need to be applied at the Job Template level.
Macros can be overridden at the USERS, JOBCONFIGS, and JOB EXECUTION level.
A User can add macros while creating a Job Template or add macros to an existing Job Template.
To add macros for a new job template:
From UI: Log in as a user > Go to TEMPLATES tab > Add a new Template > Upload the package > Go to MACROS card > click Add to Add a Macro or Upload macro definition file (.xml or .json).
To add macros for existing job template:
From UI: Log in as a user > Go to TEMPLATES tab > Click an existing Job Template > Go to MACROS tab > Click Add to Add Macro or Import Macro File.
From API: POST /jobtemplates/{id}/macros
For details about the parameters for this API endpoint, see https://api.im.actiandatacloud.com/v2/apidocs/#/Job_Configuration/createJobTemplateMacro
In a similar manner, macros can be added to other levels too. Details are provided in the Description column for the respective level.
 
User (Private)
User level macros are Private to a specific user. If the macros must be applied to a specific user profile, add them.
For example, the private macros created for the Admin user belong to only Admin and can be used only for its associated Job Templates, Job Configurations, and Job execution requests. The macros that are private to a Admin user do not apply for non-admin user and vice versa.
Macros can be overridden in JOBCONFIGS, and at the JOB EXECUTION level.
A User can define user-level macros by using one of the following methods:
From UI: Log in as a user > Go to MACROS tab > Click Private > Click Add to Add Macros or Import Macro File
From API: POST /users/{id}/macros
For details about the parameters for this API endpoint, see https://api.im.actiandatacloud.com/v2/apidocs/#/Account_Manager/createUserMacro
 
Job Configuration
Job Config macros can be applied to their associated Job runs. They can override the macros defined in the .rtc file.
Macros can be overridden at the JOB EXECUTION level.
A User can add macros while creating a Job Configuration or add macros to an existing Job Configuration.
To add macros for a new job config:
From UI: Log in as a user > Go to CONFIGURATIONS tab > Add a new Config > Upload the package > Go to MACROS card > Click to Add a Macro or Upload macro definition file (.xml or .json).
To add macros for existing job config:
From UI: Log in as a user > Go to CONFIGURATIONS tab > Click on a Job Configuration > Go to Macros tab > Click Add to Add Macro or Import Macro File.
From API: POST /jobconfigs/{id}/macros
For more details about the parameters for this API endpoint, see https://api.im.actiandatacloud.com/v2/apidocs/#/Job_Configuration/createJobConfigMacro
 
Job Execution
All of the above macros can be overridden at runtime by defining macros using macros section using the API POST call /jobconfigs/{id}/jobs
For details about the parameters for this API endpoint, see https://api.im.actiandatacloud.com/v2/apidocs/#/Job_Execution/runJobConfig