ForeExecAtomic

Syntax

ForeExecResult ForeExecAtomic(ForeExecAtomicArg tArg)

Parameters

tArg. Operation execution parameters.

Description

The ForeExecAtomic operation executes Fore methods when working in integration services.

Comments

Integration services are third-party services that request data from platform repositories. The ForeExecAtomic operation connects to repository using a special integration user, executes Fore method, returns method execution result, and closes repository connection.

To execute the ForeExecAtomic operation, the repository should be prepared as follows:

  1. In repository connection description set the EnableForeExecAtomic setting to true.

  2. Using the PP.Util utility with the save_creds parameters and specifying the MBCACHE keyword, save credentials of schema owner or any user who has permissions to read repository system tables. The saved credentials are used to connect to database and read the system table with integration users that will be cached in BI server memory on the first execution of the ForeExecAtomic operation.

  3. Using the PP.Util utility with the save_integration_user parameters, generate token for integration user and save technological account credentials to connect to repository by using the ForeExecAtomic operation.

After executing the specified operations one can use the ForeExecAtomic operation. To execute the operation, in the tArg.token field specify the integration user token obtained on executing the save_integration_user operation, in the tArg.metabaseId field specify repository identifier, and in the tArg.objKey and tArg.foreArg fields specify unit/assembly key and parameters of executed Fore method.

The operation returns the Fore method execution result.

Example

Below is the example of executing Fore method by the integration user who should be saved for the repository. The request contains integration user token, repository identifier, unit key, and parameters of executed method. The response contains method execution result.

Executed method

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ForeExecAtomic xmlns="http://www.fsight.ru/PP.SOM.Som">
<tArg xmlns="">
  <token>{BD8D4E02-FA2A-405B-9938-8DB97087C7D8}</token>
  <metabaseId>TestRepository</metabaseId>
  <objKey>20109</objKey>
<foreArg>
  <methodName>TestAtomic</methodName>
<args>
<it>
  <k>1</k>
  <value>100</value>
  </it>
<it>
  <k>2</k>
  <value>10</value>
  </it>
  </args>
  </foreArg>
  </tArg>
  </ForeExecAtomic>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ForeExecAtomicResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <result xmlns="">A > B: True. Date and time of execution: 08.08.2025 11:18:45</result>
  </ForeExecAtomicResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"ForeExecAtomic" :
{
"tArg" :
{
"token" : "{BD8D4E02-FA2A-405B-9938-8DB97087C7D8}",
"metabaseId" : "TestRepository",
"objKey" : "20109",
"foreArg" :
{
"methodName" : "TestAtomic",
"args" :
{
"it" :
[
{
"k" : "1",
"value" : "100"
},
{
"k" : "2",
"value" : "10"
}
]
}
}
}
}
}

JSON response:

{
"ForeExecAtomicResult" :
{
"result" : "A > B: True. Date and time of execution: 08.08.2025 11:18:45"
}
}
public static ForeExecResult ForeExecAtomic(string userToken, string repoId, uint assmKey, string methodName)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tExec = new ForeExecAtomic()
{
tArg = new ForeExecAtomicArg()
{
token = userToken,
metabaseId = repoId,
objKey = assmKey,
foreArg = new ForeExecArg()
{
methodName = methodName,
args = new OdArg[2]
{
new OdArg(){ k = 1, value = "100" },
new OdArg(){ k = 2, value = "10" }
}
}
}
};
// Execute method
var result = somClient.ForeExecAtomic(tExec);
return result;
}

See also:

Specific Operations