RPA flow to invoke ION API to obtain a list of applications

Create a flow to call an ION API endpoint for retrieving the list of the applications for which you have access in Infor OS portal and write the list to an excel file.

Pre-requisites for flow creation

Create an excel spreadsheet on your local server. For example, C:\RPA\Test.xlsx.

Creating a flow

This chapter lists the steps required to create an RPA flow to invoke ION API for obtaining a list of applications.

Note: Before creating the RPA Flow, you must install RPA Studio on your machine and set up a connection between the RPA Studio (the on-premises component) and RPA Management (the multi-tenant component) using the connection files from API Gateway. See, the Infor Robotic Process Automation Installation Guide.
  1. Log on to the RPA Studio application. The home page is displayed.
  2. Click New Project. The New Project screen is displayed.
  3. Specify this information:
    Name
    List of Application
    Project Location
    Retain the default location
    Description
    Get a list of applications you can access.
    Language
    VB is selected by default.
  4. Click Create. The canvas to design the workflow is displayed with the Project menu open by default.
  5. Add the IONAPI Request (ION API > ION API) activity to call a particular API Endpoint exposed on API Gateway application part of Infor OS.
  6. Specify this information in the Properties panel on the right side of the screen:
    Method
    Select GET from the drop-down list.
    Url
    Create an argument getapplicationlistapi of the String type and specify a default value for the endpoint of Infor OS Suite. For example, OSPORTAL/admin/v1/user/applications.
    Note: To use this activity you must use the endpoint exposed on the tenant that you have signed on to in the RPA Studio session.
    Content Type
    Select application_json.
    Note: You must leave File Attachment, Headers, POST Data, and Query Parameters fields blank.
    Response
    Create a RequestObject (Infro.RPA.Utilities.ResponseObject) variable. To find RequestObject data type expand the Variable Type and select Browse for type. In the Type name field, specify RequestObject and select RequestObject in the Infro.RPA.Utilities domain.
  7. Add the Message Box (System > Message Box) activity to verify the Request message after calling the API. This activity is optional.
  8. Specify this information in the Properties panel on the right side of the screen:
    Input Text
    Define Response.ReadasJSON.tostring VB expression. This VB expression reads the message as JSON and transforms the message to String data type.
    Note: You must leave the Message Box Title, Button Selection, and the Response Code fields blank.
  9. Add the Assign (Primitive > Assign) activity to store the API response body in the String data type variable.
  10. Specify this information in the Properties panel on the right side of the screen:
    To
    Create the responseString of type String variable.
    Value
    Define the same VB expression that we used for the Message Box activity, Input Text property: Response.ReadasJSON.tostring
  11. Add the Write Cell (Excel > Write Cell) activity to write the values obtained from the API, into an Excel sheet.
  12. Specify this information in the Properties panel on the right side of the screen:
    Cell Address
    Specify the exact cell address where the list of the applications must be written. For example, A1.
    Cell Value
    Provide the exact value(s) that must be written into the cell. For example, applicationlist.
    Workbook Path
    Provide the exact .xls file where the values must be written. Specify the Excel argument of string type and specify the default value with .xlsx workbook as mentioned in the pre-requisites. For example, C:\RPA\Test.xlsx.
    Worksheet Name
    Provide the name of the workbook within the .xlsx file. Create Workbook argument of string type and specify a default value. For example, List1.
    Note: Use the exact name of the workbook.

This flow writes all the application names, to which you have access, to a single cell. In order to copy the application names in the columns, you must split the values in the columns, copy the columns and paste as transpose.