RE: Post-processed method on set-based data entity
Found the solution, using post-handler method:
[PostHandlerFor(classStr(DmfEntityWriter), methodStr(DmfEntityWriter, write))]
public static void DmfEntityWriter_Post_write(XppPrePostArgs args)
{
DMFDefinitionGroupExecution _dmfDefinitionGroupExecution = args.getArg('_definitionGroupExecution');
// come code to iterate target table records exists joined from staging
}
This post-handler is called when data are imported to the staging and staging lines are set TransferStatus::Completed. It will probably also work in case of "Set-based processing" = NO (but for that case I would rather use PostTargetProcess( ) method as it's more clean from my POV).
I have also found the connection between staging and target table, as primary key is the same in both cases, so just iterating target table records with exists join on staging based on primary key + execution ID + definitionGroup.
But one important note: this method is called for all entities, so you have to switch at the beginning, if it's "your" entity:
str callerEntity = dmfDefinitionGroupExecution.EntityXMLName;
;
switch (callerEntity)
{
case 'ASMyImportEntity':
// something
break;
}
Thanks for your help, your idea at the beginning was inspiring.
Ales