Skip to content

Constructs

Constructs are the basic building blocks in Process Focus. A construct is a component that defines something in an organisation: an organisational unit, a role, a process, a step in a process, a form, or a list.

A construct always has the same structure:

  1. It has a parent (owner).
  2. It has an immutable name (if the name changes, we assume it’s a new thing).
  3. It has properties unique to the component.

An example is a department:

const hr = new OrgUnit(org, "hr", {
name: "Human Resources",
type: "department",
})

The parent here is the organisation itself, the name is “hr”, and we specify two properties: name and type. The name property allows you to change the name without changing the ID “hr”. Type is used on the org chart page.

All constructs in Process Focus follow the same three-part structure.

The only exception to this rule is the root construct Organisation: an organisation does not have a parent, nor does it have a name:

export const org = new Organisation({
name: "Demo Org",
acronym: "Demo",
timeZone: "Pacific/Auckland",
})

Each construct’s immutable name is a segment of its path. Process Focus joins the names from the organisation root down to the construct, using / between segments. For example, a recruitment team under hr has the path /hr/recruitment.

Names need to be unique within their parent. HR and Finance can each define a manager role and a purchase-request process. Their paths distinguish them: /hr/manager and /finance/manager are separate roles, and /hr/purchase-request and /finance/purchase-request are separate processes. Changing a display name leaves the path unchanged. Changing an immutable name or moving a construct to a different parent changes its path and the paths of its children.

The Dashboard uses these paths in URLs. For example, the workflow for /finance/purchase-request is at /processes/workflow/finance/purchase-request. In Cedar policies, the path identifies the entity within its type: PF::OrgUnit::"/hr/recruitment", PF::Role::"/finance/manager", or PF::Process::"/finance/purchase-request".