Skip to content

Connector Proxy in 5 mins

jbirddog edited this page Jan 23, 2024 · 13 revisions

Connectors and the Connector Proxy

Service Tasks

  1. Allow communication with external systems
  2. In the core SpiffWorflow library, implemented using the delegate pattern
    1. SpiffWorkflow has no knowledge of "http/GetRequest", "aws/UploadFile", "os/SpawnProcess"
    2. SpiffWorkflow handles parsing extensions, evaluating expressions, delegation to the host app, updating task data
  3. The host application is responsible for the communication to the external system

Connector Proxy

  1. Middle man for external communication from the backend of Spiff Arena
    1. Tailored for the backend, but could be used by other host applications
  2. Made up of some group of Connectors and a discovery mechanism
  3. Brokers communication to/from Connectors in a generic fashion
  4. Allows the backend to remain agnostic to all external dependencies needed for varying deployments, avoiding things like:
    1. ClientA wants to write to AWS, ClientB refuses to use any app with any mention of AWS
    2. ClientA requires an old version of SomeSDK, ClientB requires a bleeding-edge version that would conflict
    3. ClientA really needs to talk to a library that is written in Java
    4. ClientA has a proprietary library that cannot be included in the backend
  5. When the backend needs to facilitate a ServiceTask delegate call from SpiffWorkflow it does so in a generic fashion allowed by the Connector Proxy abstraction

Connectors

  1. Isolated Python packages that conform to a pre-defined protocol
  2. Do the "actual work" of talking to an external system
    1. Use data provided by the Connector Proxy to form the needed request
    2. Make the request using the required protocol/sdk (xero-sdk/HTTPS/FTP/Gopher/Fax/OS System Calls/docker run)
    3. Use the result to form a response that can be returned through the Connector Proxy
  3. Examples
    1. xero
    2. waku
    3. aws
    4. smtp
    5. http

External Contributions More Than Welcome

  1. Connector Proxies and Connectors make excellent targets for external contributions
  2. Can be written in any language and don't require full working knowledge of Spiff Arena or BPMN
  3. Can utilize Spiff Arena's docker containers and set a custom Connector Proxy URL on boot