Hi,
You can obtain the context ID using this java code:
com.wm.app.b2b.server.InvokeState is = com.wm.app.b2b.server.InvokeState.getCurrentState();
com.wm.app.audit.IAuditRuntime ar = is.getAuditRuntime();
Stirng context = ar.getContextStack();
This gives you the context stack, the first position is your current context id.
Nevertheless, I really don’t understand why you need it… You’ll probably use the service name or service status plus timestamp on your queries.
Regards,
Jorge
#webMethods#Flow-and-Java-services#Integration-Server-and-ESB