go to post Alex Woodhead · Jun 21, 2023 CSP pages are at the beginning of a long compilation pipeline CSP + CSR -> Cls + inc -> Mac -> Int -> Obj So anticipate CSP can be similar case to handling classes but with the attention on the target package name configured for class generation. For a webserver extension handler (for csp, cls) it can be configured to skip check for the existence of physical CSP file. In CSP application configuration the "check for recompilation" option can be disabled. Alternatively CSP pages can be implemented directly as classes that extend %CSP.Page with web requests going to " [classname] .cls " instead. Check out utility method : Do $SYSTEM.OBJ.MakeClassDeployed(.classes, qspec, fulldeploy) Another avenue for consideration are legacy utilities: %RIMF and %ROMF can load and export respectively, compiled obj byte code (pcode)
go to post Alex Woodhead · Jun 21, 2023 Hi Evgeny, They should show up after being compiled. May need to close the DTL completely and reopen to get the list to repopulate? The benefits should be for easy reusability in Transforms and Business Rules
go to post Alex Woodhead · Jun 21, 2023 Hi Evgeny, An option is to use a FunctionSet, for example: Class Test.Str2Stream Extends Ens.Rule.FunctionSet { ClassMethod StringToStream(initValue As %String = "undefined", filename As %String = "") As %GlobalCharacterStream { set ret=##class(%GlobalCharacterStream).%New() set ret.Attributes("Filename")=filename do ret.Write(initValue) quit ret } } This will let you see the nice single line "From Source property" and "To Target Property" Where assignment value was: ##class(Test.Str2Stream).StringToStream(source.Content,source.Filename) The Gotcha If you have a test form input message: <ExampleIn> <Filename>ABC</Filename> <Content>ho ho ho</Content> </ExampleIn> And this is not populating output like: <StreamContainer> <OriginalFilename>ABC</OriginalFilename> <Stream><![CDATA[ho ho ho]</Stream> <Type>GC</Type> </StreamContainer> Then go back and check the input message type extends %XML.Adaptor. Class Test.Str2Stream.ExampleIn Extends (%Persistent, %XML.Adaptor) ie: It is a limitation of the Test form that it expects to be able to correlate the content from XML to Test Object. Hope this helps.
go to post Alex Woodhead · Jun 19, 2023 That does sound as if painted into a corner, especially if this is superuser account. The preferences are cached in a Portal Settings global. Can raise an idea on Ideas Portal to facilitate convenient clear / reset of user portal cached settings.
go to post Alex Woodhead · Jun 19, 2023 One way to approach this is with WebServerURLPrefix. The Web Gateway has special handling when it detects the first part of application URL matches the instance name of a connection. Where: https://srv2/[Instance name 1]/csp/sys/UtilHome.csp https://srv2/[Instance name 2]/csp/sys/UtilHome.csp See: https://docs.intersystems.com/irisforhealth20231/csp/docbook/DocBook.UI.... To let Apache know to expect this traffic could use: <Location /instance1> CSP On </Location> <Location /instance2> CSP On </Location> See: https://docs.intersystems.com/irisforhealth20231/csp/docbook/DocBook.UI....
go to post Alex Woodhead · Jun 19, 2023 Starting the production, allows the "Test" action to be available. Testing is enabled on production settings
go to post Alex Woodhead · Jun 19, 2023 Hi Evgeny, Historic message type flows can be seen with: SELECT %NOLOCK DISTINCT SourceConfigName,TargetConfigName,MessageBodyClassName FROM Ens.MessageHeader ORDER BY SourceConfigName,TargetConfigName,MessageBodyClassName For a running production with Testing enabled, the Test Action launches a dialog with drop-down list of test message types handled by an operation. See: Class EnsPortal.Dialog.TestingService with classmethod GetValidRequestTypeList A pattern I have noticed implemented for processing generic XML Streams is for a property to be exposed in the business operation that configures a list of expected ClassNames ( supporting %XML.Adapter ) to correlate. An interesting question for 3rd-party providers of interoperability components. Maybe this is suggesting a "New Transform" Wizard could be aware of the production in focus. In some implementations due to the visibility of notes in the management portal, these may be directed more at a "support role" than a "developer role" for which the organizations may be different. So some empathy with removing the dev teeth from descriptions where they might be confusing, outside an operational support context. Possibly would be beneficial to have different types of production visible notes.
go to post Alex Woodhead · Jun 15, 2023 Hi Brian, Possibly the new size is not calculated if message is not already saved. However, Custom RuleSet functions can be implemented in classes for example: Then the Rule Condition could be: (DocSizeX12(Document))>500000
go to post Alex Woodhead · Jun 14, 2023 Correct. There is no use of IRIS though the example could be extended to profile metadata from classes. With generative AI the line between Class Dictionary and Documentation could be less distinct. The example doesn't make use of vector metadata yet. The documentation has description of settings, and a deployment has a cpf / api to allude setting values, so maybe it is possible for AI to describe the nature of a deployment or support further information regarding messages / application / event log. ( Deliberately suggesting too many options for a single competition candidate to attempt to take on )
go to post Alex Woodhead · Jun 14, 2023 @Renan Lourenco and @Dmitry Maslennikov Another suggestion for sqlalchemy-iris would be to detect statements that end with "LIMIT #" and rewrite this to the beginning "SELECT TOP # ..... FROM
go to post Alex Woodhead · Jun 12, 2023 If the question is regarding automated setup configuration of services: A recent advancement if you are using Linux / Unix platform is to use cpf merge.https://docs.intersystems.com/iris20231/csp/docbook/DocBook.UI.Page.cls?...This can manage instance configuration file and CSP applications. CSP Merge can be applied on the first startup of service in Docker provisioning. Before that, and for Windows currently, have successfully implemented %INSTALLER classes to reconfigure vanilla servers for application migration and usage.https://docs.intersystems.com/iris20231/csp/docbook/Doc.View.cls?KEY=GCI...
go to post Alex Woodhead · Jun 12, 2023 Security was mentioned as a challenge for LLM. Will mention LangChain does have a feature if useful: https://python.langchain.com/en/latest/modules/chains/examples/constitut...
go to post Alex Woodhead · Jun 12, 2023 For info to also share about Class: Ens.Production has ClassMethod ApplySettings. set pSettings(<itemName>,<target>,<settingName>)=<settingValue>do ##class(Ens.Production).ApplySettings(<productionName>, .pSettings)
go to post Alex Woodhead · Jun 12, 2023 From terminal / csession do you get "1" returned when running: write ##class(%SYS.TaskSuper).SuspendSet(1) Failing that, if the server is not being used currently would stop and then start Ensemble Service in Emergency Mode and disable TaskScheduler / remove problem schedule. Then shut down Ensemble service from Emergency mode and start up Ensemble as normal.
go to post Alex Woodhead · Jun 10, 2023 Have created an article to demonstrate at: https://community.intersystems.com/post/dynamically-creating-hl7-message...
go to post Alex Woodhead · Jun 9, 2023 Thanks @Evgeny Shvarov for the challenge. I was digging through the ZPM code this afternoon. What I discovered is the need to implement AbstractInstaller and include in your module resources. Here is a class that implements loading System Default Settings via ZPM command (when configuration phase is included by a ZPM activity) Class alwo.ChangeProductionSetting Extends %ZPM.AbstractInstaller { Parameter Version = 1.0; Parameter MaintenanceVersion = 5; ClassMethod OnConfigureComponent(pNamespace As %String, pVerbose As %Boolean = 0, ByRef pVars) As %Status { set tSC=$$$OK set tSettingName="" set (tProductionName,tItemName,tHostClassName,tTarget)="*" set tValue="" set varName="" for { set varName=$O(pVars("zpm",varName),1,varValue) quit:varName="" if $ZCVT(varName,"U")="PRODUCTIONNAME" { set tProductionName=varValue } elseif $ZCVT(varName,"U")="TARGET" { set tTarget=varValue } elseif $ZCVT(varName,"U")="SETTINGNAME" { set tSettingName=varValue } elseif $ZCVT(varName,"U")="ITEMNAME" { set tItemName=varValue } elseif $ZCVT(varName,"U")="VALUE" { set tValue=varValue } elseif $ZCVT(varName,"U")="HOSTCLASSNAME" { set tHostClassName=varValue } } set existingId=tProductionName_"||"_tItemName_"||"_tHostClassName_"||"_tSettingName if tSettingName'="" { if ##class(Ens.Config.DefaultSettings).%ExistsId(existingId) { set oDefaultSetting=##class(Ens.Config.DefaultSettings).%OpenId(existingId,1) } else { set oDefaultSetting=##class(Ens.Config.DefaultSettings).%New() set oDefaultSetting.ProductionName=tProductionName set oDefaultSetting.ItemName=tItemName set oDefaultSetting.HostClassName=tHostClassName set oDefaultSetting.SettingName=tSettingName } // Assumes use of whitespace in settingValue is as intended set oDefaultSetting.SettingValue=tValue set tSC=oDefaultSetting.%Save() } Quit tSC } } Next in my ZPM module definition I added the tag at same level as Resource tags: <Resource Name="alwo.TestProduction.CLS"/> <Resource .... /> <InstallerClass>alwo.ChangeProductionSetting</InstallerClass> In the zpm install command I could use: load -v \some\localfolder\AddSetting -DProductionName=alwo.TestProduction -DHostClassName="EnsLib.MsgRouter.RoutingEngineST" -DItemName=TestProcess -DTarget=Item -DSettingName=RetryInterval -DValue=25 If you change your mind about the setting or want to add a second setting you can use for example: module-action alwo-changeproductionsetting configure -only -DProductionName=alwo.TestProduction -DHostClassName="EnsLib.MsgRouter.RoutingEngineST" -DItemName=TestProcess -DTarget=Item -DSettingName=RetryInterval -DValue=25 For the arguments the only mandatory ones are: -DSettingName -DValue When the others are not specified they simply go in as wildcard "*" against the System Default Settings. BTW: Need to delete the "settable" values from the Production XData configuration in distribution, so that the default is applied. ie: If looking at Production Configuration in Management Portal and a production Item setting is displaying with the Black font label, it means this value is masking the System Default Setting. If you don't want to pass so many D parameters then some of the values could be hardcoded for project as Parameters in the InstallerClass. Parameter DProductionName="A Production Name"; Parameter DTarget="Item"; Parameter DItemName="Telegram.BusinessOperation"; Parameter DSettingName="Token"; Then would would be closer to original requirement: zpm "install telegram-gpt -D Token=sometoken" Hope this helps. Kind regards, Alex
go to post Alex Woodhead · Jun 9, 2023 I would say Yes in the sense that HL7 messages can be constructed entirely from scratch via code. The main supporting method for this on EnsLib.HL7.Message the method "SetValueAt" can use to add and replace content for an HL7 message.There are various ImportFrom methods (File, Stream, String) where a vanilla base message can be correlated to an HL7 Message.The DocType is assigned by method PokeDocType, after which virtual property paths used by "SetValueAt" method will assign content in the right place as expected.The DTL (Data Transform Language) documents can visually assist converting some other form of structured data into new HL7 messages. They are dynamic in that they can respond not just to a source reference message but leverage Lookup tables to control the content created for output HL7 messages. Then new configuration can be added to lookup tables and this extends the behavior of an existing DTL. For some code example I have a UnitTest framework class that contains code demonstrating correlation of flat content to an HL7 message, setting the DocType and comparing virtual document paths. https://openexchange.intersystems.com/package/UnitTest-DTL-HL7
go to post Alex Woodhead · Jun 7, 2023 Some odd questions: 1) Is the license still valid 2) Is it possible to suspend the Task Schedule before changing the problem item.