Building applications¶
An application in FlowAssembly is a project: a folder of files that says what a piece of case work is. It holds:
the processes and their steps;
the forms people fill in;
the data each case keeps;
the rules that decide things, and the scripts that work things out;
the connections to other systems, and the documents and emails it sends.
You build it in the builder, on your own machine, and keep it in Git. Releases of it reach an environment through a pipeline and an approval. No change to FlowAssembly itself is needed.
This guide is for builders: the people who make applications. What each part can do, step by step, is in What builders can do.
Install the builder¶
You need Python 3.12 and Git, on Linux, a Mac, or Windows inside WSL. Install
the flowassembly package your FlowAssembly supplier gives you, in a virtual
environment of its own:
python3 -m venv ~/flowassembly
~/flowassembly/bin/pip install flowassembly-*.whl
export PATH="$HOME/flowassembly/bin:$PATH" # add this to ~/.bashrc to keep it
It needs neither Node.js nor a copy of FlowAssembly’s source.
Start a project¶
fa new leave-requests # a small project that already works
fa studio leave-requests # the builder, in your browser
fa templates lists what a project can start from: FlowAssembly’s own, such
as the agent recruitment reference application (fa new my-app --from reference), and your organisation’s. Keep the terminal open while you work in
the builder.
What a project holds¶
Part |
In the builder |
What it is |
|---|---|---|
Roles |
Project, Roles |
Who is involved, such as a loan officer or a manager. People get roles from the access policy in each environment. |
Case data |
Case data |
What a case keeps: each field, its kind, and what values it may have. Every write is checked against it. |
Forms |
Forms |
What people see and fill in at a step. A field’s key is a case data field. |
Processes |
Processes |
The steps, in BPMN: tasks for people, steps that call other systems or run scripts, decisions, timers and messages. |
Decisions |
Decisions |
Rules in a table, with tests beside them. |
Scripts |
Scripts |
Python that works something out, run in isolation, with only the fields it is given. |
Connections |
Connections |
What the project asks of other systems. Where each one goes is set per environment, not in the project (Connecting other systems). |
Documents and emails |
Documents, Emails |
Letters and schedules as PDFs, on the organisation’s letterhead, and emails, from templates. |
Tests |
Processes, Run this process, Save as a test |
Paths through a process, with what each step does, kept and run on every change. |
A good order to build in¶
The starter project is small and already works. Change it step by step, and use Run this process often:
Roles: who is involved.
Case data: what a case keeps.
Forms: drag fields onto each form.
The process: draw the steps, each person’s steps in their role’s lane, and choose each step’s form.
Decisions and scripts: a step’s Decision or Runs chooses one.
Paths: on each flow out of a gateway, its condition, such as
approval_level == "manager".Connections, documents and emails: a step’s Runs chooses them.
Under Problems, at the foot of the builder, is what still needs attention.
Try it, and keep it¶
Run this process acts out a case in the builder: you act as each role in turn. Nothing outside is called. You enter what other systems would return, unless you start the builder with
fa studio <project> --secrets <file>to call real test systems.When a run ends the way it should, Save as a test.
Check the project as the pipeline will, then commit:
fa validate leave-requests && fa test leave-requests
git add -A && git commit -m "What changed"
Release it¶
A project’s repository has a pipeline (from FlowAssembly’s project template).
Each pull request validates and tests the project. Each merge to main
makes a signed release and deploys it to development. Promoting the same
release to production needs an approver’s signature. The operators’ guide
describes the same path from their side
(Administering FlowAssembly).
When a release changes a process that has cases running, the deployment says what changes for them. Cases carry on in the release they started in, unless an operator moves them. To move them, a project can say how their data changes, in a migration file (steps).
Move, copy and retire a project¶
fa export, fa import and fa clone move and copy a project, and
fa archive stops a project starting new cases.