User bio
404 bio not found
Member since Nov 9, 2015
Posts:
Replies:
Echoing Chad's comments and adding screen shot of the "button somewhere in the new rules editor for switching back to the old one" :
Take a look at the WorkQueue Manager which also allows for coordination.
workQueue =iris.cls("%SYSTEM.WorkMgr")._New()
status = workQueue.Queue("..PythonClassMethodToBeJobbed")
[Note routines require function [parentheses] not just a plain label - so for Alex's example below will need Test()]
Certifications & Credly badges:
James has no Certifications & Credly badges yet.
Global Masters badges:
James has no Global Masters badges yet.
Followers:
Following:
James has not followed anybody yet.
I vote for #1 (except need to 'grovel' and hope to work towards removing that sentiment)
Here are some proposed enslib fixes and an example of using a custom search table to index data from the generic message that can be used in the current message search. The following is not intended to detract from the need to amend enslib code to prevent a headache by allowing searching for data within GenericMessage objects out of the box.
For the hard coded EnsLib.HTTP.GenericMessage:
In EnsLib.HTTP.GenericService:
Adding:
Property MessageClass As %String [ InitialExpression = "EnsLib.HTTP.GenericMessage" ];
Expose via Settings by including in SETTINGS parameter
MessageClass:Basic:selector?multiSelect=0&context={Ens.ContextSearch/SubclassOf?class=EnsLib.HTTP.GenericMessage&include=1}
Amend hard coded line to:
Set tRequest=$classmethod(..MessageClass,"%New",pRequestBody,,pRequestBody)
The SETTINGS include=1 is another limitation correction arising from this as Ens.ContextSearch/SubclassOf does include the super class parameter
Ens.ContextSearch method SubclassOf add the super class as a valid choice
If tClass '= "" { If $G(pParms("include")) Set pResults($I(n))=tClass
We ought to also expose the SearchTable property since this would allow indexing data from the source without creating a custom service to merely set the SearchTable class.
Adding to SETTINGS parameter:
SearchTableClass:Basic:selector?multiSelect=0&context={Ens.ContextSearch/SubclassOf?class=Ens.CustomSearchTable}
Example of a CustomSearchTable class:
Class JGM.CustomSearchTable Extends Ens.CustomSearchTable { Parameter DOCCLASS = "EnsLib.HTTP.GenericMessage"; /// This is the case id from the REST payload Property CaseId As %String(MAXLEN = ""); Index CaseIdIdx On CaseId; /// Example to index a JSON path value from the Stream property ClassMethod OnIndexDoc(pDocObj As %Persistent, pSearchTable As Ens.CustomSearchTable) As %Status { Set sc = $$$OK Try { Set json = {}.%FromJSON(pDocObj.Stream) Set caseId = json.%Get("case") } Catch ex { /* can decide if want to populate sc from ex if do not want to suppress error */ Set caseId = "UNKNOWN" } /* Can prevent saving a search table entry if appropriate */ If (caseId = "UNKNOWN")||(caseId = "") { Set pSearchTable="" } Else { Set pSearchTable.CaseId = caseId } Return sc }
One can use a Transformation to populate pSearchTable in OnIndexDoc but still need to create the search table class with properties and hard code the transformation in the search table class.