Skip to main content

Creating Tutorial.ExampleOperation

Here are the steps for creating Tutorial.ExampleOperation using VS Code - ObjectScript:

  1. If you haven't already, within the source code folder in your workspace (probably named src), add a new folder named Tutorial.

  2. Within the Tutorial folder, add a new file named ExampleOperation.cls.

  3. Enter the following code:

    Class Tutorial.ExampleOperation extends Ens.BusinessOperation {
    Parameter INVOCATION = "Queue";
    Method Test(pRequest As Ens.StringRequest, Output pResponse As Ens.StringResponse) As %Status
     Set pResponse=##class(Ens.StringResponse).%New()
     if (pRequest.StringValue="")
       Set pResponse.StringValue="ERROR"
       Set tSC=$$$ERROR($$$GeneralError, "Test error case")
       Set pResponse.StringValue="OK"
       Set tSC=$$$OK
     Return tSC
    XData MessageMap {
        <MapItem MessageType="Ens.StringRequest">
FeedbackOpens in a new tab