ExpressionService.send

Syntax

send(body: String, callback: PP.Delegate | Function, errorCallback: PP.Delegate | Function, contentType: String, urlParams: String);

Parameters

body. Body of web service query.

callback. Callback procedure.

errorCallback. Callback procedure on error.

contentType. Used protocol:

urlParams. URL query parameters.

Description

The send method requests the service of formulas.

Example

To execute the example, the HTML page must contain the TransformDialog component named dialog (see Example of Creating the TransformDialog Component). Get the number of functions for a simple tree:

// Create a service of expressions
var expService = new PP.Ufe.ExpressionService({
    Metabase: expressBox.getSource().getMetabase()
});
// Get the number of functions for a simple tree
var body = {
    GetMsInfo: {
        tMb: expressBox.getSource().getMetabase().getConnectionOdId(),
        tArg: {
            pattern: {
                ufeFunctions: "Ts"
            }
        }
    }
};
var func = function(sender, args) {
    var res = JSON.parse(args.ResponseText);
    console.log("Number of formulas: " + res.GetMsInfoResult.meta.ufeFunctions.its.Item.length);
}
expService.send(body, func);

As a result the console displays the number of functions for a simple tree:

Number of functions: 134

See also:

ExpressionService