Skip to content

Repository files navigation

FlowRunner

Flow Runner implements the Flow Content Interop spec v1.0.0-rc4 as documented at https://floip.gitbook.io/flow-specification/. It provides the means to Run a flow defined in the specification and interact with some user.

This Flow Runnner only supports the TEXT, RICH_MESSAGING modes.

Implemented from the Spec

LayerBlockImplemented?Notes
1Core.LogYes
1Core.CaseYes
1Core.RunFlowYes
1Core.SetContactPropertyYes
1Core.SetGroupMembershipYes
2ConsoleIO.PrintNoThis is not useful for us.
2ConsoleIO.ReadNoThis is not useful for us.
3MessagePrimitives.MessageYes
3MessagePrimitives.SelectOneResponseYes
3MessagePrimitives.SelectManyResponsesNoWhatsApp does not support this.
3MessagePrimitives.NumericResponseYes
3MessagePrimitives.OpenResponseYes
4SmartDevices.LocationResponseNoTBD
4SmartDevices.PhotoResponseNoTBD

How to use the API

What is a Context.

What is an Output.

Modules

  • FlowRunner.Compiler parses and compiles JSON flows according to the content spec into an internal representation that can be Run.

  • FlowRunner.Run takes a compiled flow, a state and a context and returns new state and user IO.

  • FlowRunner.Context is a struct that contains context for a run. It contains the channel, contact and .

Installation

If available in Hex, the package can be installed by adding flow_runner to your list of dependencies in mix.exs:

defdepsdo[{:flow_runner,"~> 6.15.1"}]end

Doing releases

Use the Github UI to create a new release and publish it. Make sure to update the mix.exs and README.md version references before publishing otherwise hex.pm will complain and prevent you from publishing over an already existing released version.

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/flow_runner.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

12 watching

Forks

Releases

Packages

Used by

Contributors

Languages