logic
VerifiedEnrichment0.1.1Use when: When the order of events matters and getting it wrong is a bug: concurrency, permissions, retries, or anything an agent would otherwise guess.
How the application actually works, in order: the flows a request or a person goes through, the decisions along the way, and the lifecycles things move through (a lock, an invite, a job). The core says what the parts are; this pack says what they do and when. Rules ask that every flow starts somewhere, every step leads on, every decision has labelled branches and every lifecycle has one first state.
Add it
Open it in trumly cloud to start a project with this pack already in. In an existing project, open the editor's Packs tab, choose logic, then Add. Nodes you change after adding are kept when the pack is upgraded.
From a known source. Reviewed by us, and the publisher is known.
Explore is a read-only demo in your browser: nothing to sign in to, and nothing is saved.
- Namespace
lgc--- Size
- 24 nodes
- Needs
- core@^1.0.0
- Works with
- api@^0.3.0, data-model@^0.6.0
- Enriches
- capability, requirement, component, interface
- Publisher
- trumly
- Versions
0.1.1·0.1.0- Checksum
ea3b2374b7b82ea7…
Examples 1
- Listing jobsA starting point
A flow for listing every job, with a decision on whether the database answers, and a lifecycle for a job from queued to done, with retries.
Show the 27 nodes
- Jobs listed
acceptance-criterionacceptance-criterion-jobs-listed - Ops staff
actoractor-ops-staff - View job status
capabilitycapability-view-job-status - Ops API
componentcomponent-ops-api - Ops db
datastoredatastore-ops-db - Production
environmentenvironment-production - List jobs
flowflow-list-jobs - Timely ops visibility
goalgoal-timely-visibility - Live job status
incrementincrement-live-status - Job
lifecyclelifecycle-job - Job status age
metricmetric-status-freshness - Ops API
overviewoverview - List jobs
requirementrequirement-list-jobs - Abandoned
statestate-abandoned - Done
statestate-done - Failed
statestate-failed - Queued
statestate-queued - Running
statestate-running - Ask the API for jobs
stepstep-ask-api - Open the job list
stepstep-open-list - Does the database answer?
stepstep-read-db - Show an error
stepstep-show-error - Show every job
stepstep-show-jobs - Dev
teamteam-dev - Platform
teamteam-platform - Build status API
work-packagework-package-build-status-api - Provision database
work-packagework-package-provision-database
- Jobs listed
Patterns 1
Small fragments you lift into a project of your own. In the editor or through an agent, insert one under its root node.
- Starter flowA flow with a start, one action and an end. Add it for each scenario whose order matters, then rename the steps and add the decisions.Hangs from a
flow.
Planes 2
- Flows
- Lifecycles
Types 4
- flowUse for one scenario from the thing that sets it off to how it ends, such as opening a node or adding a person to a project. Its steps are its children.
- lifecycleUse for something that moves through states over its life, such as a lock, an invite or a job. Its states are its children.
- stateUse for one state of a lifecycle, such as free, held, queued or failed.
- stepUse for one thing that happens in a flow: it begins, someone or something acts, a choice is made, it waits, or it ends. A decision's outgoing `next` links each say when they are taken.
Link types 6
- begins-at
flow, lifecycle → step, stateUse to say which step a flow begins at, or which state a lifecycle begins in. - by
step → actor, component, external, team, datastoreUse to say who or what does a step. - enforces
step, state → requirement, constraintUse to say that a step or state carries out a requirement or constraint, so the rule is written once. - moves-to
state → stateUse to say that a state can be followed by another. Say what causes it in `on`, and any condition in `guard`. - next
step → stepUse to say which step can follow this one. A decision gives each branch a `when`. - touches
step → interface, queue, datastore, api-endpoint, api-event, data-tableUse to say what a step works on. Say how in the link's `how`: call, read, write, publish or subscribe.
Rules 12
- WarningEvery action says who or what does it
- ErrorEvery decision has two or more branches and each says when it is taken
- WarningA final state has no way out
- ErrorEvery flow begins at exactly one start step
- WarningEvery flow details or satisfies something in Define
- ErrorEvery lifecycle begins in exactly one initial state
- WarningEvery state that is not final has a way out
- WarningEvery state except the first is reached from another state
- ErrorEvery step except an end has a step that follows
- WarningEvery step except the start is reached from another step
- WarningA step only leads on to steps of its own flow
- ErrorEvery move between states says what causes it