Campaign Actions
CreateCampaignAction, EditCampaignAction, ActivateCampaignAction, DeactivateCampaignAction, StartCampaignAction и StopCampaignAction
All actions are built on top of SimpleActionController or EntityCreateController / EditEntityActionController components provided by timveroOS. These actions are automatically integrated into the UI and appear as buttons or operations on the campaign detail page.
🟢 CreateCampaignAction
Example:
@Controller
public class CreateCampaignAction extends EntityCreateController<Long, Campaign, CampaignForm> {
}Purpose:
Creates a new campaign based on the CampaignForm.
Features:
Inherits from
EntityCreateControllerAutomatically appears as the "Create" button in the campaign list
📝 Template: /campaign/edit.html
Purpose:
Form for creating and editing campaigns using CampaignForm.
Highlights:
Fields: name, execution type, products, filtering script
UI for scheduling and
restartableoptionsCode editor for the script
✏️ EditCampaignAction
Example:
Purpose:
Edits an existing campaign.
Updating the data creates a new version (HistoryEntity), while the previous version is deactivated.
📝 Template: /campaign/edit.html
(Same as for creation)
✅ ActivateCampaignAction
Example:
Purpose:
Activates a campaign.
For automatic campaigns, it also sets the schedule to SCHEDULED.
⛔ DeactivateCampaignAction
Example:
Purpose:
Deactivates the campaign.
Automatic campaigns are set to IDLE, and new executions are marked as DISABLED.
▶️ StartCampaignAction
Example:
Purpose: Starts the campaign:
For MANUAL — creates and immediately executes a CampaignExecution
For AUTOMATIC — switches to
SCHEDULEDif not already
⏹️ StopCampaignAction
Example:
Purpose: Stops an automatic campaign:
Sets status to
IDLECancels all new executions (
STOPPED)
All templates are fully integrated with the EntityTabController tab system, CampaignForm forms, scripts, and other components of timveroOS.
Last updated
Was this helpful?