Managing Multi-Company BPMs

Hello,

I am in a multi-company, multi-site (what once was plant) environment. When creating BPMs in Epicor 10.#, we can set the scope to either Company Specific (runs in only the company in which the BPM was created) or Company Independent (runs in all companies), so it is either one or nothing. This means that if I have a BPM that I need to run in more than one company, but not all companies, I have to add it to multiple companies, then maintain the multiple BPMs over time. Though I am sure that others have thought of this, I thought I would offer another option.

I now create one version of the BPM and set it to run for all companies (Company Independent). The first condition of the BPM can then determine whether the balance of the BPM will run based on the current company, like this…

We could also use this method to have the BPM perform slightly different things based on the company (or the site).

OK, so this is a really simple idea. I am new to the site and thought I would offer it to those who might be in the same situation. Also, if anyone sees any downside to this method, please let me know.

Michael

1 Like

This would be the only (and therefor BEST) way that I can think of for meeting your requirements. I have done the same at the Plant level as well.

One additional thought… if you are writing DATA directives, you may want to check the company value in the DATA RECORD being written rather than the call context… I haven’t needed to do this directly in the company, but it would seem best to look at the data.

Sometimes you will have no choice but to do a “Company Specific” BPM and duplicate it in each company that requires it. Atleast for Auto-Print I had to, since I wanted it to list the lower companys Printers and no my Global Companys.

ERik is right. At a certain point it is easier to copy the BPM to each company that needs version A and then copy the other to all companies that need version B.

I had a need to control company independent bpms to only execute in certain companies. The way of hardcoding and adding a new condition seemed cumbersome, maybe this solution makes sense to others.

I added a parent-child ud table to the main menu (UD104), created a new UD104 record where Key1 is the DirectiveID, then in UD104A I can add the companies I want that BPM to execute in.

In my BPM condition I added this code block (see below) to check if it should execute in the executing company and seems to work. A little cumbersome also (wouldn’t be that bad if you could customize bpm forms) but I really dislike doing it the hardcoded way and this can be controlled using DMT which is what I was looking for, granted you will need to go back and update all old company independent bpms, but in the future might make adding new companies and controlling bpms easier. I also am checking which company the bpm originated in is where I expect my UD104 setup to exist.

var directive = Db.BpDirective.FirstOrDefault(d => d.DirectiveID == this.Id);

var ud104 = Db.UD104.FirstOrDefault(u => u.Key4 == directive.Company && u.Key1 == this.Id.ToString());

foreach (var row in Db.UD104A.Where(u => u.Key1 == ud104.Key1))
{
  if (row.ChildKey1 == callContextClient.CurrentCompany)
  {
    return true;
  }
}

return false;

Maybe someone else finds this useful

1 Like

For us the majority of time, everyone gets every BPM… But when there are reasons to control it, we simply create UD Columns and add settings that can turn it on/off in Company Config.

Then a simple BPM Condition can check XaSyst for the setting.

3 Likes

We have 95 active company independent bpm’s and are in the process of implementing a new company and wanting to exclude this company from all of these bpms, to start. I think this approach might be tougher to implement for us, as we would need to create a lot of UD columns. I do like this approach though if there aren’t that many that need to be controlled at the company level