A process or task that can be scheduled AND initiate a BPM

I need to perform some tasks at a certain time everyday, and can’t find a way to schedule them.

In V8, I created a BAQ and scheduled a reoccurring BAQ export. Then I made a BPM that triggered when the BAQExport ran.

But E10 does not have BPMs for BAQExport :frowning:

Is there any other process I can schedule - that I can configure to do nothing - and has a BPM capturable event?
Doesn’t matter what the process is, as long as I can ensure it fires every time - and can determine that it was the scheduled process that fired it too (which I can do with a condition block in the BPM design).

My end goal is to generate emails based on the days shipments.

  1. Create an email for each shipment, showing shipped items, previous shipments for related orders, and open items.
  2. Attach a copy of the PDF of the packer to the above email.
  3. Run every day at a specified time.

I have number 1 working just fine as a Data Directive triggered on the ShipHead.ShipStatus changing to SHIPPED. But this causes the the email to be sent the instant the Packer is marked shipped. We want to batch these to go out at the end of the day.

Not being able to attach the PDF of the packer to the original email isn’t a deal breaker.

1 Like

The option using DMT, if you own it, works great for scheduling the BPM trigger side.

4 Likes

I have shared this many times, Epicor has an add-on you can purchase that does this for you
http://www.dotnetit.co.uk/solutions/solution/user-process-scheduler

Or you can do what Dan suggested and schedule something using DMT or an External Process

4 Likes

We are looking into the User Process Scheduler but could you advise how we would use DMT to trigger this… I can’t see a way to schedule within the software itself?

I’m also looking at a couple of other possibilities we can use for the trigger but want to cover all options. Thanks.

BPMs run when something happens/changes. DMT changes things. So if you trigger DMT with something like powershell, DMT will change stuff. You can make a BPM to look for the changes that you are making with DMT which will trigger the BPM.

1 Like

It was the running DMT on a schedule I wasn’t sure on. Now I know I need to look at powershell I can look at that option too. Thanks!

1 Like

Powershell? If you have a process scheduler why are you trying to use DMT and or Powershell you can literally schedule the code to run in Epicor…
Sorry misread the request.

Your easiest alternative is to schedule a UBAQ (updatable BAQ export) and put your code in the GetList method of this BAQ.

never mind you are on 8.03… I’ll go be quiet now LoL (need more coffee)

2 Likes

Sorry, we are on 8.03 now and use the BAQ Export to trigger the BPM but we are looking to go live on E10 this summer and I am painstakingly trying to re-write all customisations we need to take over as we are going for a fresh install!

AH! ok then you should use a UBAQ as I suggested or buy the Process Scheduler (its pretty cheap)

1 Like

Thanks. I’ll try your suggestion whilst we wait for the quote :slight_smile:

1 Like

@josecgomez
how about creating a data directive on SysTask table update, condition it on any scheduled task, and add your custom code to do what you need, which could be invoking an update method and updating records or/and triggering BPM’s.

1 Like

This is expensive since Data Directives would run (just to check) every single time any task runs. There should be no reason to run this except when it needs to be run. Hence the schedule BAQ and or Scheduled code.

1 Like

@josecgomez, is this what you meant ?

becouse when i run a test to export one of my UBAG, i found different method in the trac log

No, the UBAQ itself has BPMs built in GetList , Update etc… Put your code in your Ubaq’s getList method.

1 Like

5 posts were split to a new topic: How to execute code on GetList on a UBAQ

@tmat - We had the same issue. In V8 we had a BAQ Eport was running on a schedule. It didn’t actually export anything, we just used it to trigger a BPM. When we moved to E10 there was no BAQ Export to shcedule and piggy back off of.

see

1 Like

Thank you. I’ll definitely look into this option too.

I can’t seem to get the alert to work using a directive on the Ubaq’s GetList method. I have managed to get it to work using a Data Directive on the SysTaskLog table. This is something that will be scheduled to run out of office hours but is there any reason I shouldn’t assign the directive here? My boss is still looking into the process scheduler.

We have a couple of things that we trigger from the SysTask tables and it’s all fine, so on the face of it there’s no reason why you shouldn’t do the same.

But what everybody will warn you is that it can put serious load on your system if you aren’t extremely careful. If you put a data directive on the SysTaskLog table the directive itself will run every single time any task of any type is run, and that can have a massive performance impact.

1 Like

To avoid the whole risk associated with messing with SysTask, BAQ export call variability by version, or buying the third party software, I’ve started using a user code type called AUTOPROC, then placing a directive on the user code update that runs your custom code if the user code modified is your certain code (e.g. “AutoShipEmail”) and LongDesc is updated (to the current datetime or something). Then, you can call this update through whatever you want: REST, DMT, PowerShell DMT, and the code can be static and the meat and potatoes can be stored in the BPM. This does have the external dependency of the trigger and execution of the simple user code update; I am doing this through PowerShell DMT on a windows task schedule, which is easy enough and requires no SQL permissions.

1 Like