go to post Eduard Lebedyuk · Aug 16, 2018 Are you using JTDS driver?If so, check out the FAQ.First of all, you seem to pass user=domain\username (in your case user=osumc\CPD.Intr.Service), but FAQ offers domain parameter. Other parameter that seems promising is useNTLMv2.Try to pass: user=osumc;domain=CPD.Intr.Service;useNTLMv2=true
go to post Eduard Lebedyuk · Aug 14, 2018 Minor note, you don't need this line, remove it (it may be causing your error):set sc = ##class(%ZEN.Auxiliary.jsonProvider).%ObjectToJSON(Object)"Corrupt body: json: cannot unmarshal number into Go struct field CheckContractRequest.iin of type string". Where you get this error? This looks like an error you get from the server you send your request to.Can you get output from Set sc = httpRequest.Post("", 1) Set sc = httpRequest.Post("", 2) And post it here.
go to post Eduard Lebedyuk · Aug 14, 2018 I believe it's enough to have [Final] keyword set in deployed mode to give a developer a hint that this class should not be extended.Well, it's mainly for developers who can't take a hint.If you want to enforce this behaviour, I would add a check into each method as a first line , something likeif $this.%ClassName(1)'="My.Class" quit $$$ERROR(50000,"don't extend this class")Good idea.You can also try to add a method-generator, I believe when you have a deployed class with method generator it will not be able to compile a subclass without method generator's source (though I'm not sure).At first it didn't work - method generator by default works while deployed. Then I added a class check to generator. Compilation was now failing, but other methods were actually compiled so I was able to call them. Finally I worked out this solution: Class Package.Final [ Final ] { ClassMethod ANoExtend() [ CodeMode = objectgenerator, Final, ForceGenerate, Private ] { quit:%class.Name="Package.Final" $$$OK quit $$$ERROR($$$GeneralError, "No extending") } ClassMethod ProtectedMethod() As %Status [ Private, ForceGenerate, GenerateAfter = ANoExtend ] { // code quit $$$OK } } This way each protected method should be recompiled but only after method-generator which always fails in subclasses. This way no code gets generated.
go to post Eduard Lebedyuk · Aug 13, 2018 Username would be _Ensemble because Ensemble switches users.Tried OnInit, available context is not enough there: Method OnInit() As %Status { break } And here's the break: break ^ <BREAK>zOnInit+1^Demo.Workflow.WFMetric.1 ENSDEMO 7e1>zw %Ensemble("ArchiveFlags")="" %Ensemble("ArchiveFlags","Demo.Workflow.WFMetric")="" %Ensemble("ArchiveFlags","Demo.Workflow.WFMetric","iCfg")=0 %Ensemble("Config","%ModIndexFlag")=1 %Ensemble("ConfigName")="Demo.Workflow.WFMetric" %Ensemble("Debug","TraceCat","My Terminal Output")=0 %Ensemble("Debug","TraceCat","My Terminal Output","user")=1 %Ensemble("Debug","TraceCat","user")=1 %Ensemble("DoTrace")=2 %Ensemble("JobKey")=10548 %Ensemble("LogSystemTrace")=0 <Private variables> Thought about $zparent but it didn't help too: ENSDEMO 7e1>w $system.Process.UserName($zparent) CSP Gateway
go to post Eduard Lebedyuk · Aug 8, 2018 Try $IsObject function: <if name='CheckObj' condition='$IsObject(response.Content)'>
go to post Eduard Lebedyuk · Aug 7, 2018 If you're sure that your id bigger ids are generated later, you can only get the first id from index and after that iterate the data global directly: set FromDateH = (+$h-1) set id = ^TestI("StartDateIDX",FromDateH,id) for { set id=$order(^TestD(id),1,dat) quit:id="" //dat=$lb("a","b","c","d","e") } Also you can use three-argument form of $order to iterate and get data in one command. Finally, consider checking work-heavy system with %SYS.MONLBL to verify what lines consume more time.
go to post Eduard Lebedyuk · Aug 7, 2018 Open Atelier project Properties and check encoding there. Set to UTF8 if it's not.
go to post Eduard Lebedyuk · Aug 4, 2018 There are many ways to launch InterSystems IRIS.If you want to launch it on AWS you can do it one of the following ways.Provision a EC2 instance with SUSE/RHEL/Ubuntu AMI and install InterSystems IRIS on Linux. Here's the guide. Quickstart.Provision a EC2 instance with SUSE/RHEL/Ubuntu AMI, install Docker and run InterSystems IRIS in a container. Documentation. First Look.Use InterSystems Cloud Manager to provision AMI and run InterSystems IRIS. Documentation. First Look.What to choose?If you need to run a lot of or a variable number of servers choose 3.If you're unfamiliar with Docker choose 1.If you're familiar with Docker (or want to become familiar with it) choose 2.
go to post Eduard Lebedyuk · Aug 2, 2018 Application code opens transaction somewhere but does not commit or rollback it.Check <code> elements, maybe there's a TSTART there somewhere.
go to post Eduard Lebedyuk · Jul 24, 2018 It would be easier to start and finish the transaction in one method (or rather one request to a BO).Why not send the request to BO containing a list of UPDATES to perform and BO would automatically wrap them in a transaction, returning either a success or error and the position of failed UPDATE statement? Even better send list of some struct and construct statements in BO.While workarounds are possible (1 Job for BO + indefinite timeout + FIFO on caller part) it would probably be a bad idea.
go to post Eduard Lebedyuk · Jul 23, 2018 Do you want to accept requests via HTTPS?If so, you need to:Install external web server. If you're on Linux I recommend Apache.Obtain a domain name. Let's encrypt offers free certificates.Enable HTTPS for your web server.
go to post Eduard Lebedyuk · Jul 5, 2018 You can determine, where does the message comes from by inspecting it's header, get header Id from: $$$JobCurrentHeaderId and query Ens.MessageHeader class. Alternatively, check "process" variable in BPL or current context in ObjectScript processes. Maybe the whole object would be available somewhere.
go to post Eduard Lebedyuk · Jul 4, 2018 Check out this list of tools for C#/InterSystems interoperability.I think you need Caché Managed Provider for .NET.In <installdir>\dev\dotnet there are several examples available.
go to post Eduard Lebedyuk · Jul 3, 2018 Here's an example of accessing properties and array elements: set jsonObj = [].%FromJSON(filename) set i = jsonObj.resultSets.%GetIterator() while i.%GetNext(.key , .resultSet ) { set i2 = resultSet.rowSet.%GetIterator() write resultSet.name,! while i2.%GetNext(.key , .rowSet ) { write rowSet.%Get(0),! } }
go to post Eduard Lebedyuk · Jul 3, 2018 This error indicates that either login and password are incorrect or that user has insufficient permissions to access management portal.
go to post Eduard Lebedyuk · Jul 2, 2018 Generally you'll need to check the service and adapter method lists. Callbachs are often called "On*".Similar discussion for SQL adapter.
go to post Eduard Lebedyuk · Jul 2, 2018 1. Connect to other system via xDBC2. Query %Dictionary package on a local and remote system and compare results.
go to post Eduard Lebedyuk · Jun 21, 2018 You can call code from %Installer via Invoke tag (more on that).To change journaling programmatically execute: /// Change database journaling state. /// dbDir - database Directory (can be passed relative to the current working dir) /// journal - 1 or 0. 1 enables journaling, 0 disables it. /// zw ##class(util.Test).JournalDB("USER", 1) ClassMethod JournalDB(dbDir As %String, journal As %Boolean = {$$$YES}) As %Status { quit:((journal<0) || (journal>3)) $$$ERROR($$$GeneralError, "Invalid journal value. 0 or 2 for No, 1 or 3 for Yes") set:journal=$$$YES journal=3 set:journal=$$$NO journal=2 new $namespace set $namespace = "%SYS" set db=##Class(SYS.Database).%OpenId(dbDir) set db.GlobalJournalState = journal quit db.%Save() } That said, any particular reason you want unjournaled databases?
go to post Eduard Lebedyuk · Jun 20, 2018 Do you catch exceptions? If not try this: Try { Kill %objlasterror Set conn = ##class(%Net.Remote.Gateway).%New() // No error here Set tSC = conn.%Connect("127.0.0.1", "55000", "NETTEST") // No error here Write:$$$ISERR(tSC) $System.Status.GetErrorText(tSC),! ZWrite %objlasterror Set api = ##class(writetofile.WriteFile).%New(conn) //Here comes the error ZWrite %objlasterror Set strFile = "d:\temp\example.txt" Set strInput = "Hello world" Set ret = api.FilePut(strFile,strInput) Set tSC = conn.%Disconnect() Write:$$$ISERR(tSC) $System.Status.GetErrorText(tSC) } Catch ex { ZWrite %objlasterror Do ex.Log() Write ex.DisplayString(),! } %objlasterror can contain more error information. Also check application error log. Are you on 32 or 64 bits? Check Cache with: Write $system.Version.Is64Bits() .Net library should be compiled with the same architecture.
go to post Eduard Lebedyuk · Jun 20, 2018 Some ideas:session ID - you're getting it with pAlertRequest.SessionId, no?date - get it from pAlertRequest.AlertTimenamespace -wouldn't it always be the current namespace? Get it with $namespaceWhat other data do you need?Also, please post your code as text.