Skip to content

Process Invitations in the BZ database

Kai Hendry edited this page May 3, 2018 · 5 revisions

Associated issue #46

Once an invitation is created in the MEFE, we need this invitation to be processed in the BZFE.

Invitation in a role for a given unit:

This part of the documentation is still Work in Progress

Invitation to a case

Get the necessary information:

  1. Get the invitation information from the MEFE API

https://[environment]/api/pending-invitations?accessToken=[token]

Replace '[environment]' and '[token]' (do NOT keep the [ ]) with the correct values for your environment.

  1. Copy these information in the table 'ut_invitation_api_data' in the BZ database (add a new record)

As Assignee

  • In a MySQL/MariaDB client, logged as a user who is allowed to create and delete procedures, open the Script to process assignees.
  • Update the 2 variables that the script needs
    • Id of the record to use from the table 'ut_invitation_api_data'
    • Environment where this script is run (choose 'Demo' if you have created a local environment from scratch)
  • Run the Script to process assignees.

As CC to a case

  • In a MySQL/MariaDB client, logged as a user who is allowed to create and delete procedures, open the Script to process assignees.
  • Update the 2 variables that the script needs
    • Id of the record to use from the table 'ut_invitation_api_data'
    • Environment where this script is run (choose 'Demo' if you have created a local environment from scratch)
  • Run Script to process CC user.

Once the SQL script has been run:

  • Run the PUT API to let the MEFE know that the invitation has been processed in the BZFE

https://[environment]/api/pending-invitations/done?accessToken=[token]

Replace '[environment]' and '[token]' (do NOT keep the [ ]) with the correct values for your environment.

  • Update the field 'api_post_datetime' in the table 'ut_invitation_api_data' for the record that was used to create the invitation.

DONE