Campaign model
Campaign
The Campaign
class represents the definition of a campaign and extends HistoryEntity<Long>
. This means every change to a campaign is stored as a new version, while the previous one is automatically deactivated. Versioning is managed by the HistoryEntityFormService
, so the developer does not need to manually call setActive(false)
for the previous version.
Key Fields:
name
— a string representing the campaign’s display nameexecutionType
—MANUAL
orAUTOMATIC
, determining whether the campaign is launched manually or on a scheduleexpression
— a script (as anExpression
object) that defines which clients are included in the campaigncreditProductCodes
— a list of product codes (e.g., for loans) to which the campaign appliesrestartable
— indicates whether the campaign can be restarted at intervalsrestartableUnit
,restartableUnitType
— a numeric value and time unit (hours or days) for cyclic restartsdateTimeExecution
— the date and time of the next scheduled automatic launchexecutions
— a list of allCampaignExecution
instances associated with the campaign
Impact of AutomaticCampaignStatus
and RestartableUnitType
Fields:
AutomaticCampaignStatus
controls the current state of an automatic campaign:SCHEDULED
means the campaign is active and ready for executionIDLE
means the automatic launch is paused
RestartableUnitType
(e.g.,HOURS
,DAYS
) defines howrestartableUnit
is interpreted for recurring launches. These fields are heavily used by theCampaignExecutionProducer
component to calculate scheduling.
Model Example:
Last updated
Was this helpful?