Skip to main content

Creating a New State

This section explains how to add a new State under an existing State Category and how the state edit page works. By adding new states, you can define process-specific steps for your organization, making your workflows more flexible and detailed. On one page you define the state's name, immutable technical name and colors, when a record may enter it, the buttons that move the record on, the tasks opened and the e-mails sent when a record arrives, and an optional time-out.


Steps to Add a State via the Application​

1. Opening the Function​

Open Administration > Function Designs and click the code of the function (for example Asset), or choose States from its row actions. The function opens on the States tab.


2. Starting a New State​

  • In the Cards view, click Add state in the section of the category the new state belongs to.
  • In the Vertical flow or Horizontal flow view, open the New state drop-down above the map and choose the category.

See State Views and Flow Map for the views.


3. Filling In the State​

  • The state page opens as a full page titled New state. Fill in the sections described below.
  • Buttons, tasks and notifications are added in drawers that open from the right; click Add (or Apply when editing) in the drawer to put them on the page.

4. Saving the State​

  • Click Create at the top right. Nothing is saved until you do, including the buttons, tasks and notifications added in the drawers.
  • Cancel or the back arrow returns to the States tab without saving.

To edit an existing state, click its pencil button in the cards view, click Edit state in its details drawer, or double-click it on the flow map. The same page opens with the state's name as its title, a Protected tag for system-protected states and a Save button.


The State Page​

The page has the form sections on the left and a live summary on the right.

General​

Field NameDescription
NameThe display name of the State shown in the user interface. Required, at most 100 characters, and can be entered separately for each language.
Technical nameThe technical (system) name of the State, stored on the records. Required when creating, at most 100 characters, and must be unique across all States of the function (case-insensitive). On an existing state it is shown as text with the note "cannot be changed, as records store it".
Text Color / Background Color / Border ColorThe colors of the State tag shown in lists and on detail pages. The Preview shows how the tag will look.
Start stateMarks the state assigned to new records. Only one State can be the start state: the switch is disabled on other states while a start state exists, so the current one must be turned off first.

When Does a Record Come to This Step?​

  • Always: Every transition that leads here brings the record to this state.
  • When a condition is met: The record enters only if the Entry condition is met. Then:
    • If the condition is not met, the record moves to: An optional state the record moves on to instead. If none is chosen, the transition is refused.
    • Message shown when the transition is refused: Shown only when no skip state is chosen. A message template, selected from the text templates (this function's own templates are listed first).

The Condition Builder​

The entry condition (and the creation rule of a task) is built visually as rows:

  • Condition rows: Choose a field of the record (related records can be opened to reach their fields), an operator (equals, does not equal, is greater than, is at least, is less than, is at most) and a value. The value input follows the field type: Yes/No for yes-no fields, a list of options for option fields, and for dates Today, Days from today or A date.
  • Function rows: Add function adds a condition function with its arguments and the result holds or does not hold. The functions include, for example, "The current user has the role.", "The current user has at least one of the roles.", "A user is signed in", "The field holds the current user", "The field is empty", "The field has a value" and, for some functions, function-specific checks (for example the total quantity of a material transaction).
  • Groups: Add group nests rows in a group. Each group combines its rows with All are met (AND) or Any is met (OR) and can be negated with Not; Remove group deletes it. Groups go at most three levels deep.
  • Edit as text: Switches to a text editor with field and function suggestions; Edit as a list switches back. A condition that cannot be shown as rows (arithmetic, an empty value, a Guid, a Suite.Common call, a JSON rule or more than three levels of groups) opens as text and is kept exactly as it is.
  • Expression to be saved: Shows the rule text that will be stored.
  • Rule check: A moment after each change, the server checks the rule the same way saving the state does, and shows its message under the editor if the rule is not valid.

Buttons​

The transitions that move the record on (see Permitted States). Each row shows the button title, its target state and tags such as e-signature, asks for a note or Hidden expression. Add button opens the button drawer; clicking a row edits it and the trash icon removes it. When there are no buttons, the section says "This state has no buttons."

Tasks​

The tasks opened when a record arrives (see Task Options). Each row shows "Task n · n assignment(s)" and an information tag for information tasks. Add task opens the task drawer. When tasks exist, To leave with a button sets how many must be completed:

  • every task must be completed: A button moves the record only when all tasks opened here are completed.
  • a number of completions is enough: Either a Fixed value (the number of completions needed, for persons on a standing task) or a Record field (a numeric field of the record, chosen in Required completion count, with a Fixed value (if the field is empty) as fallback). The remaining tasks are cancelled when the number is reached.

Timeout​

If the record stays in this state for the given time, it moves to the target state by itself. With no duration and no field there is no time-out.

  • Fixed value or Record field: Whether the duration is a fixed number or read from a numeric field of the record (with a fixed fallback value if the field is empty).
  • Duration: A whole number of at least 1.
  • Unit: Day or Hour.
  • Target state: The state the record moves to when the time runs out. Required when a time-out is set.

Notifications​

The e-mails sent when a record arrives (see Notifications). Each row shows "Notification n · language · n recipient(s)". Add notification opens the notification drawer. When there are none, the section says "No one is emailed when a record comes to this step."

How This Step Works​

The summary card on the right describes the state in plain sentences as you type, for example "A record comes here only if the entry condition is met; otherwise it moves to (state).", "Tasks opened on arrival: 2.", "The Approve button moves the record to Approved." or "If the record stays here for 3 days, it moves to Escalated by itself."

Transitions into This Step​

For an existing state, a second card lists the transitions that lead into it, with the source state above each one. Clicking an entry opens the source state's edit page. When nothing leads here, it says "No transition leads to this step."

⚠️ Warning​

  • The start state and States protected by the system cannot be deleted. The protection flag of a system State cannot be removed.
  • Buttons, tasks and notifications added in drawers are saved only together with the state.

State Definition: Basic Entity Relationships​

The following ER diagram shows the State and its related entities in a simplified form:


Warnings and Error Messages​

  • Name Required: "Name is required"
  • Technical Name Required: "Value is required"
  • Technical Name Must Be Unique: "State name must be unique"
  • Entry Condition Missing: "Write the entry condition or choose "Always"."
  • Time-out Target Missing: "Choose the state the record moves to when time runs out"
  • Invalid Rule: The server's message about the condition is shown under the condition builder; the state cannot be saved with an invalid rule.
  • Group Depth: "Groups go at most three levels deep."