In order to enable the THTI project, we're assembled a solution that allows complex workflows to be created an changed by ODK form submission. The current use case captured is this:
Nodes 1, 3, and 5 each represent a submitted ODK form. (Update: two additional nodes or ODK forms were added before node 1). XLS forms can be found here: HIV XLS Forms
Nodes 1, 2, 3 and 4 each represent a submitted ODK form. XLS forms can be found here: TB XLS Forms
To accomplish this, we'll use:
- RapidPro (via the hosted textit.in service)
- Gather
- Aether Stream Consumer
- Aether Elasticsearch Consumer
The main drivers of the workflow are the Stream Consumer and RapidPro, related as described in the following diagram:
Artifacts for all of the consumers and RapidPro can be found in the appropriate folders.
All the Pipelines are available in StreamConsumer/README.md. For each pipeline, you will need to set:
- The
textit api tokenforrapidpro_auth_headeravailable on Textit - The right rapidpro IDs. A rapidpro flow ID can be found in the url of the flow.
- (Optional) The username and password for the Aether/Gather.
All username and passwords are available in the HTI Credentials note in the Shared Folder on LastPass.
- Get the list of form submissions (ordered by submission date):
https://eha-data.org/htidev/kernel/entities.json?ordering=-modified - Get the list of pipelines:
https://eha-data.org/htidev/stream-consumer/pipeline/list - Get a specific pipeline:
https://eha-data.org/htidev/stream-consumer/pipeline/get?id=pipeline_id - Get the list of subscriptions:
https://eha-data.org/htidev/es-consumer/subscription/list - Get a specific subscription:
https://eha-data.org/htidev/es-consumer/subscription/get?id=subscription_id - Get a specific job:
https://eha-data.org/htidev/stream-consumer/job/get?id=job_id - Get the list of jobs:
https://eha-data.org/htidev/stream-consumer/job/list - Get the list of topics (ordered by last updated):
https://eha-data.org/htidev/kernel/schemadecorators.json?fields=modified%2Cname%2Cid%2Ctopic&ordering=-modified - Add/update a pipeline:
http --json POST https://eha-data.org/htidev/stream-consumer/pipeline/add -a username:password < ./StreamConsumer/pipeline_file.json - Add job to consumer:
http --json POST https://eha-data.org/htidev/stream-consumer/job/add -a username:password < ./StreamConsumer/job_file.jsonExample of job:
{
"id": "rural_a_1",
"name": "HIV Rural A",
"pipelines": [
"rural_a"
]
}
- To see if a flow was started in RapidPro (textit), go to
https://textit.com/flowstart/ - Kakfa topics can be found in the
ehealth-africa-prod1cluster in Confluent
- You can test the entire flow based on this test file.


