Connecting other systems¶
Cases reach other systems through connections, and other systems reach cases through messages. A project says what it asks of each system; each environment says where that system is, and holds the secrets for it. The same release then runs against test systems in development and real ones in production.
Kinds of connection¶
Kind ( |
For |
|---|---|
|
Web APIs (JSON over HTTPS), with OAuth, API keys or client certificates |
|
SOAP web services |
|
Databases: PostgreSQL, MySQL and MariaDB, SQL Server, Oracle |
|
Files in S3 or a compatible store |
|
Files on SFTP servers |
|
Messages to a RabbitMQ queue |
|
Signed events posted to another system |
|
|
|
Numbers FlowAssembly issues, such as agent codes |
When none of them reaches a system, developers can write a connector type of their own (Writing a connector type), delivered as a plugin (Writing a plugin).
In the project: what is asked¶
In the builder, Connections, Add a connection: its kind, and each operation it offers, such as “record a policy”. Each operation says which case fields it sends and which it sets from the answer. A step’s Runs chooses the operation. The project never holds addresses or secrets.
In each environment: where it goes¶
The instance’s connectors.yaml says, for each project’s connection, where
it goes here:
apiVersion: flowassembly/v0
kind: ConnectorBindings
projects:
agent-recruitment:
policy_registry: # rest: the API, and its token server
baseUrl: https://policy-registry.bank.example/api/v1
tokenUrl: https://login.bank.example/oauth2/token
timeoutSeconds: 10
core_accounts: # soap and webhook: url
url: https://core.bank.example/services/Accounts
loans_db: # sql: where the database is
host: core-db.bank.example
name: loans
user: flowassembly_loans
bureau_sftp: # sftp: the server and its host key
host: sftp.bureau.example
user: bank-loans
hostKey: ssh-ed25519 AAAA...
email: # smtp
host: smtp.bank.example
port: 587
The connection names the secret it signs in with (secretRef). Its value is
in the instance’s secrets file, or in Vault or OpenBao. Plain HTTP and
unencrypted email are refused unless the binding says allowInsecure: true,
which is meant for development stand-ins only.
When a call fails¶
A call that fails for a reason that may pass, such as a timeout or the system being busy, is tried again, waiting longer each time. One that cannot succeed, such as being refused or a bad request, goes to a supervisor at once. So does one that has failed every try. The case waits meanwhile. Admin > Settings > Queues and Supervision show what failed, and Try again sends it again once the other system is fixed. Every attempt is in the case’s history. What a system acknowledged receiving is kept as evidence (steps).
Other systems reaching cases¶
Messages over the web API. A system signed in with an account that may send messages calls
POST /api/v0/projects/<project>/messages/<message>. The message reaches the case waiting for it, or starts one (Using the web API).Signed webhooks. For systems that sign their posts rather than sign in: the project’s message names a webhook, its secret and how the signature is sent. The system posts to
/api/v0/projects/<project>/webhooks/<message>.Queues. A project’s message can name a RabbitMQ queue. The connector worker takes each message from it, and acknowledges it once a case has it.
A message that arrives before its case is ready for it can be kept for a while, if the project says so.