Not sure what is wrong there, but you might try looking at your Session object. Different sessions can have different permissions. I noticed this type of session difference between debugging and runtime especially after going through the Broker.
Here is some junk code that you can throw into a java service to give you some (not all) of the Session’s parameters quickly. You can use a temporary explicit exit step after this to see the runtime session information. This code is not production ready. Please look through the code and make sure it won’t mess up your system before running (that is my way of absolving myself from any issues using the code).
I have only ever run this in 6.5, and i don’t have time to troubleshoot this, just know that it meets my private personal utility qualifications which means “it runs on my machine” (grin).
Oh, you will also need to import some or all of these to comile:
com.wm.app.b2b.server.Server
com.wm.app.b2b.server.ThreadManager
com.wm.app.b2b.server.User
com.wm.g11n.util.iContext
com.wm.lang.flow.FlowState
com.wm.util.pool.ObjectPool
java.io.PrintStream
the raw code:
IDataCursor cursor = pipeline.getCursor();
com.wm.app.b2b.server.Session session = Service.getSession();
cursor.insertAfter(“sessionAgeInMilliseconds”,“” + session.getAge());
cursor.insertAfter(“sessionCallCount”,“” + session.getCalls());
IData context = IDataFactory.create();
IDataCursor contextCursor = context.getCursor();
contextCursor.insertAfter(“currency”,session.getIContext().getCurrency());
contextCursor.insertAfter(“encoding”,session.getIContext().getEncoding());
contextCursor.insertAfter(“language”,session.getIContext().getLanguage());
contextCursor.insertAfter(“timeZone”,session.getIContext().getTimeZoneID());
cursor.insertAfter(“context”, context);
contextCursor.destroy();
cursor.insertAfter(“sessionName”,session.getName());
cursor.insertAfter(“sessionId”,session.getSessionID());
cursor.insertAfter(“sessionUser”,session.getUser().toString());
cursor.insertAfter(“sessionValues”,session.toString());
IData values = IDataFactory.create();
IDataCursor valuesCursor = values.getCursor();
String keys = session.getValueKeys();
for (int index = 0; index < keys.length;index++) {
String key = “unnamed”;
if (keys[index] != null) {
key = keys[index];
}
Object value = session.get(key);
if (! (value instanceof FlowState)) {
valuesCursor.insertAfter(key,value);
}
if (value instanceof FlowState) {
FlowState flow = (FlowState)value;
IData flowState = IDataFactory.create();
IDataCursor flowStateCursor = flowState.getCursor();
flowStateCursor.insertAfter(“isIncremental”,“” + flow.isIncremental());
//make into array of packages containing nodes
// flowStateCursor.insertAfter(“namespace”,“” + flow.getNamespace());
flowStateCursor.insertAfter(“pipeline”,flow.getPipeline());
flowStateCursor.insertAfter(“error”,flow.getError());
flowStateCursor.insertAfter(“exceptionPath”,flow.getExceptionPath());
flowStateCursor.insertAfter(“isDone”,“” + flow.isDone());
flowStateCursor.insertAfter(“lastFlowElement”,flow.last());
flowStateCursor.insertAfter(“ignoreTimeouts”,“” + flow.getIgnoreTimeouts());
flowStateCursor.insertAfter(“exit”,flow.getExit());
flowStateCursor.insertAfter(“current”,flow.current());
flowStateCursor.insertAfter(“currentPath”,flow.currentPath());
flowStateCursor.insertAfter(“hasMoreNodes”,“” + flow.hasMoreNodes());
flowStateCursor.insertAfter(“stateValues”,flow.getStateValues());
//flowStateCursor.insertAfter(“parent”,flow.getParent());
valuesCursor.insertAfter(key + " (com.wm.lang.flow.FlowState [probably a running trace])",flowState);
flowStateCursor.destroy();
}
}
cursor.insertAfter(“values”, values);
valuesCursor.destroy();
cursor.destroy();