private void zReadScalarResult(object scalarResult) { ScalarResultMapping scalarResultMapping = (ScalarResultMapping)m_Step.ResultMapping; CurrentScope.DataScope.SetStateVariable(scalarResultMapping.StateVariable, new StateVariable <string>(DataUtils.GetUnscopedVariableName(scalarResultMapping.StateVariable), DataType.String, scalarResultMapping.XMLFieldOutputMode, scalarResultMapping.PersistenceMode, Convert.ToString(scalarResult))); }
private void zAddVariablesToScopeFromDatabaseStep(DatabaseStep databaseStep) { foreach (OutputParameterMap parameterMap in databaseStep.OutputParameterMapping) { zAddVariableToScope(m_CurrentScope.ScopeName, new StateVariableInfo(parameterMap.StateVariable, DataType.String, parameterMap.PersistenceMode)); //TODO: get actual datatype } if (databaseStep.ResultMapping is ScalarResultMapping) { ScalarResultMapping scalarResultMapping = (ScalarResultMapping)databaseStep.ResultMapping; zAddVariableToScope(m_CurrentScope.ScopeName, new StateVariableInfo(scalarResultMapping.StateVariable, DataType.String, scalarResultMapping.PersistenceMode)); //TODO: get actual datatype } if (databaseStep.ResultMapping is TableResultMapping) { TableResultMapping tableResultMapping = (TableResultMapping)databaseStep.ResultMapping; StepScope tempScopeForTableResults = null; if (tableResultMapping.ObjectSetClassName != null && tableResultMapping.ObjectSetListName != null) { zAddVariableToScope(m_CurrentScope.ScopeName, new StateVariableInfo(tableResultMapping.ObjectSetListName, DataType.List, tableResultMapping.PersistenceMode)); string tempScopeCacheKey = zGetCacheKey(m_CurrentScope.ScopeName, tableResultMapping.ObjectSetListName); tempScopeForTableResults = new StepScope(Guid.NewGuid().ToString(), tableResultMapping.ObjectSetClassName, tempScopeCacheKey, null); zSetCurrentScope(tempScopeForTableResults); } foreach (TableResultMap tableResultMap in tableResultMapping.TableMapping) { zAddVariableToScope(m_CurrentScope.ScopeName, new StateVariableInfo(tableResultMap.StateVariable, DataType.String, tableResultMapping.PersistenceMode)); //TODO: get actual datatype } if (tempScopeForTableResults != null) { zRemoveCurrentScope(); } } }