Skip to main content

Activity

Source: src/models/ropa.ts (ActivitySchema)

Activities are nested inside Ropa.ous[].activities[]. Each activity represents one GDPR processing activity (an Art. 30 record). Activity IDs are unique per Ropa document; they are assigned by incrementing Organization.highestActivityId at creation time.

Fields

Identity & timestamps

FieldTypeRequiredDefaultNotes
activityIdNumberUnique per Ropa. Assigned from Organization.highestActivityId.
activityNameStringMax 120 chars.
createdAtNumberDate.now()Unix timestamp in milliseconds (not seconds).
updatedAtNumberDate.now()Unix timestamp in milliseconds. Must be updated manually on write.
FieldTypeNotes
purposeShortStringMax 512 chars.
purposeLongStringMax 2048 chars.
legalbasisString[]Enum from legalbasisValues. Art. 6 legal bases; multiselect.
legalbasisLongStringFree-text clarification of the legal basis. Default "".
legalbasisSpecialString[]Enum from legalbasisSpecialValues. Art. 9 special category bases; multiselect.

Data & categories

FieldTypeNotes
dataCategoriesString[]Enum from dataCategoriesValues. Types of personal data processed.
datasubjectCategoriesStringFree text; describes categories of data subjects.
activityCategoriesString[]Enum from activityCategoriesValues. Processing activity type.
dataOriginStringFree text; origin of the personal data.
timeLimitStringFree text; data retention period.

Parties

FieldTypeDefaultNotes
controllersNumber[][0]Partner organizationId values. At least one required. 0 = the org itself. All must be non-negative integers.
processorsNumber[][]Partner organizationId values. May be empty. 0 = the org itself.

controllers and processors store partner IDs, not MongoDB _ids. To resolve a party, look up Organization.partners[] where organizationId matches. 0 always resolves to Organization.selfOrganization.

Transfers & security

FieldTypeDefaultNotes
transfersBooleannulltrue if data is transferred outside the EEA.
transfersLongStringFree-text detail on international transfers.
profilingBooleannulltrue if the activity involves profiling or automated decision-making.
communicationsString""Short description of data disclosures.
communicationsLongString""Long description of data disclosures.
securityLevelStringEnum from securityLevelValues.
securityMeasuresLongStringFree-text description of security measures.

Status

FieldTypeDefaultNotes
activeBooleanfalseSetting to true triggers the compulsory-fields validator. Cannot activate if required fields are missing.
activityExpirationDateStringnullISO date string. Activities past this date are auto-deactivated on dashboard render.
forcedInactiveBooleanfalseSet by admin tools to prevent re-activation.

Template override

FieldTypeNotes
templateIdObjectIdOptional reference to a Template document. Takes priority over the OU-level and org-level template fallbacks in the 3-tier lookup.

Activation validation

When active is set to true, Mongoose calls hasEmptyCompulsoryFields(this) (from src/lib/utils). If any compulsory field is empty the validator rejects the save with:

Cannot activate activity: compulsory fields must be filled

Deactivation (active: false) always succeeds without validation.