I use Business Flow Manager to query existing Process Instances in a java snippet inside a bpel. I always get 2 results, even I expect only 1 because I use a where condition on a PID.
QueryResultSet result =
bfm.query("PROCESS_INSTANCE.PIID, PROCESS_INSTANCE.STATE, PROCESS_INSTANCE.CREATED", "PROCESS_INSTANCE.PIID = ID('" + myPid + "') AND (PROCESS_INSTANCE.STATE = PROCESS_INSTANCE.STATE.STATE_FAILED OR PROCESS_INSTANCE.STATE = PROCESS_INSTANCE.STATE.STATE_TERMINATED)", (String)null, (Integer)null, (TimeZone)null);
I found somewhere in this forum I have to add the DISTINCT clause, but I would like to understand why I get more than a result.
Does anyone know the answer?
This topic has been locked.