DataDirective BPM does not run

I have DataDirective BPM “BPM01” on UD01 table, which is supposed to be fired when a new record is inserted into UD01 table. It works OK when a new record is inserted into UD01 through a user interface. However, it does not run when a new record is inserted into UD01 table by C# code in another DataDirective BPM “BPM02” on OrderHed table. Has anyone see this before?

How are you inserting the record via C#? Are you going through the business objects?

Thanks, Jose. I think it is going through BO. Here is simplified code

var dsUD01 = new Ice.Tablesets.UD01Tableset();
Ice.Contracts.UD01SvcContract boUD01 = null;
boUD01 = Ice.Assemblies.ServiceRenderer.GetService<Ice.Contracts.UD01SvcContract>(Db);
if (boUD01 != null)
{

boUD01.GetaNewUD01(ref dsUD01);
var drUD01 = (from xUD01 in dsUD01.UD01
where xUD01.RowMod == “A”
select xUD01).FirstOrDefault();
if (drUD01 != null)
{

  drUD01.Company = 'CompanyCode';
   drUD01.Key1 = 'SomeValue';
	boUD01.Update(ref dsUD01);

}
}

1 Like

You are not passing the flag to bypass facade so it should trigger DD… and BPMS… odd… maybe your conditions aren’t met?

The UD01 record is inserted correctly by the first DD-BPM and there is no condition on the BPM. It is really odd indeed.

Thanks, Jose! Have a good weekend!

Just to give you an update on this. The same code placed in any Method Directive BPM C# code will trigger Data Directive on UD01. So the problem is with Data Directive. Maybe this is a limitation of Data Directive. Epicor support does not offer help with custom code so I have decided to work around this.

Custom code should only really be a solution to a problem when there is no other solution. In this particular use case, custom code isn’t needed as the BPM wizard allows for what you are trying to accomplish with standard built-in functionality.

There is an example in the Epicor Education course for BPMs that is nearly identical to this use case, and would strongly urge you to use standard functionality whenever possible because standard functionality Support can definitely assist with. That, and, non C# code BPMs will upgrade from one release to another with little to no modification where custom code BPMs there is no guarantee.

Nathan, thanks for the reply. I don’t see “Fill Table by Query” and “Invoke BO Method” in Data Directive. I do see them in Method Directive. Here is a screenshot from my Data Directive designer. My Epicor is 10.1.500.10. Did I miss something