Quick example:
Class Demo.FunctionSet Extends Ens.Util.FunctionSet
{
ClassMethod SendRequestToHTTPOp(arg1 as %String, arg2 as %String) as %String {
if '$D(%Ensemble("%Process")) {
write "This doesn't work in DTL test mode",!
quit "OOPS"
} else {
#dim bp as Ens.BusinessProcess
set req = ##class(Ens.StringRequest).%New()
set req.StringValue=arg1_"^"_arg2
set bp=%Ensemble("%Process")
set tSC=bp.SendRequestSync("My.HTTP.Operation",req,.resp)
if $$$ISERR(tSC) {
// Oops... error!
}
quit "SEND SOMETHING BACK TO WHATEVER CALLED US"
}
}
}- Log in to post comments
.png)
.png)
.png)
.png)