I’m working on a system that has two interactions with Epicor events. The custom datetime field is on QuoteHed_UD. This field gets filled out by an external application making a REST call to a uBAQ over the API and the uBAQ performs the update against the Quote BO.
The two conditions when the field will get cleared as are follows:
A BPM on QuoteHed.Update condition is met and clears the field OR
The number of days between a polling date and the field value is greater than or equal to a certain value.
The second condition is what I’m trying to solve.
I’ve read a lot about automating custom “processes” via Task Scheduler, standalone programs, etc. but I’d really like to keep to keep the entire system within Epicor.
I have considered a BAQ scheduling process to run a BAQ, thus attaching a process to a schedule, but I am not sure if this is a viable way to run the custom code needed to accomplish the task.
I could also create a BPM against a commonly access BO Method and hook it from there, but that’s not exactly automation.
I have also considered a SQL job for the scheduling and action against the custom field but I know that’s frowned upon AND it doesn’t conform to the “system within Epicor” requirement.
What’s the best way to accomplish? Thank you
Last time I asked, I was able to solve via APR and scheduled BAQ Report, but this one needs to execute custom code.
What if you schedule a DMT job via powershell to check a custom boolean somewhere in your system (company maintenance), to true, and attach a BPM to that custom control to execute when true? Just make sure you set said custom control back to false at the end of execution.
That may not be the best way, but that is at the top of my head. There is also a way to schedule the DMT via power shell to run a baq etc. It is a very powerful tool.
I want to keep it 100% inside Epicor if possible, and a powershell script would be outside. I just want to make sure it’s self contained, i.e. if I get hit by a bus, the next dev doesn’t have to chase down some hidden task somewhere to get the process working.
I am interested in scheduling a DMT run though, that sounds interesting even if not the direction for this task.
I’d even be fine with an interface in Epicor that creates Task Schedulers on its server to run custom stuff, I’d just want it to maintain it so if the task got deleted outside Epicor it would re-create it. Then, I’d have maintainable custom processes inside Epicor
Depending on your definition of “within Epicor”, we use Service Connect for this type of thing. In some cases only to trip a flag in an Epicor table and the rest of the process is in BPMs triggered by that change. One of the input channels for Service Connect is a schedule, and it’s an Epicor approved way of doing things even if it has lost attention these days.
If you don’t have Service Connect then you can’t use Service Connect. But it is something that Epicor offer that will do this, and they offer it now rather than as a possibility for something in future releases.
So @Aaron_Moreng I just did some testing and in 10.2.XX you can use the BAQ Export Process with an Updatable BAQ put the code you’d like to execute in the GetList Post Processing Method and it will get executed when the BAQ Export Process Runs.
I found another way to run custom code from ReportMonitor.Update method. I can set the report to run by the system at any scheduled time. I created a BPM on this method, placed condition such as report description to fire up the BPM, and created custom code. Inside the custom code, I can call other business objects/methods and or updates to UD table that triggers BPM.