How to capture manager mail ID for provisioning/approval VM provisioning request


I wanted to design VM provisioning workflow for following case:

  • Every VM provisioner to have Manager and manager mail id associated with it
  • Every time provisioner request for VM (with non-auto approve capacity) mail to sent to associated Manager
  • On approval/rejection of request request by manager, Mail to be sent to both

As far as I explored ManageIQ supports owner_manager_email attribute, Please help !!

There is an owner_manager_mail field in the VM provision dialogs, but it is hidden by default:

    :description: E-Mail
    :required: false
    :display: :hide
    :data_type: :string

If you want to display it, you need to copy the dialog and change the :display attribute to show. Now you need to customize the Provisioning profile to use the new dialog (change the dialog_name attribute accordingly).

One more task for you is to copy and change the email methods MiqProvisionRequest_Pending, MiqProvisionRequest_Approved and MiqProvisionRequest_Denied to send emails to the manager instead of to_email_address attribute value. Just make sure the manager can login and has a role of approver.

Another approach (if you want to query the manager email address from an external source - i.e. directory service) is just modifying the email methods and adding the relevant code to figure out the manager email address. In this case you don’t have to bother with the dialogs and profiles, and the user does not have to/cannot input this address.

This is just a high-level description of what needs to be done. For details refer to Peter’s book.

1 Like