Service Holds forcing waits until other services complete

Here is the issue:
Service A runs via the Schedular every minute. Service A’s results are published to the Broker.

Service B subscribes to Service A’s Broker publication. Service Bs conflicts with Service A. i.e. If service A and B run at the same time there are conflicts.

I assume I need to
1.) Have Service B check if service A is running, if service A is running Service B must wait until Service A is finished.
2.) Have Service A check if service B is running, if service B is running Service A must wait until Service B is finished running.

Does anyone know how to do these checks?

I know I could enable logging and check the audit log to see if the other service has completed running but I don’t want to take the performance hit caused by enabling audit logging and by having to read in a large file.

Thank you for the help!


Not knowing all the details of your requirement, I propose a simple solution that can potentially help you :

a) services in webMethods help you to write and use key/value pairs across services. Data gets stored in a repository. Each of your services can have an explicit lock on a particular object.

b) In your case, ServiceA & ServiceB can lock the “IAmExecuting” object before it starts execution. ServiceA & ServiceB will unlock this object after execution. You can specify a “wait time” when you are trying to obtain a “lock”. You can use the ‘repeat’ operation and try to wait till you get the lock (as a means to increase the ‘wait time’).

c) Please look at the documentation for services and you will get an idea.

Maybe it’s good to know how the services are conflicting. What are the problems you are facing when the two services are running simultaneously?