Entity Diagram

The system revolves around two key components:

  1. Campaign: A marketing initiative that can be either manual (started by users) or automatic (scheduled)

  2. Campaign Execution: A specific run of a campaign that processes clients and tracks status

The basic workflow is straightforward:

  • Create and activate a campaign

  • The campaign executes (either manually triggered or automatically scheduled)

  • The execution processes eligible clients

  • The execution completes or encounters errors that can be handled

  • Campaigns can be deactivated when no longer needed

classDiagram
    class Campaign {
        -String name
        -CampaignExecutionType executionType
        -boolean active
        -AutomaticCampaignStatus automaticCampaignStatus
        -Expression expression
    }

    class CampaignExecution {
        -CampaignExecutionStatus status
        -Set~Client~ clients
    }

    class CampaignExecutionChecker {
        <<interface>>
        +isAvailable(execution)
        +perform(execution)
    }

    class NotifyFailedCampaignExecutionChecker {
        +isAvailable(execution): status == EXCEPTION_OCCURRED
        +perform(execution): notify failure event
    }

    class CreateAppCampaignExecutionChecker {
        +isAvailable(execution): status == FINISHED
        +perform(execution): create applications & void old ones
    }

    class CampaignExecutionType {
        <<enumeration>>
        MANUAL
        AUTOMATIC
    }

    class CampaignExecutionStatus {
        <<enumeration>>
        NEW
        IN_PROGRESS
        FINISHED
        EXCEPTION_OCCURRED
    }

    class AutomaticCampaignStatus {
        <<enumeration>>
        SCHEDULED
        IDLE
    }

    Campaign "1" -- "*" CampaignExecution : has
    Campaign -- CampaignExecutionType : type
    Campaign -- AutomaticCampaignStatus : status
    CampaignExecution -- CampaignExecutionStatus : status
    CampaignExecutionChecker <|-- NotifyFailedCampaignExecutionChecker
    CampaignExecutionChecker <|-- CreateAppCampaignExecutionChecker
    CampaignExecution -- CampaignExecutionChecker : triggers

Last updated

Was this helpful?