* @see BpelRuntimeContext#writeCorrelation(org.apache.ode.bpel.runtime.CorrelationSetInstance,
* org.apache.ode.bpel.common.CorrelationKey)
*/
public void writeCorrelation(CorrelationSetInstance cset, CorrelationKey correlation) {
ScopeDAO scopeDAO = _dao.getScope(cset.scopeInstance);
CorrelationSetDAO cs = scopeDAO.getCorrelationSet(cset.declaration.name);
OScope.CorrelationSet csetdef = (OScope.CorrelationSet) _bpelProcess.getOProcess()
.getChild(correlation.getCSetId());
QName[] propNames = new QName[csetdef.properties.size()];
for (int m = 0; m < csetdef.properties.size(); m++) {
OProcess.OProperty oProperty = csetdef.properties.get(m);
propNames[m] = oProperty.name;
}
cs.setValue(propNames, correlation);
CorrelationSetWriteEvent cswe = new CorrelationSetWriteEvent(cset.declaration.name, correlation);
cswe.setScopeId(cset.scopeInstance);
sendEvent(cswe);