Samples
Static methods
Accessing the SOAP methods is achieved by invoking a method
on the object representing the schema. The schemas are 'NLWS'
global objects.
The following example invokes the PostEvent
static method of the xtk:workflow
schema.
NLWS.xtkWorkflow.PostEvent("WKF1", "signal", "", {variables: {foo: 'bar'}}, false)
Non-static methods
To use the non-static SOAP methods, you must first recover an
entity using the load or create methods on the
corresponding schemas.
The following example invokes the ExecuteQuery
method of the xtk:queryDef
schema.
var query = NLWS.xtkQueryDef.create(
{queryDef: {schema: "xtk:workflow", operation: "select",
select: {
node: {expr: "@internalName"}
},
where: {
condition: {expr: "[folder/@name]='wfExamples'"}
},
orderBy: {
node: {expr: "@internalName", sortDesc: "false"}
}
}})
var res = query.ExecuteQuery()
for each (var w in res.getElements("workflow"))
logInfo(w.$internalName)
Limitations
Certain non-static calls cannot be used because the object being loaded (**) lacks data. This is the case, for example, for certain calls on nms:delivery.