go to post Jeffrey Drumm · Jan 14 This is hilarious! I started to add that exact feature last night but got interrupted by the dog's apparently dire need to go outside ... and that need cannot go unaddressed without unfortunate consequences. I saw the notification of your update this morning, before I got back to work. Again, thank you!
go to post Jeffrey Drumm · Jan 13 Thank you again, @Robert Cemper. I think this thread may be a contender for the "most correct answers" award 😁
go to post Jeffrey Drumm · Jan 11 Hi @Robert Cemper, I had already tried subclassing %Library.String, but used the [ PropertyClass = rcc.FixStr.Props ] syntax rather than Extends. The class compiles with your suggested change ... now to verify that it works 😉 EDIT: It does! Any idea why the PropertyClass option fails?
go to post Jeffrey Drumm · Jan 11 Looping back to this. I thought it might be more user-friendly to define custom property parameters for this solution to specify both length (LENGTH) and alignment (ALIGN), rather than just relying on MAXLEN. I'd also of course modify the code to be generated to handle the desired formatting. I've defined a a property parameter class with those parameters and added it as a PropertyClass to the class containing the property definition, but on compilation I get: ERROR #5002: ObjectScript error: <UNDEFINED>Get+1^rcc.FixStr.G1 *%parameter("LENGTH") > ERROR #5490: Error running generator for method 'Get:rcc.FixStr' What am I missing? Here's the property class: Class rcc.FixStr.Props { Parameter LENGTH As %String = "10"; Parameter ALIGN As %String = "LEFT"; } And the class containing the Get() method for the property definition: Class rcc.FixStr Extends %RegisteredObject [ PropertyClass = rcc.FixStr.Props ] { /// Fill value <var>%val</var> to <a href="#MAXLEN">MAXLEN</a> characters. Method Get() As %String [ CodeMode = generator, ServerOnly = 1 ] { set tCode="$e(%val_"""_$j("",+%parameter("LENGTH")) set tCode=tCode_""",1,"_+%parameter("LENGTH")_")" $$$GENERATE( " Quit "_tCode) QUIT $$$OK } }
go to post Jeffrey Drumm · Jan 10 You could write a custom method that subclasses Ens.Rule.FunctionSet and includes Ensemble.inc (may already be included by default, haven't checked). There's a $$$LOGINFO() macro available that can be invoked from a method; that method would be called in an argument to an assign rule. Here's an example: Include Ensemble Class IDC.Util.FunctionSet Extends Ens.Rule.FunctionSet { ClassMethod LogInfo(pText As %String) As %Status { $$$LOGINFO(pText) Return $$$OK } } Invoke it like this (or within another expression): And debug is definitely a more sensible option than assign. Thanks, @Enrico Parisi 😁
go to post Jeffrey Drumm · Jan 8 To add to @Enrico Parisi's point ... your next upgrade will likely undo your modifications to the %Net.SMTP class.
go to post Jeffrey Drumm · Jan 3 Since there are no ROL segments in the source message, your foreach never executes. Just check for the existence of the ROL segment in the source, and if it doesn't exist, populate any field in a ROL segment in the target:
go to post Jeffrey Drumm · Dec 24, 2024 Are both instances on the same host, and if yes, have you set them up with instance prefixes (it looks like you have based on the screenshot). You may want to check all of your service entries in the registry and verify that they're pointing at the right instance. And I know some of the OAuth2 artifacts are created on production start ... is at least the registry/hub running?
go to post Jeffrey Drumm · Dec 24, 2024 I ran into the same issue. I think it's related to the order in which the access gateway for the CV is activated; if you do it before setting up security (SSL/TLS) it won't register properly with the hub. I deactivated and reactivated the access gateway and that resolved the problem.
go to post Jeffrey Drumm · Dec 11, 2024 Are you looking to view the expected request and/or response? The %Net.HttpRequest Send() method has a test argument as its 3rd option; setting it to 1 outputs the request, 2 the response, and 3 the response headers. It's unfortunate that this isn't described in the class documentation; you have to look at the source to figure out what the test argument does.
go to post Jeffrey Drumm · Nov 24, 2024 The IRIS regex functionality is built on the ICU engine, which was based on (but does not rigorously adhere to) PCRE. This includes the ObjectScript $MATCH() and $LOCATE() functions as well as the %Regex.Matcher class. A web search turns up a handful of articles and posts discussing the differences between the two. Python has a PCRE library (python-pcre) that may help if your development effort can be transitioned in whole or part to Python.
go to post Jeffrey Drumm · Nov 22, 2024 Found the SequenceNumber Property property. Just what I needed needed! for i = 1:1:count {w cdef.Properties.GetAt(i).Name_"|"_cdef.Properties.GetAt(i).Parameters.GetAt("MAXLEN")_"|"_cdef.Properties.GetAt(i).SequenceNumber,!}
go to post Jeffrey Drumm · Nov 22, 2024 Thanks, this is useful @Nick Petrocelli! It appears that the order in which the properties are returned by iterating with Count() is sorted alphabetically. Is there any way to fetch them in the order in which they were defined in the class? I have SqlColumnNumber assigned for each of the properties, so if there's a way to fetch that keyword's value I can order them according to that. I'd prefer not to hard-code them in if possible, as the spec may change ... Thanks!
go to post Jeffrey Drumm · Nov 21, 2024 Sounds like a separators issue. I set that as empty on both the service and operation, which assumes the messages will be formatted with whatever separators are indicated in the ISA segment.
go to post Jeffrey Drumm · Nov 21, 2024 Sooooo ... It looks like those macros don't exist anymore. They're not in %occKeyword.inc or in any other .inc file as far as I can tell. Any other thoughts? Ah ... maybe never mind. $$$comMemberArrayGet(class, $$$cCLASSproperty, property, $$$cPROPparameter, param) Appears to do what I want.
go to post Jeffrey Drumm · Nov 20, 2024 EnsLib.SQL.Snapshot has a GetData() method that takes the column number as its first argument (the second takes a row number but defaults to the current row). So that in conjunction with GetColumnCount() should allow you to iterate across columns. Edit: And of course Marc beat me to it ... 😁
go to post Jeffrey Drumm · Nov 19, 2024 I used Single-Session batch and used a business process/router to send only the Interchange DocType to the operation. The Group and Transaction sets within are referenced from the Interchange and are automatically re-assembled by the operation.