OK, I have the solution.
When You running/testing any service Developer forces to create a new session (or use the same owned) and to assign thread on the server - this session and thread are working for Developer and therefore You see the result of invocation.
When trigger invokes any service then he for a while is the owner of different new session + thread. This trigger, session or thread have no idea of user using Developer and wanting look at the result.
Solution (but for development enviroment only):
Create two Java services in the same folder (class de facto), and in this class create (Shared->Source edit box) instance member: IData pipeline.
java service tool.latched:setDocument
- input [document] document
synchronized (_instance) {
try {
_instance.pipeline = IDataUtil.deepClone(pipeline);
} catch (java.io.IOException e) {
throw new ServiceException(e);
}
}
java service tool.latched:getDocument
- output [document] document
IDataUtil.append(_instance.pipeline, pipeline);
the same class “latched” “Shared->Source”
IData pipeline; // it's better to create regular instance member and use "_instance" static member, but not create any other static members
In triggering service invoke also tool.latched:setDocument mapping the trigger document to “document”.
From Developer invoke tool.latched:getDocument.
Works fine, doesn’t it ?
#broker#webMethods#Integration-Server-and-ESB#Universal-Messaging-Broker