The customer has several incremental queries which are not working as expected. Instead of only picking up new records since their the last run, they are picking up all records each time - like a normal Query activity.
The culprit is the Cleanup workflow.
The Incremental query workflow works this way:
So, this history worktable name is of the following notation:
wkfhistoworkflowidactivityName_
Now, for workflowIDs 0 (for customers where the xtknewid
allows negative sequences), we see that it is actually:
wkfhisto(uint)workflowidactivityName_
Although this is okay for workflow execution.
So, for example, the incremental activity incremental1
of workflow ID=-1 will create a table wkfhisto4294967295_incremental1
.
The thing which is missed is the Cleanup workflow.
Here, we have a code that tries to delete worktables of deleted workflows.
A dedicated code here lists all the wkfhisto* tables, extract out the workflowId from their names (from the above convention), and deletes them all except the ones whose worklowIDs are found in the xtkworkflow table.
However, it misses the uint
part.
So, it tries to look up a workflow with ID 4294967295 instead of casting this back to int. Since this workflow is not found, this table is deleted. Next time, when this workflow runs, the Incremental query activity does not find an existing history table and creates it thinking of this as the first run ever.
Fix:
The fix for this issue is available in Adobe Campaign Classic 20.1.1 Release (build 9122 and onwards).
Workarounds that customers can use:
Workaround 1: Stop the cleanup workflow and run it intermittently to cleanup the Database and HDD until the fix is taken and available. Not recommended if you don’t have a planned upgrade.
Workaround 2: Assume that the Incremental query activity is impacted and workaround it by doing the same thing that the Incremental query does by creating a persistent schema to hold the history table contents. Use a combination of Query and Update data activities to mimic the behavior. This will need to be done for all the workflows requiring the incremental query.
Workaround 3: Assume that the Incremental query activity is impacted and work around it by adding an audit field (tsCreated/tsLastModified) to the schema in question. Your incremental query will then be converted to a normal query activity with a where clause like tscreated GetDate()
.
Workaround 4:
pkSequence
xtknewId
for the workflow creation (to avoid unwanted surprises).