Raincatcher is a set of templates and a field workforce management (WFM) application that connects a business' back-office with its fleet of mobilized employees. Raincatcher leverages mobile hardware, making use of each employee’s mobile phone.
Raincatcher consists of a set of reusable modules that can be included in your application using browserify.
Raincatcher modules make use of the mediator pattern to enable loose coupling between the Raincatcher modules and their consuming applications / modules as shown in the following diagram:
Raincatcher modules are packaged and distributed using npm and export as:
-
Angular.js directives or services providing client-side functionality for both the mobile and portal clients.
-
Express.js routes providing a REST API to be consumed by the client-side portions of the module.
-
FeedHenry sync configurations which enable data synchronization of module data.
A demonstration is also provided as a project template that shows how the modules can be assembled into an application. See link:The Demo Solution Architecture for more information.
RHMAP provides a Raincatcher project template to help you run the demonstration.
-
Create a Raincatcher project as follows:
-
Log in to the Studio and navigate to the Projects area.
-
Click New Project.
-
Select the WFM Demo Project template, available in the Tech Preview category.
-
Enter a name for the project, for example
wfm-demo
. -
Click Create.
-
Click Finish at the bottom of the page when the project is created.
-
-
Create an MBaaS Service using the WFM Auth Service template:
-
Navigate to the Services & APIs area and click Provision MBaaS Service/API.
-
Click Create New Service.
-
Select the WFM Auth Service template, available in the Authentication category.
-
Name the service, for example
wfm-auth
. -
Click Next.
-
Click Finish at the bottom of the page when the service is created. The service details page is displayed.
-
Select Deploy from the left menu.
-
Select the target environment from the pulldown list on the right of the page.
-
Click Deploy Cloud App.
-
-
Upgrade the database for the Cloud App and the WFM Auth Service:
-
Select the Projects header menu item.
-
Go to the Cloud App
-
Select Data Browser from the left menu
-
Click on the Upgrade Database button in the top right corner, and confirm by clicking Upgrade Now. Wait until the upgrade process finishes
-
Navigate to the Services & APIs area
-
Select the WFM Auth Service created
-
Select Data Browser from the left menu
-
Click on the Upgrade Database button in the top right corner, and confirm by clicking Upgrade Now. Wait until the upgrade process finishes
-
Deploy WFM Auth Service
-
-
Create an auth policy using this new MBaaS service.
-
Navigate to the Admin area and click Auth Policies.
-
Click Create.
-
Name the policy, for example
wfm-policy
. -
Select the MBaaS Service type.
-
Select the
wfm-auth
service. -
Enter
/api/wfm/user/auth
as the endpoint. -
Select the target default environment. The Validate Settings section appears.
-
Enter the Username
trever
and Password123
and click Validate. The response JSON should have astatus
property and the property value ofok
. -
Click Create Auth Policy.
-
-
Associate the WFM Auth Service with the WFM Demo Project.
-
Navigate to the Services & APIs area and select the
wfm-auth
service created earlier. -
Enter the project name at the bottom of the Details page in the Access Control section under Service Settings:
-
Enter the name of the project, for example,
wfm-demo
. -
Click the Save Service button.
-
-
Set the
FH_SERVICE_AUTHORISED_PROJECTS
environment variable: -
Set the
WFM_AUTH_GUID
environment variable using the project ID:-
From the left-hand side menu, select Details.
-
Select the Projects header menu item.
-
Select the
wfm-demo
project created earlier. -
Select the cloud app.
-
From the left-hand side menu, select Environment Variables.
-
Enter
WFM_AUTH_GUID
for the name, and paste in the Service ID copied above for the value. -
Click Push Environment Variables.
-
-
Set the
WFM_AUTH_POLICY_ID
environment variable as the auth policy name.-
Select the Projects header menu item.
-
Select the
wfm-demo
project. -
Select the cloud app.
-
From the left-hand side menu, select Environment Variables.
-
Click Add Variable.
-
Enter
WFM_AUTH_POLICY_ID
for the name, and set the auth policy name created earlier as the value, for example,wfm-policy
. -
Click Push Environment Variables.
-
-
-
Check that the auth service, the cloud app, and the portal app are all deployed and started.
-
For each of the above mentioned apps, select Deploy from the left-hand side menu.
-
Ensure that the most recent deployment has a result of Success.
-
If it does not indicate success, click Deploy Cloud App and verify the deployment is successful.
-
The apps are now created, configured, and deployed.
To check the web app deployment in RHMAP:
-
Select the Projects header menu item.
-
Select the wfm-demo project.
-
Select the web app.
-
From the left-hand side menu, select Details.
-
Click Current Host.
-
Login with user trever and password 123.
Running the Raincatcher demo solution locally describes how to set up your local environment for Raincatcher development.
Module Integration explains how to introduce a new module to the solution providing extra functionality.