Elements
This page is a reference catalog. For deeper concept material, see Why Studyflow and Studyflow vs BPMN. For worked examples that use these elements in context, see:
- Cognitive tasks –
CognitiveTask, timer events, trial-level structure. - CONSORT – boundary error events, dropout handling.
- Data collection – questionnaires, parallel gateways, consent.
- Analysis pipelines – data operations, schemas, exclusive gateways.
- MLOps – snapshots, monitoring sub-processes, boundary events.
- Multi-agent collaboration – choreography.
The main element of a studyflow diagram is the Study, which serves as a container for all other elements:
bpmn:Process and is the top-level container for all elements and workflows. Has runtime (cloud/local/hpc), authors, and the inherited isExecutable properties.Within a Study element, you can define various elements. In addition to the standard BPMN elements, Studyflow introduces specialized elements for research workflows in cognitive sciences in four main categories: events, activities, gateways, and data. Every element also carries the core BaseElement documentation (markdown, stored as BPMN’s own documentation entries); a checklist is a studyflow:checklist-marked documentation entry, so its items stay visible in any BPMN tool.
Schemas
Studyflow elements ship in a layered set of moddle schemas:
core(always loaded):Study,StartEvent,EndEvent,SequenceFlow,Activity,Arguments, plus the data-infrastructure types (Dataset,DataStorage,DataCatalog,Schema,Array,Snapshot).cognitive(always loaded): cognitive and behavioral elements (CognitiveTask,VideoGame,Rest,Questionnaire,Instruction,BehaverseTask,RandomGateway,EligibilityGateway,Actor).BehaverseTask(formerly the separatebehaverseschema) is aCognitiveTaskwhoseinstrumentis pinned tobehaverse, delivered by the Behaverse Unity runtime.omniprocess,datatrove,openbci(optional): domain extensions enabled from the modeler’s schema palette.
See Extensions for the element catalogs of the optional extensions, and Authoring schemas for how to author your own schema.
Events
consentFormUri (URL of a consent form) gates entry on informed consent at runtime; leave it unset to skip the consent step entirely.redirectTo URL redirects the participant on completion; supports {COMPLETION_CODE} placeholder. completionCodeType is none, static (fixed code), or dynamic (extracted from URL at runtime, e.g. Prolific).Activities
content) to participants. Inherits from Questionnaire but uses an instruction instrument.instrument enum covers common standardized instruments (PHQ-9, GAD-7, BDI-II, STAI, PSS, WHO-5, BFI, DASS-21, PANAS) and accepts custom identifiers.instrument enum covers PsychoPy, jsPsych, lab.js, OpenSesame (and accepts custom IDs). configurations is instrument-specific YAML embedded in the diagram.instrument identifies the engine (e.g. unity, godot, web); configurations is engine-specific YAML.behaverse schema.configurations holds e.g. duration and eyes-open/closed.In addition, the abstract Arguments trait augments any BPMN activity with the arguments mapping. An activity’s inputs and outputs are not listed anywhere: they are detected from the data associations drawn on the canvas (connect a data element to a task and it is an input; the association’s parameter/result refine the binding). Whether a step is a data operation is derived the same way, not stored: it names a data verb (operationType) or runs software (implementation) without being a participant-facing instrument.
Gateways
algorithm is probabilistic or round-robin; probabilityFunction defines the distribution (default uniform).Two additional gateways are provided by the cognitive schema (no dedicated icons – they render as exclusive gateways with distinguishing markers in the modeler):
- Stratified random assignment is a
RandomGatewaywithstratifyByset (e.g.age_band,sex,baseline_score): the cohort is partitioned by that variable and allocation runs independently within each stratum. Useful when the design requires balanced allocation across covariates; preset as theStratified allocationpalette template. EligibilityGateway– encodes inclusion/exclusion criteria. Participants meetinginclusionCriteria(and none ofexclusionCriteria) proceed; others are routed to a screen-out branch. Criteria are markdown lists.
For control-flow gateways, Studyflow also uses standard BPMN gateways (ExclusiveGateway, ParallelGateway, InclusiveGateway).
Data
DataCatalog and stored in a DataStorage. Carries a format (BDM, BIDS, Psych-DS, Kedro), an optional schema, and format-specific properties (e.g. bidsDataType, bdmDataLevel).[raw], [processed]) capture lifecycle.The full data-element vocabulary (with definitions, attributes, and operations) lives in the dedicated Data reference:
DataCatalog– persistent registry of datasets (e.g.openneuro,behaverse).DataStorage– persistent physical storage (database, filesystem, object store). Referenced viaDataStoreReference.Schema– formal structure for a named collection of types (CSVW columns for tables; dimensions/types for arrays). Carriesformatand inlinebody.Array– multi-dimensional tensor (images, videos, fMRI). Expects aschema.Snapshot– immutable version of a dataset, table, or array. Carriessourceandversion.
The current version of Studyflow includes built-in support for several data models commonly used in cognitive sciences:
Element-to-schema mapping
Each visual element in the modeler maps to a type definition in one of the Studyflow moddle schemas under src/assets/schemas/:
- Event elements (
StartEvent,EndEvent) live incore.moddle.yamland extend the corresponding BPMN event types. - Activity elements (
Instruction,Questionnaire,CognitiveTask,VideoGame,Rest) live incognitive.moddle.yamland map tobpmn:Taskwith domain attributes shown in the inspector. - Gateway elements (
RandomGateway,EligibilityGateway) live incognitive.moddle.yamland map tobpmn:ExclusiveGateway. - Data elements (
Dataset,DataStorage,DataCatalog,Schema,Array,Snapshot) live incore.moddle.yaml; tabular and tensor structures map onto BPMN data references.