Accounts
Thesrc/accounts/ folder is where the process’s organization, its teams and its users are declared.By convention, each type of account is declared in a separate file, and all are exported in the
index.ts.
To be generated, the accounts must be used in the workflow’s definition.
The files/ folder is used to store the account’s avatar images.
Environment variables
The process’ environment variables are declared in the.env file and in the .env.<envName> files depending on the generation environment.The
src/env/index.ts file is used to parse with a Zod schema and export the environment variables.Additionnally, the environment variables are added to the workflow’s definition so that they can be used inside the actions’ effects.
Workflows
The process’ workflows are defined in subfolders of thesrc/workflows/ folder, as well as a shared folder which is used to declare shared constants, types and functions.All worklows are exported in the
index.ts file.
Workflow structure
Each workflow should follow the following structure:Actions
Actions
Actions are defined in separate files and all are exported in the
index.ts file.Definitions
Definitions
The definitions folder is where the static data and functions are declared, see Definitions for more information.
data/repositories.ts
The workflow’s data are declared in this file, they then can be used in the actions’ effects.
functions/index.ts
The workflow’s functions are declared in this file, they then can be used in the actions’ effects.
Types
Types
state.types.ts
This file is used to declare the type of the workflow’s state data.
business.types.ts
This file is used to declare types unrelated to the configuration itself of the workflow. For example a status enum, a list of business programs, etc.
dsl.types.ts
This file is where the workflow’s dsl context is instantiated.
paths.types.ts
This file is where the types which will be used to validate the paths used in the UI widgets are declared.
Shared folder
Theshared/ follows the same structure as the workflows/ folder,
but is used to declare shared constants, state and functions which will be automagically added to all workflows.