Macros and Events

You can use macros to add actions to an object, or check for a certain characteristic or condition. For example, you can use a macro to add an activity log to an issue, or to search for issues with a high priority. CA SDM comes equipped with macros that perform tasks such as searching for unassigned issues, notifying a caller, and creating an activity log.
casm171
You can use macros to add actions to an object, or check for a certain characteristic or condition. For example, you can use a macro to add an activity log to an issue, or to search for issues with a high priority. CA SDM comes equipped with macros that perform tasks such as searching for unassigned issues, notifying a caller, and creating an activity log.
This article contains the following topics:
HID_Macros
Create a Macro
You can create a macro, which can be used to add actions to objects or check for certain characteristics or conditions.
If multi-tenancy is installed, select the appropriate tenant from the drop-down list. The public (shared) option creates the object for all tenants.
Follow these steps to create a macro:
  1. Select Events and Macros, Macros on the Administration tab.
    The Macro List page opens.
  2. Click Create New.
    The Create New Macro page appears.
  3. Complete the fields as follows:
    Symbol
    Enter a descriptive identifier for the macro.
    Macro Type
    Select the type for this macro. The macro type that is selected controls the remaining data that needs to be supplied.
    : The Execute CA IT PAM Action selection is only available when CA IT PAM Workflow is configured with CA SDM. The Execute CA Workflow Action selection is only available when CA Workflow is configured with CA SDM.
    Object Type
    Select the type of object on which the macro can be run.
  4. Click Continue.
    The page fills in with the remaining data needed for the macro that is based on the selected macro type.
Execute Remote Reference Macro
This type of macro launches an external program on the server.
Follow these steps:
  1. Complete the following fields:
    Remote Reference
    The name of the remote reference to the external program you want the macro to launch. Type the remote reference name directly into this field, or click the search icon to select the remote reference.
    Parameters to Command
    Additional parameters required for running the command.
  2. Click Save.
    The execute remote reference macro is created.
Multiple Notification Macro
This macro type lets you send a notification to one or more contacts. You can specify the message to send, the recipients of the message, and the urgency level.
Follow these steps:
  1. Type the template name directly in the Message Template field, or click the search icon to select the desired template. This template is used to create the notification message.
  2. Click Save.
  3. Choose the appropriate contacts to notify from the following tabs:
    Note:
    Use the Update Contacts button that appears on each tab to search for and select more contacts to notify.
    Object Contacts
    Displays the available organizations, vendors, and configuration items for the selected Object type that receive notification about tickets. For example, you can select Affected End User or Affected End User's Org to notify.
    Contacts
    Displays the individuals who are added to the notification macro, regardless of their association with the ticket.
    Contact Types
    Displays the users who are defined within the notification macro with the same classification, such as analyst or customer.
  4. Click Save.
    The multiple notification macro is created.
Site-Defined Condition Macro
This type of macro evaluates true and false conditional statements, and can be created by administrators to provide specific behaviors to individual sites.
Follow these steps:
  1. Complete the following fields:
    If All Conditions Succeed Return Select the value you want to return if all conditions succeed. Valid values are True or False. Record Status Select whether the macro is Active or Inactive.
  2. Click Save.
  3. Click Add Condition on the Conditions tab.
    The Create New Atomic Condition page opens.
  4. Fill in the following fields as appropriate:
    Sequence
    The order in which the condition is evaluated within the site-defined condition.
    Select an Attribute
    The attribute to be evaluated. Enter the attribute name directly in this field or click the search icon to select the desired attribute.
    Choose Operator
    Select the conditional operator to use in the evaluation. Valid values are: Equals, Does Not Equal, Greater Than, Less Than, Empty/Null, Not Empty/Null.
    Select Attribute or Data Value
    Choose either Attribute or Data Value to be evaluated.
    Attribute Value/Data Value
    The value to be evaluated. Enter the attribute or data value directly into the field, or click the search icon to select the desired value.
  5. Click Save.
  6. Repeat this process until all the desired conditions have been created.
    The site-defined macro is created.
Search Macros
You can view summary information for each macro on the Macro List page. To display this page, select the Administration tab, Events and Macros, Macros.
You can set up a filter to display only those macros that match certain criteria.
If multi-tenancy is installed, the list page displays Tenant and Public Data settings in the search filter. Public Data can be Excluded or Included with Tenant data; Only searches for public objects exclusively. On detail pages, select the appropriate tenant from the list. If you select <empty>, the object is public.
To filter the macro list follow these steps: 
  1. Click Show Filter on the Macro List page.
    The top portion of the page displays search filter fields.
  2. Fill in the fields with the appropriate:
    Type
    The symbol for the macro type as defined on the Macro Type detail page.
    Object Type
    The symbol for the macro type as defined on the Macro Type detail page.
    Symbol
    The symbol for the macro.
    Active
    Indicates whether the macro record is active or inactive in the database.
    You can click the More icon to display the Additional Search Arguments field. This field is intended only for expert users who understand SQL and Majic and can use it to specify search arguments that are not available in the standard search filter fields. You can enter a SQL WHERE clause in this field to specify an additional search argument.
  3. Click
    Search
    .
    The Macro List page lists the macros that match your search criteria.
    : You can export list results to Excel for use outside of CA SDM by clicking the Export button on the List page.
Edit a Macro
You can update a macro that has already been created.
Follow these steps
:
  1. On the Administration tab, browse to Events and Macros, Macros.
    The Macro List appears.
  2. Select the desired macro.
    The Macro Detail window opens.
  3. Click Edit.
    The Update Macro window opens.
  4. Edit the fields as appropriate.
  5. Click one of the following buttons:
    • Save 
      -- Saves the macro and closes the window.
    • Cancel 
      -- Closes the window without saving any changes.
    • Reset 
      -- Resets all fields to the last saved values.definitions.
Macro Types
You can view summary information for each macro type on the Macro Type List page. You cannot edit a Macro Type, but you can create a macro with a specific Macro Type, which impacts the behavior and appearance of the macro. To display this page, select Events and Macros, Macro Types on the Administration tab.
The Macro Type detail page contains the following tabs:
  • Execute Script
    Displays the internal CA Technologies code that runs when this macro starts. For example, this macro runs when the status of a task changes from WAIT to PENDING.
  • Validate Script
    Displays the internal CA code that identifies the requirements for this type of macro.
 
Filter the Macro Types List
You can set up filters to restrict the display of macro types to only those that match certain criteria.
Follow these steps:
  1. Click the Show Filter button on the Macro Type List page.
    The top portion of the page displays search filter fields.
  2. Fill in the fields with the appropriate values for filtering the Macro Types list.
    • Enum Code
      An internal code that defines the macro type to the system.
    • Symbol
      An identifier for the macro type that indicates its purpose.
    • Active
      Indicates whether the macro type record is active or inactive in the database.
  3. Click
    Search
    .
    The Macro Type List displays items that match your search criteria.