SpiffWorkflow is a software development platform for building, running, and monitoring executable diagrams https://www.spiffworkflow.org/
Go to file
burnettk 5fb4f7ee74 Squashed 'connector-proxy-demo/' changes from fb5c24eaf..7264d61b2
7264d61b2 Fixes based off KB's super kind review. ------- * Remove unnecessary packages from dockerfile for the demo-connect proxy. * Rename an environment variable that mentioned Status.im in what is now a generic connector. * Fixed a spelling mistake.
990cecaa1 fixing a few borked up things about the connector-proxy-demo's docker contaier.
2bcac532e Don't look for sources where there aren't any
bb2efaf51 more tweaking

git-subtree-dir: connector-proxy-demo
git-subtree-split: 7264d61b2f65989d40d0bc1fb5cea9585b88771a
2022-12-10 23:40:39 -05:00
bin Squashed 'connector-proxy-demo/' changes from fb5c24eaf..7264d61b2 2022-12-10 23:40:39 -05:00
.gitignore Squashed 'connector-proxy-demo/' content from commit fb5c24e 2022-11-18 13:27:01 -05:00
Dockerfile Squashed 'connector-proxy-demo/' changes from fb5c24eaf..7264d61b2 2022-12-10 23:40:39 -05:00
LICENSE Squashed 'connector-proxy-demo/' content from commit fb5c24e 2022-11-18 13:27:01 -05:00
README.md Squashed 'connector-proxy-demo/' content from commit fb5c24e 2022-11-18 13:27:01 -05:00
app.py Squashed 'connector-proxy-demo/' content from commit fb5c24e 2022-11-18 13:27:01 -05:00
poetry.lock Squashed 'connector-proxy-demo/' changes from fb5c24eaf..7264d61b2 2022-12-10 23:40:39 -05:00
pyproject.toml Squashed 'connector-proxy-demo/' changes from fb5c24eaf..7264d61b2 2022-12-10 23:40:39 -05:00

README.md

connector-proxy-demo

A Spiff-Connector for demonstration purposes - shows how to build connectors to some common 3rd party systems.

How to create a Connector Proxy for SpiffWorklow

Step 1. Create a python project with a few dependencies:

Create a bare-bones Flask application that depends on the core spiffworkflow-proxy (a flask blueprint) and any connector dependencies you wish to use. We will hopefully be adding a number of available connectors in the future. Please checkout the connector-aws repository for an example of how to create connections to new services.

  python = "^3.11"
  Flask = "^2.2.2"
  spiffworkflow-proxy = {git = "https://github.com/sartography/spiffworkflow-proxy"}
  connector-aws = { git = "https://github.com/sartography/connector-aws.git"}

Step 2.

Create a basic Flask Application that uses the SpiffWorkflow Proxy's Flask Blueprint

import os
from spiffworkflow_proxy.blueprint import proxy_blueprint
from flask import Flask

app = Flask(__name__)
app.config.from_pyfile("config.py", silent=True)
app.register_blueprint(proxy_blueprint)
if __name__ == "__main__":
    app.run(host="localhost", port=5000)

Step 3.

Fire it up.

#> flask run

Any dependencies you add will now be available for SpiffWorkflow to call using a Service Task. What's more, those services are now discoverable! So when someone drops a Service Task into their diagram, they will have a dropdown list of all the services you have made available to them. And those services will know what parameters are required, and can prompt diagram authors to provide information necessary to make the call. This can be no parameters at all (just give me a fact about Chuck Norris) to arbitrarily complex parameters such as a json structure to be added to a DynamoDB Table.