Forum Discussion

SWilyums's avatar
SWilyums
Contributor
3 years ago

TransformationEventHandler & ExecuteFileHarvestBatch

Hello,

Our transformationeventhandler rule adds missing UD1 members to an unmapped parent.
The rule works and has been for a few months.

A couple of weeks ago I built a business rule which leverages the utitlity "ExecuteFileHarvestBatch".
I have the relevant settings as True.

Dim valTransform As Boolean = True
Dim valInterest As Boolean = True
Dim loadCube As Boolean = True
Dim processCube As Boolean = True

The batch rule was built so I could schedule the data load.
What I am noticing, is when the scheduled job (which calls a DM job with the rule) runs there are failures because of missing UD1 members.
If I, then run the import/validate/Load and Process steps manually there are no errors and the missing UD1 members get added.

It is as if the TransformationEventHandler is not being executed when the import process runs via the scheduler/dm job/rule.

Any ideas for suggestions of where to look?

  • Not sure if this is the is the issue, but maybe check to see if your TEH is getting any parameters from your workflow PoV. When you run the Import/Validate/Load, your Workflow POV is fixed and updated and can pass any relevant properties in the TEH. When you run the ExecuteFileHarvestBatch, it may not be updating your workflow PoV so the TEH may not be getting all the parameters it needs. We had similar issues when using DM steps to import data because the workflow POV, even though it was properly changing, wasn't passing the new properties until after the sequence was completed.

  • Not sure if this is the is the issue, but maybe check to see if your TEH is getting any parameters from your workflow PoV. When you run the Import/Validate/Load, your Workflow POV is fixed and updated and can pass any relevant properties in the TEH. When you run the ExecuteFileHarvestBatch, it may not be updating your workflow PoV so the TEH may not be getting all the parameters it needs. We had similar issues when using DM steps to import data because the workflow POV, even though it was properly changing, wasn't passing the new properties until after the sequence was completed.

    • SWilyums's avatar
      SWilyums
      Contributor

      Hello Albert,  I did some initial testing.  You may have pointed me in the correct direction.

      In my TEH rule I have:
      Dim wfProfileName As String = BRApi.Workflow.Metadata.GetProfile(si,si.WorkflowClusterPk.ProfileKey).Name
      If wfProfileName = "########################" Then 

      When I comment out the "if" line it runs and adds the UD1 value.

      I need to do a couple more runs. But if this works, I will circle back and tag your post as the solution.

      Thank you.

  • NN's avatar
    NN
    New Contributor III

    Hello,
    I have the same issue, but with a UD6 members not mapping correctly when changing from Actual to ScenarioType1 and is interested how you solved it to pass the correct rule?