JS Library for Web and Thick Client Communication

Following are the features of JS library for Web app and thick client (Engage, EPA) communication over the localhost:

  • Allow to connect any Web App to Engage and Enterprise Personal Assistant over loopback address (127.0.0.1)
  • Execute automation and get the automation response
  • Reset automation client

Prerequisite

Following are the prerequisites for JS Library for Web and Thick Client Communication:

  • Application with which ae-w2a-bridge library is being used should be deployed in AssistEdge webserver. Deploy/Add the library from BUILD_ROOT/AddOns/web/ae-w2a-bridge/ae-w2a-bridge.js.
  • If application is deployed outside AssistEdge domain, set AllowedOrigin property in client exe config file.

Browser Support

The supported web browsers are Chrome, and Microsoft Edge.

 

API Exposed by library

  1. initAutomationEnv(callbackFunc)

This method will initialize automation environment and connect with automation client.

 

If initialization fails:

 

{"Status":"Unable to initialize environment."}

 

  1. getEnvStatus(callbackFunc)

This method will return the connection status. If its connected or not.

{"Status":"CONNECTED","Data":"7/23/2021 7:42:20 PM"}

{"Status":"DISCONNECTED"}

 

  1. getUserselection()

This will return user’s selection on automation client’s sign-in screen. Selected profile and processes will be returned.

 

If Users selection is called without initializing environment

{"Error":"Environment not initialized"}


Sample Response:

[

    {

        "SearchInputs": [

            "inputField1"

        ],

        "Applications": [

            "ExeEmpSignIn"

        ],

        "ProcessName": "ExeEmpSignInCview",

        "ProfileName": "ExeEmpSignInProfile"

    },

    {

        "SearchInputs": [],

        "Applications": [

            "ExeEmpSignIn"

        ],

        "ProcessName": "ExeEmpSignInProcess",

        "ProfileName": "ExeEmpSignInProfile"

    },

    {

        "SearchInputs": [

            "InfyId"

        ],

        "Applications": [

            "InfyDirectory"

        ],

        "ProcessName": "PythonWithWebApp",

        "ProfileName": "SanityTest"

    }

]

 

  1. performAutomation(automationObject, callbackFunc)

This should perform the automation and return response.

sample automationObject

{"processName":"notepadAutomation","profileName":"testProfile","searchInput":{"inputText":"123"}}


If performAutomation is called without initiation environment.

{"Error":"Environment not initialized"}


Sample Response

{

    "Status": "SearchSuccessful",

    "Output": {

        "outputField2": "123"

    }

}

 

Status Values:

  • SearchFailed
  • SearchSuccessful
  • SearchTimeOut
  • SearchInProgress