Skip to content
This repository was archived by the owner on Apr 27, 2021. It is now read-only.
rapidproPublic archive

About

Repository for definition and runner for RapidPro flow engine.

Resources

Stars

4 stars

Watchers

5 watching

Forks

Latest commit

 

History

313 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RapidPro Flows

Java implementation of the RapidPro flow engine.

Usage

Org org = new Org("RW", "eng", ZoneId.of("Africa/Kigali"), DateStyle.DAY_FIRST, false);
List<Field> fields = new ArrayList();
Contact contact = new Contact(...);
Flow flow = Flow.fromJson("...");

Runner runner = new RunnerBuilder()
    .withLocationResolver(...)
    .build();

RunState run = runner.start(org, fields, contact, flow);

List<Step> steps = run.getCompletedSteps();
List<Field> fieldsToCreate = run.getCreatedFields();

runner.resume(run, Input.of("Yes"));

String json = run.toJson(); // run state can be serialized as JSON

RunState restored = RunState.fromJson(json, flow); // and then de-serialized when needed

runner.resume(run, Input.of(123));

Notes

For use on Android, replace regular ThreeTen dependency with https://github.com/JakeWharton/ThreeTenABP

About

Repository for definition and runner for RapidPro flow engine.

Resources

Stars

4 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages