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?
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.