Runtime identification of calling packageflowservice names

Hello,
I like code. I saw this line:
serviceName = caller.substring(caller.indexOf(“:”)+1,caller.length());
you could leave out the length for the same effect:
serviceName = caller.substring(caller.indexOf(“:”)+1);

I think you should seperate out the java service from the common flow. Just call the java service first before the common flow and pass the results to the common flow. Since you would be calling the common flow anyway, it doesn’t seem that detrimental to call the jService first.

And so what you would have wanted from you post was for the Jservice to recursively call getCallingService() on some object until you were either at the top or at a level you like. You may just be able to call it on your “nss” an extra time and see if that gives you the next level up service.

In fact, while typing and searching the forums for “NSSerice” I got back this wonderful link:
[url=“wmusers.com”]wmusers.com
I think it will answer your questions. If you do the same search (about 7 results), you call be on your way.

Hi Yemi,

I corrected my code and reused the code sample available from the link you gave me above. This works great, simply taking the first element of the stack always gives me the root caller.

I still suffer from the fact that this does not work at debug time (the root package/service then always being wm.server.flow/stepflow, I could find no trace of my functional calling package/service in the stack) but I suppose that I will have to live with that.

Thanks a lot for your help

Philippe

Philippe

I know it looks like it does not work during debug mode. This is the known behaviour, but during runtime you would get the correct service name.

Thahir