Exporting process level content
You can export process XML data, similar to the process Export to XML format, from your Process Manager instance to use with an internal Large Language Model (LLM) or ChatGTP instance for your team.
Important: This topic references internal (non-public) APIs used by Process Manager. This means that the APIs may change at any time without warning to end-users. Development leveraging these API calls is done at the users discretion with no obligation from Nintex to fix any breaking changes to these APIs in the future.
To get the best from this example, you should already understand how the Process Manager Reporting API works, and how to use Postman. See Example: Querying using Postman for more information.
Step 1. Get an access Token.
It is easier to use an access token than to use your username and password for every request, so in this step you create an access token for all your subsequent calls. To do this you create a POST call to the OAuth endpoint URL, with Body fields as shown in the following image.
Tip: This image shows the endpoint URL, username, and password fields as Postman variables. You can configure your own variables or type in the values from your Process Manager instance.
Request Type: POST
Endpoint: https://{{region}}.promapp.com/{{siteName}}/oauth2/token
Authentication: N/A
Body:
-
grant_type: password
-
username: {{username}}
-
password: {{password}
-
duration: 60000
Considerations
-
You must use the x-www-form-urlencoded data type.
-
Set your region based on where your instance is hosted. See Query the Reporting API.
-
Your siteName is the name of your Process Manager instance.
-
The username and password used here are your Process Manager account username and password. We recommend that this is a Promaster A Nintex Process Manager system administrator who administers a Nintex Promapp site and has rights to view and edit all areas of a Nintex Promapp site. account that has access to all the process data.
-
The duration of 60000 is in milliseconds, so the access token will only last for one hour. Modify this to suit for security needs. This is a best practice, but this field is not required.
-
If you're using single sign-on for your Process Manager instance, you will only be able to do this using the credentials of a user with a dedicated username and password, also called a service account. Please contact support if you need this created.
Once all this information is created and entered in Postman, click Send.
Your access token is returned to the bottom Body. Do not share your access token, as it provides the same level of permissions to Process Manger that your user account has. Create a Postman variable to store this value, or copy it for use in the following steps.
Step 2. Get the process group IDs.
Each process group has a unique identifier (uniqueID) in your Process Manager instance. This is used later by the next API call to return the process XML content for the group. This GET call returns a list of process groups with process metadata.
Request Type: GET
Endpoint: http://{{region}}.promapp.com/{{siteName}}/Process/ImportExport/ExportProcessGroup?ProcessGroupUniqueId={{GroupID}}&Format=Xml&RecursionLevel=OneLevel
Authentication: Bearer {{token}}
Considerations
-
For Authorization, use Bearer Token, and in the token field use the access token from Step 1.
Click Send.
View the return Body content at the bottom of the Postman screen. Identify which process group you want to return the process XML data and copy the uniqueID for that group. You use this in Step 3.
Step 3. Return the Process XML
The ExportProcessGroup call returns the process XML for processes within the current process group and all child groups. However, if the request takes more than 4 minutes it will time out and fail. Because of this the recursion of OneLevel is best practice for larger groups.
Request Type: GET
Endpoint: http://{{region}}.promapp.com/{{siteName}}/Process/ImportExport/ExportProcessGroup?ProcessGroupUniqueId={{GroupID}}&Format=Xml&RecursionLevel=OneLevel
Authentication: Bearer {{token}
Considerations
-
For Authorization, use Bearer Token and in the token field use the access token from Step 1.
-
For ProcessGroupUniqueID use the uniqueID value from the process group you copied from Step 2.
-
You can set the RecursionLevel to Full if this is for a small process group. Starting with OneLevel is the best practice.
-
This API call has a timeout of four minutes. You will get an error message if your process data return takes longer than four minutes.
Once the information is correct, click Send.
The process XML definitions and the process sub-group XML definitions for this group are returned in the bottom Body section. You can identify specific processes or sub-group uniqueIDs and modify the GET statement to return the XML definitions of that lower level, or set the RecursionLevel to Full to return all the process XML content for that lower level group.
Use an Azure function, an AWS function, or a workflow function using Nintex Workflow to build these three main steps into a tool that exports the XML definitions needed for your LLM.