Documentation

Module 'CleanupTestData'



Domain model

Entities

Name Generalization Documentation
CleanupRule Defines a specific clean up rule. Rules can be expressed in terms of the owner, the owner's user role, the creation date/time, or a combination. Only objects that satisfy all parts of the rule will be deleted.

Entity 'CleanupRule'

Defines a specific clean up rule. Rules can be expressed in terms of the owner, the owner's user role, the creation date/time, or a combination. Only objects that satisfy all parts of the rule will be deleted.

Attributes
Name Type Default value Documentation
After DateTime [%CurrentDateTime%]
Before DateTime
Associations
Entity 'CleanupRule' does not own any associations. 

Constants

Name Type Documentation
CleanupTestData Boolean Use to toggle the cleanup of test data on shutdown. WARNING: This setting should only be enabled when running locally, or against a test database


JavaActions

Name Return type Documentation
CleanUpTestData Void Java action that deletes objects based on the provided clean up configuration entities. Should be executed before shutdown.


JavaAction 'CleanUpTestData'

Java action that deletes objects based on the provided clean up configuration entities. Should be executed before shutdown.

Parameters
Name Type Category Description
CleanupRules List of CleanupTestData.CleanupRule
Return type

Void



Microflows

Name Return type Documentation
BeforeShutdown Void Set this microflow as the 'BeforeShutdown' microflow, or call this microflow from an existing 'BeforeShutdown' microflow
SetupCurrentRunBasedCleanupRule CleanupTestData.CleanupRule Set up a cleanup rule to delete all objects created during the first run. Call this microflow from your startup microflow.
SetupOwnerBasedCleanupRule CleanupTestData.CleanupRule Set up a cleanup rule to delete all objects owned by a specific user. Call this microflow from your startup microflow.
SetupOwnerUserRoleBasedCleanupRule CleanupTestData.CleanupRule Set up a cleanup rule to delete all objects owned by someone with a specific role. Call this microflow from your startup microflow.


Microflow 'BeforeShutdown'

Set this microflow as the 'BeforeShutdown' microflow, or call this microflow from an existing 'BeforeShutdown' microflow

Parameters
This microflow has no parameters.
Return type

Void



Microflow 'SetupCurrentRunBasedCleanupRule'

Set up a cleanup rule to delete all objects created during the first run. Call this microflow from your startup microflow.

Parameters
Name Type Documentation
StartupDateTime DateTime
Return type

CleanupTestData.CleanupRule



Microflow 'SetupOwnerBasedCleanupRule'

Set up a cleanup rule to delete all objects owned by a specific user. Call this microflow from your startup microflow.

Parameters
Name Type Documentation
Owner System.User
Return type

CleanupTestData.CleanupRule



Microflow 'SetupOwnerUserRoleBasedCleanupRule'

Set up a cleanup rule to delete all objects owned by someone with a specific role. Call this microflow from your startup microflow.

Parameters
Name Type Documentation
OwnerUserRole System.UserRole
Return type

CleanupTestData.CleanupRule