Skip to content

[Analytics] Clarify the Activity Audit model for entity deletion, import, and rollback #4624

Description

@nshevtsova-survey

EPAM AI DIAL Admin version

Admin: [FE]0.22.0-dev.26 [BE]0.22.0-dev.2

How to reproduce

Context
The following history is currently displayed in Audit → Activities for the application NS_test_entities_application:

  1. Create on September 9, 2026 — the application was initially created.
  2. Several Update events between September 9 and September 18, 2026.
  3. Delete on September 18, 2026 — the application was deleted.
  4. Create on September 18, 2026 — the application was imported again. The import is currently displayed as Create because there is no dedicated activity type for imports.
  5. Delete on September 18, 2026 at 5:45 PM — the application was deleted again.
  6. Create on September 18, 2026 at 5:46 PM — the application was restored through delete rollback. The rollback is currently displayed as a regular Create event.

Questions to Clarify

  1. Should the audit history be retained after an entity is deleted, or should it be deleted together with the entity?
  2. If the history is retained, should events from the previous entity lifecycle remain visible after the entity is imported again?
  3. Should imports have a dedicated activity type such as Imported, and should rollback use Rollback or Restored instead of Create?
  4. Should a delete rollback restore the entity with its original resourceId?
  5. How should a repeated creation or import be handled when the same resourceId already exists:
  • update the existing entity;
  • create a new entity with a new ID;
  • reject the operation;
  • create a new version?
  1. Should a separate lifecycle identifier be introduced, such as lifecycleId, originId, or sourceEntityId?
  2. How should import, delete, and rollback events be linked to each other?
  3. Should a rollback reference the original Delete event through Parent ID or another identifier?
  4. Should historical audit events belong to the restored entity or only to the previous lifecycle?
  5. Should the same rules apply to Applications and all other admin entities?

Questions and Decision Options
Should audit history be retained after an entity is deleted?

  1. Should a delete rollback restore the entity with its original resourceId?
  2. Should changes to resourceId using prefixes such as restored_ or imported_ be avoided?
  3. Should imports have a dedicated activity type such as Imported?
  4. Should restoration have a dedicated activity type such as Rollback or Restored instead of Create?
  5. Should a separate lifecycle identifier be introduced, such as lifecycleId, originId, or sourceEntityId?
  6. Should Import, Delete, and Rollback events be linked through Parent ID or another identifier?
  7. Should audit events from a previous lifecycle remain visible after the entity is imported again?
  8. Should a rollback reference the original Delete event?
  9. Should the same rules apply to Applications and all other admin entities?

Actual result

Image Image

Expected result

  • The retention policy for audit history after entity deletion is defined.
  • The behavior for importing an entity again is defined.
  • The behavior for resourceId conflicts is defined.
  • It is defined whether the original resourceId is preserved after rollback.
  • Dedicated activity types for import and restoration are defined.
  • The relationship between events from different entity lifecycles is defined.
  • The behavior is consistent for Applications and other admin entities.
  • The decision is reflected in the API contracts, specifications, and the Audit → Activities UI.

Additional information

"defaultRoleLimit": { "enabled": true }, "name": "NS_test_entities_application", "displayName": "NS_test_entities_application", "displayVersion": "0.0.1", "overrideName": "OverrideForSinceCreationDate", "description": "CRUD", "features": { "systemPromptSupported": true, "toolsSupported": false, "seedSupported": false, "urlAttachmentsSupported": false, "folderAttachmentsSupported": false, "allowResume": true, "accessibleByPerRequestKey": true, "contentPartsSupported": false, "temperatureSupported": true, "parallelToolCallsSupported": true, "assistantAttachmentsInRequestSupported": false, "maxTokensSupported": true, "customTemperatureSupported": true, "reasoningEfforts": [], "skillsSupported": false }, "defaults": {}, "responsesDefaults": {}, "interceptors": [], "topics": [ "Test", "Testing" ], "maxRetryAttempts": 1, "createdAt": "2026-09-18T14:46:22.936Z", "updatedAt": "2026-09-18T14:46:22.936Z", "applicationProperties": { "orchestrator": { "deployment": { "deployment_id": "gpt-5.2-2025-12-11" }, "system_prompt": { "type": "custom", "content": "", "variables": {} }, "max_iterations": 15, "propagate_stages": true }, "contexts": [], "tool_sets": [], "tool_defaults": {} }, "source": { "$type": "schema", "applicationTypeSchemaId": "https://mydial.epam.com/custom_application_schemas/quickapps2" }, "validityState": { "valid": true }, "allowUserExternalServices": false }

Confidential information

  • I confirm that do not share any confidential information

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues or problems that need to be fixed.

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions