^IRIS.Msg("EnsColumnsNAMESPACENAME,"en"Can be mapped to your DB, so you won't lose the changes on update (and also you won't need to make ENSLIB RW).
- Log in to post comments
^IRIS.Msg("EnsColumnsNAMESPACENAME,"en"Can be mapped to your DB, so you won't lose the changes on update (and also you won't need to make ENSLIB RW).
*iis a great idea.
There are to valid ways to solve this code golf:
Both approaches are valid, sample solution uses approach 1.
"Print out" is any output the program produces so if you for example add 1/0 at the end it might save you a few characters.
Well, in that case you might as well do this (down to 41):
ClassMethodascii() [ CodeMode = objectgenerator ]
{
f i=0,27,0:1:94d%code.Write($c(i+32))
}I am very interested how compilation flags help you with this.
it's like cheating
Reflective programming is not cheating!
42 characters so far.
Pinging @Stefan Wittmann
Class methods are recommended for use in all cases.
While classes provide an overhead, this is usually negligible.
Yes, query Ens.MessageHeader table, maybe joining on a body and then call AbortMessage method here.
But how do you decide on a user? Do you have only one user to assign tasks to?
Great!
I see you are using this query:
SELECT %Actions, %Message, %Priority, %Subject, TaskStatus_TimeCreated, IDFROM EnsLib_Workflow.TaskResponse
WHERE TaskStatus_AssignedTo = ?
AND TaskStatus_IsComplete = 0So it returns only uncompleted tasks assigned to a current user (by the way UserName is a valid sql variable so you don't need to pass it as an argument from ObjectScript). It does not return unassigned tasks - do you autoassign tasks in production? If so, how?
How do you call TEST_ROUTER?
See you in Maryland!
Create subscript level mappings for a correct database.
%ALL global mapping is higher priority than namespace mapping: if %ALL has ^a global mapped to db A and your namespace has ^a mapped to db B, global ^a from db A would be used when you access it from your namespace.
But, subscript mapping is higher priority than global mapping: if %ALL has ^a global mapped to db A and your namespace has ^a(1) mapped to db B, global ^a(1) from db B would be used when you access ^a(1) from your namespace.
Had the same issue. Solved by removing these env vars:
$env:SSLKEYLOGFILE=""$env:PYENV_ROOT=""$env:PYENV_HOME=""$env:PYENV=""Thanks @Philip Miloslavsky!
Edited description.
Stop iris, go to iris.cpf and disable zstart calls, start iris, remove your zstart routine or comment out io writes, stop iris, reenable zstart calls in iris.cpf, start iris.
Please check this series of articles, it's about git not tfs but the underlying idea is the same.
The size of a table row (all fields together) is limited by the string size (either 32KB or 3.6MB).
True that, but if there's a known long-but-below-3.5-mb field it can be moved into a separate node for storage so it won't interfere with other fields.
Also class inheritance might split the storage into a few nodes.
There are two formats for LUT:
Old one:
<?xml version="1.0" encoding="UTF-8"?><Exportgenerator="IRIS"version="26"zv="IRIS for UNIX (Red Hat Enterprise Linux 7 for x86-64) 2022.1 (Build 209U)"ts="2024-03-03 06:05:36"><Documentname="LUT_NAME.LUT"><lookupTable><entrytable="LUT_NAME"key="KEY">VALUE</entry><entrytable="LUT_NAME"key="KEY2">VALUE2</entry></lookupTable></Document></Export>New one:
<?xml version="1.0"?>
<lookupTable>
<entry table="LUT_NAME" key="KEY">VALUE</entry>
<entry table="LUT_NAME" key="KEY2">NALUE2</entry>
</lookupTable>
Looks like you're importing old format using new importer. Here's the code to import both versions:
ClassMethod ImportLUT(dir)
{
#include %occErrorswrite"Lookup Tables import from: " _ dir
set rs = ##class(%File).FileSetFunc(dir, "*.xml;*.XML;*.lut;*.LUT")
while rs.%Next() {
set tablePath = rs.Get("Name")
write"Importing: " _ tablePath,!
// table is the full path, the last part (denoted by *) is the actual file nameset tablePathNoExtension = $PIECE(tablePath, "/", *)
// asking for $PIECE with just delimiter asks for the first part, thus ignore anything after the .set tablePathNoExtension = $PIECE(tablePathNoExtension, ".")
write"Importing Lookup Table in " _ tablePathNoExtension,!
// lookup table should be named the file name (without extension)//do ##class(Ens.Util.LookupTable).%ClearTable(tablePathNoExtension)// Try the new import first.set sc = ..ImportLUTFile(tablePath)
// If we got an error, try legacy importif$$$ISERR(sc) {
write"New import failed. Trying legacy import",!
set sc=##class(Ens.Util.LookupTable).%Import(tablePath)
if$$$ISOK(sc) {
write"Import successful",!
}
}
// Error remains unfixed. Fail.if$$$ISERR(sc) {
write"Lookup Table import failure: ", $System.Status.GetErrorText(sc),!
do$system.Process.Terminate(, 1)
}
}
}
/// Adapted from EnsPortal.LookupSettings:Import/// Import lookup tables from file <var>Filename</var>ClassMethod ImportLUTFile(Filename As%String) As%String
{
Set tRS = ##class(%ResultSet).%New("%RoutineMgr:ImportItemList")
Set tSC = tRS.Execute(Filename)
Quit:$$$ISERR(tSC) tSC
Set tSC = $$$OKKill Select
For {
Quit:'tRS.Next(.tSC)
Set Name = tRS.Get("Name")
If$E(Name,*-3,*)=".LUT" {
Lock +^Ens.LookupTable(Name):2If '$TSet tSC = $$$ERROR($$$LockFailedToAcquireRead,$Name(^Ens.LookupTable(Name))) QuitSet Select($E(Name,1,*-4)) = ""
}
}
Quit:$$$ISERR(tSC) tSC
Quit:'$D(Select) $$$ERROR($$$GeneralError,"This file does not contain any lookup tables")
Set tSC = $system.OBJ.Load(Filename,"-d", .Err, .Loaded, 0)
Set Name = ""For {
Set Name = $O(Select(Name))
Quit:Name=""Lock -^Ens.LookupTable(Name)
}
Quit tSC
}Do you have CA cert for the CA used to sign external server's cert?
You need that and not external server's cert itself.
Nice demo!
Do you want to call a process, the name of which is returned by a method?
You can use indirection @, or assign method result to a local variable and use @ on it.
IRIS supports multiple inheritance for methods, so create an abstract class which holds the methods and add it to a list of superclasses of your production class.
1. Provision Azure File Share.
2. Mount it locally (on a server with IRIS.DAT)
3. Copy IRIS.DAT into the share.
4. Mount Azure File Share into your cloud env.
5. Move IRIS.DAT from the file share to your block storage.
6. Remove Azure File Share.
Longrunning tcp connections might be an issue. I would definitely try setting it to something lower.
You need to iterate on value:
// extract json content from the request:set dynRequestJsonPayload = {}.%FromJSON(%request.Content)
#dim JsonIterator As%Iterator.AbstractIteratorset JsonIterator = dynRequestJsonPayload.%GetIterator()
// iterate on json structure:if dynRequestJsonPayload '= "" {
while JsonIterator.%GetNext(.key, .value, .NodeType) {
if NodeType = "string" {
do GlobalTrace("NodeType: " _ NodeType _ "; key: " _ key _ "; value: " _ value)
} elseif NodeType = "array" {
// i want to iterate on this array...// the following line throws the exeception "ERREUR #5002: Erreur ObjectScript: <INVALID OREF>traitementUFI+34^common.REST.1"set JsonIteratorSecondary = value.%GetIterator()
} else {
// Do something
}
}
}