Calling running services - how to prevent

Hi

I’m looking for functionality, which could be prevent call one service from another when called service is running.
Now I have situation: service A is running, service B can call service A even when service A is running.

I need a situation, when service A cannot be running from service B, when service A is running.
How can I realize such functionality?

There are internal services that can do that, but it’s not exposed to normal user.
Check with SAG see what they suggest you to do.

I have seen some thing below in IS_Java_API, Do it helps you?

getCurrentState

public static InvokeState getCurrentState() Returns the current thread’s invoke state.

Returns:The current InvokeState (null if there isn’t one).