Configuring the AI Factsheets integration

You need to do some steps to configure the integration of IBM OpenPages® for IBM Cloud Pak for Data and AI Factsheets.

Do this configuration after you load the integration files.

Do the following tasks:

Profile

The MRG AI Factsheets Master profile contains access to all the objects, views, and fields needed to use MRG together with AI Factsheets. Assign this profile to the users who want to use the AI Factsheets data in OpenPages.

API user

AI Factsheets uses the OpenPages REST API to populate OpenPages objects with model facts and other data that is initially captured in AI Factsheets.

To access the OpenPages REST API, an API user must be created in OpenPages and configured with the necessary permissions. OpenPages comes with a role template that is called MRG – AI Factsheets – API Access, which has the minimum set of access required for the API to function with AI Factsheets. Use this role template when you define a role assignment for the API user. For more information, see Creating user accounts.

Assign the MRG AI Factsheets Master profile to the API user to ensure the API user has access to all the required objects. For more information, see Associating profiles to a user.

RabbitMQ messaging

OpenPages uses RabbitMQ messaging to notify AI Factsheets about changes to OpenPages objects that need to be reflected in AI Factsheets. You can configure RabbitMQ messages for the following types of object changes (actions):

  • Create
  • Update
  • Delete
  • Associate
  • Disassociate

Table 1 outlines the messages that are required for the integration with AI Factsheets.

Table 1. Messaging requirements
Object Type Create Update Delete Associate Disassociate
Model Use Case (Register) X X X X X
Model (Model) X X X X X
Model Deployment (Usage) X

To set up this messaging, you add GRC triggers for the object types and operations. To set up the triggers, you need to modify the _trigger_config_.xml file. The OpenPages Platform 3 profile includes access to all of the system files, including the _trigger_config_.xml file. Add the ready-to-use OpenPages Platform 3 profile to the list of available profiles for your administrators who manage system files. Using this profile, you have access to the Administration menu > System Configuration > System Files menu items. For more information on modifying system files, see System file management. The following is a sample of XML code for the triggers. Add each <grcTrigger> element to the <trigger-definitions> section of the file.

	<grcTrigger name="<triggerName>" event="<actionType>" position="<position>">
		<rule class="com.ibm.openpages.api.trigger.oob.ContentTypeMatchRule">
			<attribute name="content.type" value="<objectType>"/>
		</rule>
		<eventHandler class="com.ibm.openpages.api.trigger.oob.messaging.RabbitMQObjectChangeEventHandler">
			</eventHandler>
	</grcTrigger>
Table 2. Parameters
Parameter Description Example
<triggerName> A name for the trigger grcTrigger name="RabbitMQ event for Model creation”
<actionType> The action for which you want a RabbitMQ message. The possible values are:
  • create.object
  • update.object
  • delete.objects
  • associate.objects
  • disassociate.objects
event="create.object"
<position> Position Events are generated in one of two phases of an operation, PRE or POST. Triggers are registered to listen for either one or other position. The possible values are:
  • PRE – Events that happen prior to the operation actually being performed by the system

    For example, during the creation of a GRC Object, a PRE event has all the information about the object to be created, but the system has yet to take action to create the object and persist values. PRE is required for deletes, associations, and disassociations.

  • POST - Events that happen after the operation has been performed by the system and before the transaction has been committed, allowing for further processing of additional business logic

    POST is required for creates and updates.

For more information, see the OpenPages 8.3 trigger development guide.

position="POST"
<objectType> The name of the object type you want to create messages for (i.e. Model, Register, Usage). value="Model"

For an example of the complete content of _trigger_config_.xml content, see Sample trigger configuration for AI Factsheets.

Adjusting the time-to-live for RabbitMQ messages

RabbitMQ allows for messages to expire after a specified amount of time, called the time to live (TTL) of the messages. In OpenPages, the TTL of RabbitMQ messages is controlled by the registry setting Platform > Messaging > RabbitMQ > Message Time To Live (TTL). By default, the TTL is set to 172,800,000 milliseconds (2 days).