QPR MEA Integration: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
QPR ProcessAnalyzer is able to connect to a QPR MEA (QPR Suite) instance and call Web Service operations. QPR MEA Web Service documentation: https://kb.qpr.com/qpr2025-1/qpr_web_service.html.
QPR ProcessAnalyzer is able to connect to a QPR MEA (QPR Suite) instance and call its Web Service operations. QPR MEA Web Service documentation: https://kb.qpr.com/qpr2025-1/qpr_web_service.html.


== Use MEA Connection ==
To use the MEA connection, the following steps are required:
To use the MEA connection, the following steps are required:
# Create connection string and store the secret.
# Create connection string and store the secret.

Revision as of 08:49, 9 April 2026

QPR ProcessAnalyzer is able to connect to a QPR MEA (QPR Suite) instance and call its Web Service operations. QPR MEA Web Service documentation: https://kb.qpr.com/qpr2025-1/qpr_web_service.html.

To use the MEA connection, the following steps are required:

  1. Create connection string and store the secret.
  2. Create connection object.
  3. Call web service operations using the connection object.

MEA Connection String

To connect to QPR MEA, the MEA connection string needs to be created and stored as a secret.

The MEA connection string is a json object with following properties:

  • url: URL of the QPR MEA Web Service endpoint.
  • logOnName: Log on name of the user who will access the QPR MEA Web Service.
  • password: User's password in QPR MEA.

Example connection string:

{ "url": "https://<hostname>/QPR/Portal/QPR.Isapi.dll/wsforward/MainService.svc/webHttp", "logOnName": "MyUser", "password": "MyPassword" }

Example to store the secret:

ProjectById(1).SetSecret("QprMea", "MeaConnection", `{ "url": "https://<hostname>/QPR/Portal/QPR.Isapi.dll/wsforward/MainService.svc/webHttp", "logOnName": "MyUser", "password": "MyPassword" }`);

MEA Web Service Operations

CreateObject

Calls CreateObject and returns the MEA ID of the created object. More information: https://kb.qpr.com/qpr2025-1/createobject2.html.

Parameters:

  • namespaceId (String): MEA ID of the namespace into which the object is to be created.
  • objectTypeName (String): Defines type of the new object.
  • name (String): Defines name for the new object.
  • parentIds (String or String*): MEA ID of parent object. If array is given, every array element specifies one ID.
  • attributes (Dictionary): Key/value pairs of <attribute>/<attribute value> to be set for the created object.
  • options (String): Optional options for the operation. See https://kb.qpr.com/qpr2025-1/parameters_and_options.html?anchor=options.

Example: Connect to the configured QPR MEA and create a new top-level comment action.

ProjectByName("TestProject")
  .CreateMeaConnection(#{"ConnectionStringKey": "MeaConnection"})
  .CreateObject("PO", "Comment", "Test comment", "", #{"description": "Test comment description"});

DeleteObject

Calls DeleteObject. More information: https://kb.qpr.com/qpr2025-1/deleteobject2.html.

Parameters:

Example: Connect to the configured QPR MEA and delete an object.

ProjectByName("TestProject")
  .CreateMeaConnection(#{"ConnectionStringKey": "MeaConnection"})
  .DeleteObject("PO.0.985518423");

GetAttribute

Calls GetAttribute and returns the value of given object attribute as a string. More information: https://kb.qpr.com/qpr2025-1/getattributeasstring.html.

Parameters:

Example: Returns the name of an object.

ProjectByName("TestProject")
  .CreateMeaConnection(#{"ConnectionStringKey": "MeaConnection"})
  .GetAttribute(
    "[PG.785401983.683494101]",
    "name"
  );

QueryObjects

Calls QueryObjects and returns query results as a hierarchical dictionary following the hierarchy of ResultSet object returned by QPR MEA. More information: https://kb.qpr.com/qpr2025-1/queryobjects.html

Parameters:

Example: Return name and typename of all the subprocesses in a model whose name contains text "Account". Results are ordered by name and only at most three results are returned.

ProjectByName("TestProject")
  .CreateMeaConnection(#{"ConnectionStringKey": "MeaConnection"})
  .QueryObjects(
    "[PG.1374444994].Subprocess",
    "name, typename",
    `Find("Account", Name)`,
    "name",
    "MaxCount=3"
  );

SetAttribute

Calls SetAttribute to set an attribute value. More information: https://kb.qpr.com/qpr2025-1/setattribute.html.

Parameters:

Example: Change the name of a user to "ChangedUser".

ProjectByName("TestProject")
  .CreateMeaConnection(#{"ConnectionStringKey": "MeaConnection"})
  .SetAttribute(
    "[UM.0.123]",
    "name",
    "ChangedUser"
  );