Hi!
Is there a method in a persistent class that can return the current number of records/persistent objects in it?
InterSystems ObjectScript is a scripting language to operate with data using any data model of InterSystems Data Platform (Objects, Relational, Key-Value, Document, Globals) and to develop business logic for serverside applications on InterSystems Data Platform.
Hi!
Is there a method in a persistent class that can return the current number of records/persistent objects in it?
Hello all, I have a question about constucting thousands of clones, and scope.
In my code, I'm looping through a database, say 200k+ objects, and creating a clone of each object (we need to evaluate a modified clone of the object, but not account for what's on disk).
I see this a lot in the documentation:
" Whenever you set a variable or object property to refer to a object, its reference count is automatically incremented. When a variable stops referring to an object (if it goes out of scope, is killed, or is set to a new value), the reference count for that object is decremented.
Hi Community,
We're pleased to invite you to join the upcoming InterSystems IRIS 2020.1 Tech Talk: Integrated Development Environments on May 19 at 10:00 AM EDT!
In this edition of InterSystems IRIS2020.1 Tech Talks, we put the spotlight on Integrated Development Environments (IDEs). We'll talk about InterSystems latest initiative with the open source ObjectScript extension to Visual Studio Code, discussing what workflows are particularly suited to this IDE, how development, support, and enhancement requests will work in an open source ecosystem, and more.
Hello guys,
I have used the Studio SOAP wizard to generate some webservice client classes and amongst those classes:
Class RMH.SOAP.s0.Output Extends (%Persistent, %XML.Adaptor) [ ProcedureBlock, SqlTableName = _Output ] {
...
Property Value As %GlobalCharacterStream(XMLNAME = "Value");And the caller looks like
Class RMH.SOAP.SoapTreeSoap Extends %SOAP.WebClient [ ProcedureBlock ] {
...
Method Run...(Tree As %String, Inputs As %String, Debug As %Integer) As RMH.Hi Developers!
As discussed in previous parts of Package Manager stories to turn your IRIS application into a deployable package you just need to introduce the module.xml file into the root folder of the repository and describe all the resources.
I’m pleased to introduce you to a new project template on Open Exchange which contains examples of how to make different types of resources of your InterSystems IRIS application a part of the ObjectScript package and so make the deployable ObjectSctipt package.
Let's see how you can describe your application resources using this template project as an example.
See the details below.
Using the IRIS native API for Node.JS was the opportunity to present
a MicroService operating in a Docker container.
A demo video is now also available to watch the demo in operation.
Instead of a utility you call directly on your IRIS host you now send a work-packages
to the MicroService as would typically do with System Interoperability (aka.ENSEMBLE):
of course, you have the option of more than one WebSocket Server.
Once the WebSocket Client Service has done its job you get back the result from it.
I have a class that writes to an external SQL Server database. When the field is empty, it does not write the column and the column has the value NULL. In some cases, I want the column to be the value of the empty string instead of NULL.
{
Property MessageType As %String
}
The message that is passed to this class shows:
<MessageType></MessageType>
Which writes the field as NULL with:
tSQL = "insert into myTable (MessageType) values (?)"
set tSC = ..Adapter.ExecuteUpdate(.tNumberOfRowsUpdated,tSQL,myRequestClass
If two globals have same structure, how to reuse one CacheSQLStorage-based class to read both locations?
Thanks!
Update:
Let's say we have two globals:
^a(1)="dataa1"
^a(2)="dataa2"
and
^b(1)="datab1"
^b(2)="datab2"
i.e. the structure difference is global name only.
I would like to have two classes TableA and TableB both are inherited from TableAB, and TableAB taking global name as a parameter.
Hello,
We would like to know if Ensemble could generate a CADES sign from a string and a certificate.
We have read:
https://cedocs.intersystems.com/latest/csp/docbook/Doc.View.cls?KEY=GXM…
So we have seen that we could create a class, to sign a document, and store the sign inside that new class. We have also seen that there are some different algorithms to choose from, like sha1.
In addition we have also consulted the CADES sign definition:
https://tools.ietf.org/html/rfc5126
The use case is to avoid being dependant of an external web service, and be able to generate it.
Hi,
I want to insert custom hook into message send and receive flow. for example:
1. parse request or response message, pick up bussiness field to do bussiness logic
Is it have method to do this?
Tks.
Hi,
I have a bit of code that does a find and replace on a "template" and inserts additional content. For example it replaces the @DATA@ with an html table:
<html>
<body>
<div id="data">@DATA@</div>
</body>
</html>
Currently doing this with the $replace function:
Set text=$replace(text, "@DATA@", data)
The problem is the "data" is now too big for a %String (yes even with large strings) so will switch to use a stream instead.
Is there an equivalent to $replace that works on a stream? If not, how would I best implement this sort of find/replace functionality in cache object script?
We are getting CoClass not available [80040111] when using %Net.SSH.Session. Does anyone know if there is a security setting that would disable this object?
Any help would be greatly appreciated.
Dear All,
I'm looping through a list with characters (Parenthesis, square brackets etc) and I wish to remove these from the list.
The for loop and IF logic are effectively removing these items from a list.
However the variable I use for the maximum number of loops carries on beyond the number of items of the list after removal.
In the output value for these I get the integer of the for loop instead of a null for the empty list fields.
I can see in the documentation that the end variable is not editable once the loop is started.
Hi
Sometimes I search mesage with inappropriate sql, It caused query hanged long time.
So Is it have way to find these hanged query and kill it?
Tks.
If you define a Persistent Class / Table the class compiler generates for you an appropriate Storage definition.
A different option is to define a SQL mapping for an already existing Global storage. This has been excellently
explained already in a different series of articles. The Art of Mapping Globals to Classes 1 of 3
Hi!
I believe the simplest is (to work with csv delimited by ";"):
set file = ##class(%File).%New( "data.csv" )
set sc = file.Open( "R" )
if $$$ISERR(sc) quit ; or do smth
while 'file.AtEnd {
set str=file.ReadLine()
for i=1:1:$length( str, ";" ) {
set id=$piece( str, ";" ,i )
write !, id // or do smth
}
}
do file.Close()
Possible options:
different variants of error handling with sc code.
Embrace while loop into try/catch block.
And what's yours?
Hi Developers,
Please welcome another "Coding Talk" video specially recorded for the second IRIS Programming Contest:
⏯ How to Build, Test and Publish ZPM Package with REST Application for InterSystems IRIS
I’m excited to announce that InterSystems will be joining the open source community for InterSystems ObjectScript extension to Visual Studio Code. Early this year I posted that we were on a journey to redefine the future of our IDE strategy, and what came out of that is Visual Studio Code is the IDE that can support that future.
Due to bussiness requirements.I want to add some bussiness field on intersystem message view ui .
eg:
1. add new action page to display bussiness detail
2. add new function to do more Fine-grained things.
3. add new database field in message table.
finally, I hope get more detail of messae view due to customize it.
Tks.
Surely there is an easy way to invoke a ClassMethod from a DeepSee detail listing line, in a similar way to launching a URL. In this case I need to do a little preprocessing of a request adding a SAML token.
I thought I knew how to do it long ago, but I can't read my faded notes on that old parchment.
-Kevin
Hope most of you already familiar with project CachéQuality from @Daniel.Tamajon. For those who don’t know about it, it is a static syntax analyzer for your code written for InterSystems products. It may help you to find and solve many different types of issues in your code, and even possible bugs before clients will find it in production. So, with help of CachéQuality you will be able to deliver a better product. You can find the complete list of rules used to check ObjectScript code here.
It was already available in Studio. And now it is also available in VSCode.
Some weeks ago, I was reading a book by Stephen Hawking and Leonard Mlodinow, The Grand Design. At a certain point, trying to define why do we exist? , why do we use the models we use in physics?, ...those kind of things you know... they pointed at the Game of Life example invented by the mathematician John Coward in 1970... Basically he wanted to show that a system with really basic fundamental laws (Physics) could evolve and "live" to become a more complex system (Chemistry) in which "something" (humans) could work out its own model and complex rules to explain its reality… the rules for this deterministic model that he exposed were so basic that I thought it could be funny to implement them in ObjectScript when I had some spare time... there are others implementations in JavaScript and other languages... but not in ObjectScript... and that had to be corrected!!… so here you are!
Hi Community!
We are glad to invite every developer who uses ObjectSript and VSCode plugin to the upcoming "Introduction to VSCode-ObjectScript" webinar on April 14, 2020 at 11:00 EDT.
Speaker: @Dmitry Maslennikov, InterSystems Developers Advocate, CTO at CaretDev.
You will learn how convenient the development process can be already right now and what we are going to do next to make it even better.
Please check the agenda below.
Hello all,
I'm new to the Intersystems development world and I've been trying to figure out how to make a REST API using ObjectScript. I found a tutorial that I've been following that has been great and I'm trying to translate what I've learned to live data.
My question is "Is there a way I can set a variable inside of a class so when I call a routine that variable will be recognized?" I'm capable of setting the variable in a terminal session and then calling the routine and everything will be work great! I will get the data I want returned.
Hi everyone,
Are there any tools to check the code coverage and to do a lint check for cache object script? Developers will be working with HealthConnect (IRIS based)
Thanks.
Hello!
This may seem a bit strange, but I'd like to make a business operation which would put a file via SFTP and then confirm that the filesize on the remote server is consistent with expectations. I am thinking either of a custom copy or extension of the adapter (right now it is using EnsLib.FTP.OutboundAdapter) that overwrites method PutStream, or a version of the FTP.PassThroughOperation with a customized method OnMessage that does the check after the PutStream completes OK-- but I am uncertain of how exactly to modify either method to make the check.
Hello community,
I recently started to work with Ensemble. I defined a subclass of EnsLib.HL7.Message. In my production I receive HL7v2 messages and transport them using the Message Router to a business operation. The operation class has an OnMessage method with parameter
pObject As MySubclassOfEnsLibHL7Message.
I expected that specifying the parameter type, on receiving the message an implicit type cast would be performed. However, $CLASSNAME reveals that my messages are still of type EnsLib.HL7.Message. How can I convert my messages in ObjectScript (without DTLs or something the like)?
IRIS 2010.1 brought us a new feature: %Net.WebSocket.Client
As a continuation of my series of WS Clients I just couldn't resist to try it.
Well, this is the result and it was rather simple in the end.
You basically need to prepare 3 classes:
The example uses the WSS.EchoServer (a derivate from former SAMPLES in Caché).
The default assumption is to have Client and Server on the same system & namespace.
Hi Developers!
InterSystems Online Programming Contest is over. Thank you all for participating in our IRIS Competition!
As a result - 20 great apps! And now it's time to announce the winners!
I know that collection is instance of %AbstractList.
But what about $listbuild? Does it possible to detect that given variable is instance of $lb?