Written by

Senior Cloud Architect at InterSystems
MOD
Question Eduard Lebedyuk · Aug 20, 2021

Bookkeeping in Business Operation

In my Business Operation I need to execute a bookkeeping method every X seconds.

How can I do that?

There are two workarounds (I dislike both):

  1. Execute bookkeeping on process start - but there might be no requests at all
  2. Create a BS that sends messages to BO every X seconds - it makes production more complex and also queues might not guarantee that the method is executed on schedule.

Thoughts?

Product version: IRIS 2021.1

Comments

Dmitry Maslennikov · Aug 20, 2021

Looks like, that you have some data generated, which you should care about, but with some delay. So, how about creating some custom adaptor, which would look at that data, check for conditions and do the task. So, just only need an index by creation time.

0
Eduard Lebedyuk  Aug 20, 2021 to Dmitry Maslennikov

Looks like, that you have some data generated, which you should care about, but with some delay.  

Yes.

how about creating some custom adaptor,  

How would this adapter be triggered every X seconds?

0
Dmitry Maslennikov  Aug 20, 2021 to Eduard Lebedyuk

By Setting in Business Service which it will be tied to. But I think, it will be simple, like check that latest data where create date more than current plus n seconds

0
Eduard Lebedyuk  Aug 20, 2021 to Dmitry Maslennikov

Code must be executed in the Business Operation process, I can't offload it to another process.

0
Marc Mundt · Aug 22, 2021

Create a BS that sends messages to BO every X seconds - it makes production more complex and also queues might not guarantee that the method is executed on schedule.

You could try submitting the message to the head of the queue to be sure it gets processed right away.

0
Eduard Lebedyuk  Aug 23, 2021 to Marc Mundt

You could try submitting the message to the head of the queue

How do I do that?

0
Clayton Lewis  Aug 24, 2021 to Marc Mundt

Or make the BO InProc and avoid the queue altogether.

0
Eduard Lebedyuk  Aug 26, 2021 to Clayton Lewis

I need for this operation to run in a same, separate process (on which I need to do bookkeeping) so InProc mode won't work for my use case.

0