Webwrapper
ExorLive is an application delivered as a single page application, and so in order for desktop applications to efficiently integrate with this, ExorLive provides an executable that wraps the web application in a controllable desktop application. This application is called "ExorLive.Client.WebWrapper", or only "WebWrapper". The WebWrapper executable is a single instance application, and if executed multiple times will pass all arguments to the running instance.
Installation
An MSI installer is available at
webwrapper.exorlive.com. It
will install to the default path of
%appdata%\ExorLive\ExorLive Webwrapper
but you can change
installation path by running the MSI package using the command line:
msiexec /i "ExorLiveWebWrapper.2.0.3.4.msi" INSTALLDIR="C:\myfolder" /q
Or you can install it as an advertised installation, which starts the installation with administrator permissions by the user when he/she runs the shortcut:
msiexec /jm "ExorLiveWebwrapper.2.0.3.4.msi"
Package an installation for other purposes.
It is possible to package the installation for other purposes, ex. by storing it on a CD, or for distribution on a network. You can do this by finding the folder where the program is installed and packaging the content of that folder. You have to create the installation package and create the shortcut to the program yourself.
Automatic update
The webwrapper application will attempt to check the website webwrapper.exorlive.com at startup to see if there is an update. If so, it will show a download link to the user. This check can be disabled by editing the default configuration file.
Configuration
The application settings are currently saved in the default configuration
file, ExorLive.Client.WebWrapper.exe.config
, in the application
root. Once a user has launched the application, a second per-user
configuration file named "user.config" is created in a subfolder of
%localappdata%/ExorLive/
.
The following options are available:
User config
Found in a subfolder of %localappdata%/ExorLive/
. If a value is blank, it
copies the value from the global config file.
-
BrowserEngine: Default is
EoWebBrowser
, but this can be changed toInternetExplorer
if you prefer to run the local Internet Explorer engine, orWebViewBrowser
if you prefer to run on the new Microsoft Edge browser engine. -
CheckForUpdates: Default is
True
. This makes the webwrapper check for updates and notify the user if any updates are found. -
Top / Left / Height / Width / Maximized: Default is
True
. This will make the WebWrapper stay open in the context menu if the user closes it without signing out. This is to prevent the user having to sign in anew. -
MinimizeOnExit: Default is
True
. This will make the WebWrapper stay open in the context menu if the user closes it without signing out. This is to prevent the user having to sign in anew. - UpdatePath: Default is blank. The current update channel.
- ZoomFactor: The current zoom level in the browser window.
Application config
The configuration file in the application root (usually
%appdata%\ExorLive\ExorLive Webwrapper\ExorLive.Client.WebWrapper.exe.config
).
These settings might be overriden by the user's config file (above).
- AdfsUrl: Default is blank. For AD integration login link.
-
AppUrl: Default is
https:\\auth.exorlive.com\signin\
. This is the initial url that the webwrapper launches. - Culture: Default is blank. Overrides the default language for login.
-
Debug: Default is
False
. If set toTrue
, it will write logfiles to a folder in _%temp%_. If you are using EoBrowser, it will also enable a chrome debugging server on port 9223. -
ProtocolProvider: Default is
ExorLive.Desktop.Exor3.Component, ExorLive.Desktop
. This can be modified to use another API protocol provider. - RememberLoggedInUser: Default is **True**. See "Single-Sign-On" below.
- SignonWithWindowsUser: Default is **False**. See "Single-Sign-On" below.
Single Sign On
If the WebWrapper is started with a parameter telling which external user is
running this session and then this user logges into ExorLive with an ExorLive
user, the WebWrapper will remember the link between the external user and the
ExorLive user. The next time the WebWrapper is started, it logges in
automatically as this ExorLive user. This functionality is enabled with the
RememberLoggedInUser
setting. For the ExorLive.Desktop.Arguments
interface,
the external user is specified with the signon
parameter.
It is also possible to use the current logged in windows user on the computer the WebWrapper is running. It is enabled with the `SignonWithWindowsUser` setting. It behaves the same way as the `RememberLoggedInUser`.
Architecture
Architecturally the WebWrapper do the following:
- Hosts an instance of a Web-browser object displaying the Exor Live web application.
- Facilitates internal communication between the WebWrapper application and the Web Application using a COM-API.
- Dynamically loads a protocol provider in order to expose the web application's API to other software. Documented to the right.
The dynamic protocol system enables third-parties to easily integrate the
WebWrapper with their systems, using their preferred IPC technology (Named
Pipes, TCP, etc), by simply creating a .net component implementing a simple
interface. This component can subsequently be loaded dynamically based on
the optional configuration file or by passing the name of the provider to
the executable using provider="[type]"
, for example
provider="ExorLive.Desktop.Arguments.Component, ExorLive.Desktop"
The WebWrapper ships with several protocol providers. See details in the "WebWrapper API Interface" section.
Code and documentation
Sourcecode for the application and latest documentation is available here: github.com/exorlive/webwrapper
How to connect to the Webwrapper - The WebWrapper API Interface
Below are documented the general protocols. Either use a commandline interface, an XML interface (obsolete) or a Named Pipe interface (obsolete). We also have solutions that may be tailored for Active Directory or other IDP setups.
Starting the WebWrapper application from your application
The ExorLive Webwrapper is installed in a folder with an unique name in the users
local area. To find the path you have to start the ExorLive Webwrapper, open the
Windows Registry and find the key:
HKEY_CURRENT_USER\Software\Exor Live\Exor Live Webwrapper\path
.
Be aware that the webwrapper application may change the folder when it is
updated, so you have to read the registry key every time you are looking for
the folder.
ExorLive.Desktop.Arguments
This protocol enables you to repeatedly call the WebWrapper executable with
command line arguments in the form of
key=value
or key="value value"
.
Argument specification
- signon: Username of loggedin user in the third party system. Will be linked to an ExorLive user the first time the user logges in to ExorLive. The second time this signon username is seen (on the same computer / windows user) the user is automatically logged in with a single signon experience.
- queryexercises: If filled performs a query for exercises.
- queryworkouts: If filled performs a query for workouts.
-
Selecting a contact, or creates the contact if no contact with that
CustomId is found. Id+firstname+lastname is required to trigger the
contact functionality.
- id: Required. The foreign key used to identify this contact. Gets saved as "CustomId" in ExorLive.
- firstname: Required. The contacts's firstname.
- lastname: Required. The contact's lastname.
- dateofbirth: The contact's date of birth. The date will be parsed using either the ISO 8601 defaults (YYYY-MM-DD), failing that it will attempt to parse it using Windows default culture format.
- email: The contact's email address.
- mobile: The contacts's mobile phone number.
- caseid: The ID of a case or event in the third party system. Can be used when exporting a PDF of a training program from Exorlive back to the third party system, so the third party system will know where to archive it.
- openworkout: If filled with a workout id, will tell ExorLive to open that workout.
Usage example
ExorLive.Client.WebWrapper.exe provider="ExorLive.Desktop.Arguments.Component, ExorLive.Desktop" queryexercises="squat" id="user007" firstname="James" lastname="Bond" dateofbirth="1953-04-13"
XML Protocol
[obsolete]
[The XML protocol is obsolete]
When ExorLive Webwrapper uses the XML protocol you can run the webwrapper with an XML file as the argument. See the example below. To run the webwrapper you must first know where it is stored. To find the path you have to start ExorLive Webwrapper, run the Windows Registry and find the key.
This is a file-based protocol compatible with Exercise Organizer's "Exor 3" desktop application. Simply create an xml-file "input.xml" according to the following specifications and execute the WebWrapper executable with the path to the xml-file as its first argument.
XML specification
input.xml
<?xml version="1.0"?>
<exorinput delete="true" exercisequery="" workoutquery="">
<source_customerno>231</source_customerno>
<firstname>Erik</firstname>
<lastname>Røde</lastname>
<born>1911-11-23</born>
<email>erik.viking@mail.com</email>
</exorinput>
-
delete: Whether to delete the xml-file after reading in.
Defaults to
true
. - exercisequery: If filled performs a query for exercises.
- workoutquery: If filled performs a query for workouts.
- source_customerno: Required. The foreign key used to identify this person.
- firstname: Required. The person's firstname.
- lastname: Required. The person's lastname.
- born: Required. The person's date of birth, formatted using YYYY-MM-dd.
- email: The person's email address.
Usage example
ExorLive.Client.WebWrapper.exe provider="ExorLive.Desktop.Exor3.Component, ExorLive.Desktop" input.xml
Named Pipes
[obsolete]
[The Named Pipes protocol is obsolete]
One way to communicate with the webwrapper is to use Named Pipe communication. This is a new and powerful way of communication introduced summer 2016, and requires an new version (>= 2.1.4.19787) of the Webwrapper installed.
The code of the Webwrapper is open source and found here: https://github.com/exorlive/webwrapper
Included in this code is a sample client that demonstrates how to use it. If you want to implement Named Pipe communication between your application and ExorLive, please study this code, as it will give you a head start. The Sample Client is called " ExorLiveNamedPipeSampleClient" and is found here.
The naming of the pipe follows this template:
- "exorlivepipe.[processid]"
- example: "exorlivepipe.12345"
[processid] the process id of the webwrapper process and is used to allow for this to run with unique names in a terminal server environment. Some sample code about how to get this processid in your application is included in the "ProcessTool" class in the sample client.
Commands in the Named Pipes API
(all commands require that the
webwrapper is already running)
hide
show
version
close
getworkoutsforclient(customid, userid, from)
openworkout(id)
getlistofusers(customid)
setcustomid(userid, customid)
selectperson(...)
Here is a complete JSON example:
{
"Method": "SelectPerson",
"Args": {
"customid": "12345",
"firstname": "Ole",
"lastname": "dole",
"email": "ole@dole.com",
"dateOfBirth": "1970-01-01",
"gender": "M",
"profiledata": [
{
"key": "diagnosis",
"name": "Diagnose",
"value": "Lumbago",
"date": "2016-08-24 14:04",
"source": "MyJournal"
},
{
"key": "diagnosiscode",
"name": "Diagnosekode",
"value": "L2",
"unit": "ICPC-2",
"date": "2016-08-24 14:04",
"source": "MyJournal"
},
{
"key": "weight",
"name": "Vekt",
"value": "80",
"unit": "kg",
"date": "2016-08-23",
"source": "ExorLive GO",
"description": "På badevekta om morgenen",
"customkey": "A Custom Value"
}
]
}
}