Starting archiving tasks from a calculation flow is available as of the Mai Tai release.
A customer has several millions of rows in the Product Competition table (this can easily happen when loading data from companies who gather data from many competitors). But you're using only data from the last month in this table.
You can use the Archiving utility (Configuration > System > Import / Export / Archiving) but this is a manual process. How to do this automatically at regular intervals?
def date = (new Date()).format("yyyy-MM-dd'T'HH:mm:ss") def archiveActionSourceTemplate = "Template_ArchiveCompetitionData" //label of the manually created Archiving process def archiveActionResultName = "ArchiveCompetitionData_" + date actionBuilder .addExportAction(archiveActionResultName) .doArchive(archiveActionSourceTemplate) |
The second item in the table shows the Template, the third one shows the result.
This is the configuration of the Template in detail: