Workflow App Setup
OneDevops-OnBots allows to have approval flow for the action commands that are performed by The Workflow app is an application that will make this feature work with your bots. It is a very small and lightweight node application that will handle the approval flow of actions between the bots and chat applications.
The configuration variables are included in the .env file which directly located inside the WorkflowApp. Please refer the below table for setting the values of the variables:
Variable Name | Purpose |
---|---|
MONGO_IP | public IP address of the machine where mongodb is running |
MONGO_DB | mongodb database name in which tickets for approval flow will be stored |
MONGO_COLL | mongodb collection name in which tickets for approval flow will be stored (this collection should be inside the database set as MONGO_DB) |
HIPCHAT_AUTH_TOKEN | API access token generated in Hipchat (required only for approval flow with hipchat) |
HIPCHAT_URL | <your_hipchat_team_url>/v2/room/ |
MIDWAREPORT | port number where the workflow app will run |
BOT_IP | port number where bot is running |
1. Clone WorkflowApp from repository
2. Install the dependencies by running the following command inside the Workflow app folder:
- npm install
npm install will install the dependencies that are listed in package.json
3. Run the app with the following command:
- nodejs app.js
The application has to be reachable from internet beacuse web hosted chat applications like Slack and Hipchat will post data to this application for approval flow.