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

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

Thank you. I thought it might not be such a good idea but wanted to check (and reading back have realised it had already been asked and answered).

I also hadn’t realised that Updatable BAQ Method Directives were under a separate menu item - I now have this working but I have given my boss all our options.

Hi @josephmoeller,
thanks for sharing your idea, is it possible to kindly share your example of triggering user code update using scheduled task from PowerShell UI ? it looks like my epicor version does not respond with UBAQ scheduled export

we have achieved similar results through SQL jobs.

The original use case: if you don’t have to move any data, you should just create a report routing that splits on your PackNum and sends emails, then run it on a schedule. - Tracy’s add should probably just be a new thread to not confuse.

How about triggering the BPM at SysAgentSched table ?
The value of NextRunOn field will change daily if scheduled daily.

2 Likes

Our directives have a slightly different purpose, so what we have works for us, I was just commenting from experience of having implemented BPMs on SysTask tables in general. When we do scheduled things it tends to be via Service Connect.
But yours would be an interested idea to test.

have you done it and worked ?, it sounds very good idea less expensive than adding the code to the SysTask :ok_hand:

update:
just tried it, it is working fine mate, many thanks for this idea

1 Like

Does that fire if there are no tasks assigned to the particular AgentSchedNum in the condition block?

My guess is yes, because it needs to update the LastRun field.