go to post Enrico Parisi · Jan 13 Hi @Ashok Kumar T , you also need to use lock to properly implement ACID, something like: LEARNING>lock +^myTracker("onSomething") LEARNING>w ^myTracker("onSomething") 1 LEARNING>ts TL1:LEARNING>s ^myTracker("onSomething")=12 TL1:LEARNING>w ^myTracker("onSomething") 12 TL1:LEARNING>trollback LEARNING>w ^myTracker("onSomething") 1 LEARNING>lock -^myTracker("onSomething") LEARNING>
go to post Enrico Parisi · Jan 13 Sorry, I forgot to mention that to implement properly ACID you need transactions AND locking mechanism using LOCK command.
go to post Enrico Parisi · Jan 13 does it also work for global (i.e the hierarchical data model)? Simple answer: yes, it sure does. Your code implementation need to use transactions (TSTART, TCOMMIT, TROLLBACK) commands to implement ACID. Don't forget that, in the end, using Objects and/or SQL, the code executed use globals. Using Objects and/or SQL the framework implement transaction for you, using globals you need to implement/code it.
go to post Enrico Parisi · Jan 13 Hi, doesn't the answer from your previous similar (identical??) question solve your issue? In particular I'm referring to the answer from Andreas Schneider using window functions.
go to post Enrico Parisi · Jan 10 Can you provide more details on how the target class used in the DTL is defined?
go to post Enrico Parisi · Jan 10 Wow @Jeffrey Drumm ! It's amazing to see how we had the same idea/solution! 😂 Probably because it's a good idea/solution! 😊 Regarding the debug vs. assign action, maybe assign is easier and simpler to adopt because does not need to change RuleLogging setting that can "conflict" (mess) if more debug actions are used that are not required in production.Using debug has the advantage to be able to disable the logging from portal/settings, if/when required.It depends on the environment and requirements, soooo.....good we have to options! 😉 Having said that, it would be great if IRIS will add specific Action(s) to log info/warning/error in the event log.
go to post Enrico Parisi · Jan 10 To my knowledge there is no Action to log an entry in the Interoperability Event Log, but it can be achieved using a custom function. What you can do is implementing a function as documented in Defining Custom Utility Functions. Something like: Class MyPackage.CustomFunctions Extends Ens.Rule.FunctionSet { /// Log an INFO type message in the Iteroperability Event Log ClassMethod LogInfo(Message as %String) As %String { $$$LOGINFO(Message) Quit Message } } Then in your Rule add a Debug action that call/use the function: Then, in the Business Process where the Rule is used, add the "d" flag to the RuleLogging settings: Thisway you will have your message logged in the event log AND in the rule log.
go to post Enrico Parisi · Jan 8 As I suspected, in the DownloadFiles method the variable "fileName" is not (yet) defined when you use it.In addition, in your catch method you have a Write command that "Write" invalid javascript code. I'd suggest to change the catch code with: } Catch ex { Set sc = ex.AsStatus() &js<..QuoteJS("Exception: "_ex.DisplayString());>} This way if an objectscript error you get an alert with the error details. Then, change all reference to the "fileName" variable and use "fileList" instead before the line: For i=1:1:$LISTLENGTH(fileArray) This prevents <UNDEFINED> errors when referencing "fileName" variable.
go to post Enrico Parisi · Jan 8 IMO a better option would be to create a subclass of %Net.SMTP and copy and modify the GetResponse() method code uncommenting that line. Then use this class instead of %Net.SMTP. This way you don't need "to mess" system classes, change system database configuration (RW in IRISLIB) and then you have full control of the code. Something like: Class My.Net.SMTP Extends %Net.SMTP { /// Get response to mail command. Use timeout as specified by RFC1123. Method GetResponse(timeout As %Integer, ByRef responseArray As %String) As %String [ Internal, Private ] { #define SMTPTRACE #ifdef SMTPTRACE #define TraceInit try { kill ^SmtpTrace } catch { set killsave=$zu(68,28,0) kill ^SmtpTrace do $zu(68,28,killsave) } #define TraceNext(%line) set ^SmtpTrace($increment(^SmtpTrace))=%line_"<<"_$zb #else #define TraceInit #define TraceNext(%line) #endif #define WriteText(%text) $$$TraceNext(">>"_%text) write %text #define WriteLine(%text) $$$WriteText(%text),! kill responseArray set line="" do { read line:timeout else do ..SetStatus($$$ERROR($$$SMTPTimeout)) set line="" set responseArray($increment(responseArray))=line $$$TraceNext(line) } while $extract(line,4)="-" quit line } }
go to post Enrico Parisi · Jan 8 Hi Dan, it seems you have a javascript syntax error, in the code you posted previusly, are you sure the variable fileName is defined? Can you share the relevant code in the DownloadFiles() method?
go to post Enrico Parisi · Jan 7 Very difficult to tell with the little info provided! It seems the error somewhere in in the network I/O between IRIS and xDBC client. Where do you get this error from?Can the error be reproduced? If yes, how?
go to post Enrico Parisi · Jan 6 As @Chandrasekar Angaiah pointed out you need to create a new class that extends EnsLib.SQL.InboundAdapter and then you use the new class instead of EnsLib.SQL.InboundAdapter. Within that new class override OnInit(), something like: Class My.SQL.InboundAdapter Extends EnsLib.SQL.InboundAdapter { Method OnInit() As %Status { Set sc=##super() If $$$ISOK(sc) Set ..%Row.MaxRowsToGet=-1 Quit sc } }
go to post Enrico Parisi · Jan 5 Ciao Fabrizio, access to the HealthShare Management portal section (also known as HS Navigation app) can be granted using the %HSAdmin_NavAppConfigurationManagement resource or the %HS_NavigationApp role. Once your user has that role or resource it can access the HS Navigation app page. Within that page there are many"functionality" and they have their own permissions/resources associated that the user must have to perform the functionality. So, with only access to HS Navigation app (and no other role/resource) you see an empty page. It's not clear what functionality you need/want to enable and if you need read/write permissions. Long story short, I suggest to create a new role, during creation copy from %HS_Administrator role and then remove resources you don't need (there maybe many you don't need/want) and the modify R/W permissions for the resource.
go to post Enrico Parisi · Jan 5 Ciao Fabrizio, in your machine edit the hosts file and add the FQDN of your HS server so it can be resolved and then use the FQDN in the browser instead of the IP address.
go to post Enrico Parisi · Jan 3 Remember, what you write in/from that method is javascript. I think the simplest solution for debugging is using javascript alert(), another option can be injecting your debug info into page html/dom using javascript (this depend on page structure).For simple alert() you can: Set sc = sftp.Get(remoteFile, localFile, "0666") If $$$ISERR(sc) { &js< alert(#(..QuoteJS("Error downloading file: "_fileName_" -> "_$system.Status.GetErrorText(sc)))#);> } else { &js< alert(#(..QuoteJS("File Successfully Downloaded"_fileName))#);> }
go to post Enrico Parisi · Jan 3 Does the DownloadFiles() method has any Write command, possibly with the string "downloading"? ( as in SyntaxError: Unexpected identifier 'downloading') My guess is that you have such a Write command that is interpreted/executed as Javascript.....hence the error.
go to post Enrico Parisi · Jan 3 Hi @Andreas Schneider, you can create a SQLGateway connection using ObjectScript code, if you create it using SQL then, as you discovered, you have an issue with the password because using ObjectScript the password is "processed" before saving it. If you want/need a pure SQL solution without (directly) coding/using ObjectScript you can define and use a Stored Procedure (that use ObjectScript 😉) to change the password, something like: CREATE PROCEDURE Community_SqlGw.SetPassword(ConnectionName VARCHAR(50), NewPassword VARCHAR(50)) RETURNS BIT LANGUAGE OBJECTSCRIPT { New gw,sc Set gw=##class(%SQLConnection).NameIndexOpen(ConnectionName) If gw="" Quit 0 Set gw.pwd=NewPassword Set sc=gw.%Save() Quit (sc=1) } Then, after creating the GW Connection, change the password: select Community_SqlGw.SetPassword('MyGwConnectionName','MyGwPassword')
go to post Enrico Parisi · Dec 30, 2024 In your sample code AltOrEmpty property contains a not null value of Mandatory property or $c(0), so: set testInstance = ##class(TestIndex).AlternateMandatoryOpen(2,$c(0),.st)