Example 3 - Distributing Applications Across Intrexx Instances
This example describes how you can use REST call actions to distribute or export applications from one Intrexx instance to other Intrexx instances with the click of a button. In this process, the REST call actions call endpoints of Intrexx's own IAA (Intrexx Administration API).
This scenario is ideal, for example, if you are developing applications on a test system and want to implement them on the production system after the development phase.
Please note that this example does not describe a "full-fledged" application for distributing and updating applications. Rather, it is intended to illustrate basic uses of the REST call action. At the same time, you can use this example as a starting point for your own expansion stages.
Requirements
For the example or scenario described here, you will need two Intrexx instances: a source instance (Intrexx 1) and a target instance (Intrexx 2) that has a configured IAA (Intrexx Application API).
In addition, there must be an application in the source instance that is to be exported to the target instance.
Information
Below is an overview of helpful links related to the example described here.
IAA (Intrexx Administration API)
Create Applications
Creating Applications - Key Steps
REST Call Action
Key Actions
To create the example described here, you must perform the following three key actions in Intrexx:
1. Storing the IAA password in the login information store (the "Integration" module)
To log in to the target instance (Intrexx 2) on the IAA, you need the corresponding password. You must store this in the login information store of the source instance (Intrexx 1). The IAA password is written to the processing context later in the process using a REST call action to enable authorization on the target instance.
2. Create an application ("Management Application") that contains the applications to be exported (the "Applications" module)
To export an application, you need an "administration application." The "administration application" is operated by a portal user. This uploads the applications to be exported to a file field in the "Management Application." It also collects the necessary data for the target instance (Intrexx 2), such as the host name and portal name.
As soon as a record is saved in the administrative application, the process for exporting the application to be exported is initiated.
3. Create a process that automatically exports the application (the "Processes" module)
To automatically export data to the target instance, you need a process. This includes, among other things, two REST call actions. The first is used to log in to or authenticate with the target instance at the IAA; the second then exports the application.
The following section describes how you can implement the three key actions in Intrexx. The key steps are described and illustrated with screenshots.
Store the IAA password in the login information store
-
Launch the "Integration" module.
-
Open the Credential Store ("Connection Manager > Credential Store").
-
Click the "
" icon and enter the password for the IAA of the target instance.
More Information
Create an Administrative Application
Portal View
The administration application appears as follows in the portal view:
It consists of an overview page where the applications to be exported are uploaded and the necessary export details are entered.
The input dialog looks like this:
Portal Manager
Data Group
The administrative application requires a data group with the following data fields:
File
This field is used to upload the application to be exported to the management application.
IAA Port (Integer)
Enter the IAA (Intrexx Application API) port for the target instance here.
IAA Portal (String)
Enter the name of the target instance's portal here.
IAA User (String)
Enter the IAA user name for the target instance here.
Server Destination System (String)
Enter the host of the target instance here.
Title (String)
Enter a title for the dataset here.
Input Page
Create an input page for the data fields.
Overview Page
Create a summary page with a table that displays the entries.
Create a process
Trigger Process (1)
The process starts when a record is saved in the "Administration Application."
Add a data group event handler to the process and double-click to open the Properties dialog box.
The event handler should respond to the insertion of new records.
Configure the following settings:
Title: Exporting Applications
Application: Administration Application
Data Group: Export Applications
Record Event: The event handler should respond when data is inserted.
Expansion Phase
If you only want to modify or update an application, you can create an event handler that responds to "Change" events for records. A dedicated API endpoint is available for updating applications to be exported: PATCH Applications.
Writing Values in a Processing Context (2)
In the next step, we'll prepare the data for registration with the IAA (Administration API). We will write these into the processing context.
Add a Groovy action to the process titled "Write Values to the Processing Context."
A Groovy script reads the IAA login credentials stored in the (respective) data record and writes them to the processing context.
We need the following information to log in via the Administration API:
-
remoteHost
-
iaaPort
-
iaaPortal
-
iaaUser
The password for the IAA is stored in the login information cache and will be retrieved from there later.
// Zugangsdaten in Request schreiben
// IAA-Passwort wird aus dem Credential Store geholt ("iaaPassword")
g_sharedState["remoteHost"] = g_record["A229F3CBB5B28C229FB34A806CFDFF06E20EF3F6"].value /* datafield Server Zielsystem <string> */
g_sharedState["iaaPort"] = g_record["22509F36285E66D5D3A354DABDA6F66BBC097FF5"].value /* datafield IAA Port <integer> */
g_sharedState["iaaPortal"] = g_record["9AB6C3060C1A27F2BC997BD3938F2E95EF807A26"].value /* datafield IAA Portal <string> */
g_sharedState["iaaUser"] = g_record["DD1CF70C1C29C2603B1B0419EC85F099679BEFB3"].value /* datafield IAA User <string> */
Set Up a REST Call - Log In to IAA (3)
General: Enter an alias for the REST call action.
Authentication and Headers Select the "None / Custom" authentication type.
Click the plus icon to add a new entry to the header.
The header entry should contain the following information:
Key Content Type
Value: application/json
Click "OK" to confirm the dialog box, and then click "Next."
Request This dialog box is used to define the request. We will first write the required data from the processing context or the login information store to the resource mapping.
Click the "
" icon to open the resource mapping dialog.
In the dialog box that appears, click the "
" icon.
Add the following keys:
host The "host" key receives the value "remoteHost" from the "processing context."
port The "port" key receives the value "iaaPort" from the "processing context."
portal The key "portal" receives the value "iaaPortal" from the "processing context."
iaaUser The key "iaaUser" receives the value "iaaUser" from the "processing context."
iaaPassword The key "iaaPassword" receives the value "iaaPassword" from the "Credential Store."
Populate the request with values:
POST Method
Schema https
(Whether http or https must be used is specified in the IAA's cfg file.) You can find this at the following location: <installation directory>/adminapi/cfg/admin-api.yaml)
Select the following values using resource mapping:
Port $ {port}
Hostname $ {host}
Path auth
The endpoint for the IAA login does not contain any variable components, so it can be entered directly as a fixed value.
Body In the Body section, we first select the JSON body type.
Information about "name" and "password" is required.
Click the
icon and enter the keys "iaaUser" and "iaaPassword."
Set Up a REST Call - Export Application (4)
Copy REST Call Action
You can copy REST call actions. This saves you from having to enter the data (again) for resource mapping.
General: Enter an alias for the REST call action.
Authentication and Headers Select the "Bearer Token" authentication type.
For authentication, we need the token that was sent to us in response to the previous login request.
Click the "
" icon to open the resource mapping dialog.
Add the following keys:
host The "host" key receives the value "remoteHost" from the "processing context."
port The "port" key receives the value "iaaPort" from the "processing context."
portal The key "portal" receives the value "iaaPortal" from the "processing context."
token The "token" key gets its value from the "login" REST call action. The qualifier is "Text." The token is sent by the IAA as plain text.
In the "Token" field, select the key "token." The header is automatically generated from the previous entries.
Request Please include the following information in the request:
Post Method
Schema https
Select the following information from the resource mapping:
Port $ {port}
Hostname $ {host}
Path $ {portal}/applications (see POST Applications)
Body In the Body section, we first select the "Multipart/form-data" body type because, in addition to the actual application ZIP file, a JSON file containing settings must also be sent for an import.
Click the "
" icon to create a body.
Enter the following information:
JSON Body Type
Body
{
"permission": false
}
Click "OK."
Click the "
" icon to create another body.
Enter the following information:
Body Type File
Click the "
" icon to capture the body.
Resource Data Group
Body Select the data field where the application to be exported is stored.
Please confirm your information.
You have now set up all the necessary actions.




























