RemoteCalc: MsProblemRemoteCalc;
The RemoteCalc property determines whether remote calculation of modeling problem is used on BI server.
If the property is set to
MsProblemRemoteCalc.Disable. Modeling problem is calculated locally.
MsProblemRemoteCalc.Enable. Modeling problem is calculated remotely on BI server specified in the settings.xml file is used for calculation.
MsProblemRemoteCalc.EnableBySources. Modeling problem is calculated remotely on BI server specified in the IMsProblemCalculationProxy.Address property. If the property is not set, then BI server specified in the settings.xml file is used for calculation.
Executing the example requires that the repository contains a modeling container with the MS_REMOTECALC identifier containing a modeling problem with the CALC_PROBLEM identifier. BI server should also be deployed at: http://10.9.172.46/fpBI_App_v10.x/axis2/services/PP.SOM.Som.
Add links to the Metabase, Ms system assemblies.
Sub UserProc;
Var
Mb: IMetabase;
Problem: IMsProblem;
Calculation: IMsProblemCalculationProxy;
CalcSettings: IMsProblemCalculationSettings;
Begin
// Get current repository
Mb := MetabaseClass.Active;
// Get modeling problem
Problem := Mb.ItemByIdNamespace("CALC_PROBLEM", Mb.GetObjectKeyById("MS_REMOTECALC")).Bind As IMsProblem;
// Set problem calculation parameters
CalcSettings := Problem.CreateCalculationSettings;
// Determine that calculation is executed on the specified BI server
CalcSettings.RemoteCalc := MsProblemRemoteCalc.Enable;
// Set connection parameters to BI server
Calculation := Problem.Calculate(CalcSettings) As IMsProblemCalculationProxy;
Calculation.Address := "http://10.9.172.46/fpBI_App_v10.x/axis2/services/PP.SOM.Som";
// If settings of remote problem calculation are successfully set, the problem is calculated
If Calculation.IsRemoteCalc Then
Calculation.Run;
Debug.WriteLine("Problem remote calculation is executed '" + Problem.Name + "'");
Else
Debug.WriteLine("Problem remote calculation '" + Problem.Name + "' is not executed");
End If;
End Sub UserProc;
After executing the example, modeling problem calculation will be executed remotely on the specified BI server.
See also: