Thank you!

sortbox - If present, the Search Page displays a set of radio buttons that allows the user to choose how to sort the results.

I wouldn't have immediately thought that would solve it but it makes sense along with your explanation.

Out of curiosity, how would you override that write statement in %CSP.Lookup?  Isn't that generated code which one wouldn't want to touch?

I would like to know a little more about this.

I was just working on something where my business process put together a custom object based on a file from the record mapper.  The object is simply saved to the database so just to put a bow on it we send a request to a "FinishedOperation" business operation which doesn't do anything.  The request is sent async and the request object is the instance of the custom object was created/updated.  

This request object has a few properties that are object properties and one is XML enabled the other is not.  They both show up in the body of the message trace there's nothing in the content tab of the message trace.

How come they show up when they aren't XML enabled? What am I not understanding in terms of the difference between the body and the contents?

Thanks!

I don't think a DTL is considered a business host and thus you can't configure parameters for at DTL like you would normally for a business host (service, process, operation). It doesn't have an On{This}() method like the business hosts do and where you would set and change parameters.  What parameter are you trying to change?

I'm not sure about the aux param.  The documentation doesn't seem to encourage programming custom transformations in code, rather the visual editor is pressed.  The transform method seems to be generated from the <transform> tag in the DTL and looking at the .int code in some of my examples I don't see the param used (just set to "").  I'm sure an ensemble process calls it.  Considering it's generated code, I think it would be risky to try to fiddle with that.  Curious to know what it does.

Yeah, I spent a lot of time with the documentation. I would be interested to know if it's possible to set it all up without configuration in the management portal.  E.g. before I called the endpoint to get the keys and rotate them from the auth server, but the config does that for free.  I think there's a lot I could have missed not knowing the OAuth spec but I'd be curious to know if anyone did it without using the config.

I think I answered my own question after working more on it today.  

My OnRequest() method processed the record with ObjectScript code.  I just was careful to return a proper %Status if there was an error so Ensemble knew what to do.  I used the Ens.StringContainer response class to set the response (which isn't used as far as I can see because it's async from the business service) and used that same response object as the request to a business operation just to finish things up.  That wasn't really necessary either, but while viewing the messages I can see a processing message that has the file name and resulting object ID so we can troubleshoot if needed.

Thanks @Luis Angel Pérez Ramos!

Yes, agreed on DTLs for HL7 - it's built for that!  In my case, yes, it's a custom object.  Also, I think for my use I will keep the request from the service to the process (the mapped record to the processing) as async.  

So I'm still a little unclear and, yes I have read and reread that page of documentation but I'm left with questions.  Let me stub out some code to see if I can narrow down my thoughts (sorry I'm really clumsey with this editor)

Class BusinessProcess extends Ens.BusinessProcess {

Method OnRequest(request as Record.From.Mapper, response as MyCustomObject) as %Status {

  // does it make sense that my response is here the custom object 
  // I'm transforming my record to?  i don't see a need to create a 
  // whole new response class just to say the record was completed . . . 
  // either the response is "" or an instance of MyCustomObject

  s response=##class(MyCustomObject).%New()
  s response.rawData1=$e(request.PropertyToExtractFrom)
  s response.RawData2=$zstrip($p(request.DelimitedProperty,""|",2),"<>W")
  d response.%Save()

  // this is where i'm sacrificing the dtl and bpl for just simple code - 
  // sounds like you say you do this for custom objects, so i think i'm good

  q $$$OK

  // does the response even matter here?  i'm not sending it to a business 
  // operation, however we do have a kind of dummy business operation we can 
  // use to send the response to and nothing happens, just kind of an ending 
  // point to say "we're done and there was no issues".

  // so i could implement something like:
  // ..SendRequestAsync("DummyOperationToSayWe'reDone",0) q 1

}

Method OnResponse(request As %Library.Persistent, ByRef response As %Library.Persistent, callrequest As %Library.Persistent, callresponse As %Library.Persistent, pCompletionKey As %String) As %Status

{

  // the documentation says i must implement this but i was able to compile without . . . 
  // you also seem to indicate it's optional.  since i'm not handling any responses 
  // from any of the business hosts this isn't necessary to implement i think.  
  // if i were to implement request would be an instance of Record.From.Mapper and 
  // response would be the response defined in the business process or operation, yes?

  q $$$OK

}

This is great!

I would love to see an article about Dockeriz-ing legacy applications including how to manifest your system's current security configurations and other important configs like OAuth servers, productions, and SSL configs.  

Most articles and example seemed geared to "here's a fresh copy of IRIS for you to do your thing!"  I have sat with the Docker template in the InterSystems community Git repo many times only to find myself with a half working version of my current application.  I also am not that good with Docker in the first place so I admit I have short comings and much to learn still.  

@Evgeny Shvarov my hacky way of doing this is to create an untracked mac file with ROUTINE debug defined.

I just swap in the suite or method I want to run per Alex's instructions, set my breakpoints in VS code and make sure the debug configuration is in my VSCode settings:

    "launch": {

        "version": "0.2.0",

        "configurations": [

            {

                "type": "objectscript",

                "request": "launch",

                "name": "debugRoutine",

                "program": "^debug"

            }

        ]

    }

@Yaron Munz 
What are these Methods,Triggers,Incidies and Storages properties or params on the DestCls?  I don't see them as part of the %Persistent class or any super classes in the class reference, so I'm wondering exactly what you're referencing here?

I tested this on my command line and I get:

W clone.Methods.Count()
^
<PROPERTY DOES NOT EXIST>

Was this pseudo code for something or are they properties that you defined in the class?

Thanks, @Timothy Leavitt!

This was incredibly helpful.  I modified it a bit as that $CASE statement would have grown over time into something not fun to manage.

I created the main dispatch class and prepended the version to the pUrl parameter in the OnPredispatch method and then passed that into a main router class using DispatchRequest similar do what you did there.  We can maintain the routemap in that main router class to keep things more organized and standard and from there it simply acts as normal.

THANK YOU!

@Eduard Lebedyuk thanks for your response here!

I changed directions and used embedded Python and a library called kafka-python which appears to be well-used and supported.  Using this, I've had no issues getting connected to my server, plus now I have access to more commands for Kafka.  

Before I edit or setup a new External Language Server 1) do you think the %Net.Remote.Exception is related to the Java Home on the external language server not being setup and 2) if I had multiple external language servers setup, how would I tell %External.Messaging (and specifically the Kafka client) to use one or the other?

It would be ideal to stick with COS libraries and features, but I think the Python library is the best solution as it offers more in terms of an API, but I'd still like to get %External.Messaging working for other purposes.