try {
selectors = new Selector[_opick.onMessages.size()];
int idx = 0;
for (OPickReceive.OnMessage onMessage : _opick.onMessages) {
CorrelationKey key = null; // this will be the case for the
// createInstance activity
PartnerLinkInstance pLinkInstance = _scopeFrame.resolve(onMessage.partnerLink);
if (onMessage.matchCorrelation == null && !_opick.createInstanceFlag) {
// Adding a route for opaque correlation. In this case,
// correlation is on "out-of-band" session-id
String sessionId = getBpelRuntimeContext().fetchMySessionId(pLinkInstance);
key = new CorrelationKey(-1, new String[] { sessionId });
} else if (onMessage.matchCorrelation != null) {
if (!getBpelRuntimeContext().isCorrelationInitialized(
_scopeFrame.resolve(onMessage.matchCorrelation))) {
// the following should really test if this is a "join"
// type correlation...