Skip to main content

Workflows Management

A workflow implements a process model — the sequence of states an object moves through, and the rules for moving between them. Starhive's workflow capability is flexible enough to model very different processes: an order fulfillment pipeline, a quarterly security review, or a simple task board.

Terminology​

  • State (workflow state) — where an object sits at rest, like a state machine's state.
    • End state — a state flagged as "done," filterable in StarQL (see Workflow attribute type).
    • Any state — a placeholder representing every state, so you can define one transition that applies from anywhere instead of one per state.
  • Transition — the action of moving an object from one state to another.
  • Workflow — the full set of states and transitions.

Modeling a workflow​

Workflows are created at the space level, by adding a Workflow-type attribute to an object type and assigning a workflow to it — either an existing unassigned workflow, or a new one the system creates automatically.

Conditions​

A transition can have conditions — all of them must pass for the transition to be available:

ConditionWhat it checks
UserThe transition is enabled only for specific users, or users found in a User attribute (directly, or on a referenced object).
EmailSame idea, matched against an Email attribute (directly, or on a referenced object).
Boolean TrueA specified boolean attribute must be true.
Attribute ValueAn attribute's value must meet given criteria.
Attribute MandatoryA specified attribute must not be empty.
Compare Another DateA date attribute is compared to another date attribute, or an expression like now, using d/w/m/y offsets — e.g. "later than now," "earlier than or same as 1d," "later than -6m."
Compare NumberAn Integer, Decimal or Rating attribute is compared to another one of those, or to a fixed number — e.g. "less than or same as Approval limit," "greater than 1000."
Previous StateThe object must have been in one of the selected states. By default any state in its past counts; "only the state it was in immediately before" narrows it to the last move.
Separation of DutiesWhoever already made a given move on the object — out of one state, into another, either left as any — cannot make it again. Four eyes: the person who submitted an expense cannot approve it.
TypeThe transition belongs only to the selected object types. Selecting a type includes every type that extends it. Use it when several types share one workflow through an abstract parent but need different lifecycles.
Always FalseNever passes — used to disable a single transition without disabling the whole workflow.

Previous State and Separation of Duties read the moves an object has already made. That record starts when the object is first transitioned after these conditions were released, so an object that has been sitting in a workflow since before then has nothing behind it: Previous State holds it back until it moves again, and Separation of Duties does not recognise what its earlier actors did.

Both are answered from the object's past alone, so a transition they keep from the object is not offered in the first place, rather than refused when the state is saved. The Type condition behaves the same way: it is answered from the object's type, so a transition that does not belong to that type is simply not among the ones offered.

Transition screens​

A screen is a small form shown when a transition runs, to capture or confirm information before the state actually changes. Configure it from a transition's chevron menu — an optional description, and which attributes to show. Without a configured screen, the transition applies immediately.

Workflow graph​

Every workflow can be viewed as a graph of its states and transitions — hover a workflow value on an object, or open workflow configuration directly.

Using workflows on objects​

Once a type has a Workflow attribute, only the states reachable from an object's current state (with all conditions satisfied) are offered as valid transitions — unlike a normal attribute, you can't set it to an arbitrary value.

For CSV imports, the value must be a state name reachable by a valid transition from the object's current state (or its initial state, for new objects); rows that don't satisfy any valid transition are rejected and reported in the import's error file.

Permissions​

ActionWorkspace memberSpace memberSpace adminSpace owner
Create workflow✓✓✓✓
View workflow—✓✓✓
Edit workflow——✓✓
Delete workflow——✓✓