Pre-requisite - Basic knowledge of ENSEMBLE and ObjectScript

My both previous sessions were related to OBJECTSCRIPT.
This time, we are going to add a flavour Ensemble/Healthshare,
to be informative and fast.

In this session we are going to discuss about -
"Informative and Fast WEB API VIA ObjectScript and Ensemble/HealthShare"

Web API can be REST or SOAP. We will taking example of SOAP in this session.
However, whatever I demonstrate today, will also be applicable for REST.

0 0
0 322
Article
· Aug 1, 2019 3m read
Nested set model for ObjectScript

In many projects I was faced with storing hierarchical data (tree) in classes.
By tree, I mean such data, where each node has a parent node — an object of the same class.
Many examples of such data can be given. For example, a catalog in the online store. Suppose that this online store sells books, in this case, the category tree might look like this:

6 1
1 870

Hello,

Is it possible to write global output values to STDOUT, in a similar way to how csession can take routine intput, like below:

(In Cache Terminal)

%SYS>d ##class(%SYSTEM.License).ShowSummary()

License Server summary view of active key.

Distributed license use:

Current License Units Used = 1

Maximum License Units Used = 1

License Units Authorized = 200

Local license use:

Current Connections = 1 Maximum Connections = 1

0 5
0 536

Hello Community,

How do i disable an operation explicitly based on a value in a variable?

I set the ReplyCodeAction to E=D.

In the Operation Code i am throwing an explicit ERROR

THROW ##class(%Exception.General).%New("Shutting Down Operation",999,,"My own special exception")

But my operation still remains up.

Any suggestions please will be appreciated.

0 6
0 278
Article
· Jul 25, 2019 1m read
Disabling an Ensemble Production

I'm not saying that this is in anyway "best practices," but I'm in a peculiar situation where I need to restrict users from starting a "retired" Ensemble Production in a namespace that's been renamed. It's still an "Ensemble-activated" namespace; we need to keep it available for Ensemble Message Viewer access ... fortunately, only for a little while.

It's a bit of a hack ...

Open the Production class in Studio and add the following classmethod:

2 6
1 387
Article
· Jul 26, 2019 3m read
Dynamic SQL to Dynamic Object

Hello community! I have to work with queries using all kinds of methods like embedded sql and class queries. But my favorite is dynamic sql, simply because of how easy it is to manipulate them at runtime. The downside to writing a lot of these is the maintenance of the code and interacting with the output in a meaningful way.

7 7
1 901

Hi Everyone!

Please watch the new video on InterSystems Developers YouTube, recorded by @Sourabh Sethi in a new format called "Coding Talks":

A SOLID Design in InterSystems ObjectScript

https://www.youtube.com/embed/QjrUeCui51Q
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

2 0
1 456

Hi Everyone!

You're very welcome to watch the new video on InterSystems Developers YouTube, recorded by @Evgeny Shvarov in the new format called "Coding Talks":

GitHub Flow with InterSystems IRIS: Edit with VSCode, Test with Docker, Commit, Push, Pull Request

https://www.youtube.com/embed/1x0hC_MlRfg
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

2 0
0 456

Hi Everyone!

You're very welcome to watch the new video on InterSystems Developers YouTube, recorded by @Sourabh Sethi in a new format called "Coding Talks":

Locking in InterSystems ObjectScript

https://www.youtube.com/embed/_v2ga5B0ZJk
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]

2 3
1 418

Hi, I am trying to transform a message to meet a third party specification, and would like to know if you can advice me on how to separate a single OBX segment into several segments based on a '.'

I would like to separate the segment where the . [marked in red] is into another OBX segment. So the next segment would be:

0 8
0 918

All,

I'm using Cache 2014.1 in an openVMS environment.

If I have multiple RMS files to clean up, for example.

!DIR MEMBER_EXTRACT.*;*

MEMBER_EXTRACT.CSV;2 MEMBER_EXTRACT.CSV;1
MEMBER_EXTRACT.PROC;1 MEMBER_EXTRACT.TXT;3
MEMBER_EXTRACT.TXT;2 MEMBER_EXTRACT.TXT;1

S FILE="MEMBER_EXTRACT.*;*"

Do ##class(%Library.File).ComplexDelete(FILE)

0 4
0 420

Hey Intersystems-Developer,

I have already used that and know its possible, but can't find it anymore :(

I need dynamic access on proxy objects. For example:

set key = "lastName"

set name = obj.name

set lastName = obj.key <- Not possible

set lastName = obj.GetAt(key) <- Not possible

How can I get access to that object with my dynamic variable "key" ?

Best regards.

0 3
0 271

Hi guys!

As you know there are two (at least) ways to get the stored value of the property of InterSystems IRIS class if you know the ID of an instance (or a record).

1. Get it by as a property of an instance with "Object access":

ClassMethod GetPropertyForID(stId As %Integer) As %String

{

set obj=..%OpenId(stId)

return obj.StringData

}

2. Get it as a value of a column of the record with "SQL access":

0 18
0 909
Article
· Jul 1, 2019 2m read
Transaction suspencion

It’s often useful to make changes inside the current transaction, that would not be rolled-back if transaction is rolled-back. For example to do some logging.

This can be achieved by using global that is mapped to temporary database -- IRISTEMP. All globals that start with ^IRIS.Temp* are mapped to IRISTEMP by default. Problem with such approach is that IRISTEMP is cleaned on InterSystems IRIS restart, so this log is lost.

What else you can do is -- suspend transaction temporarily, do the logging, and then resume the same transaction.

2 8
1 456
Question
· Jun 25, 2019
Cache Ensemble

Hello,

Working on to learn very basic CUSTOM Business Service which sends to a EnsLib.File.PassthroughOperation.

But operation is not writing to File and erroring out (No Stream contained in StreamContainer Request")'.

How do convert the object to STREAM and wrap in the StreamContainer so the operation does not error and write to a file.

Thanks.

Persistent Class

0 8
0 526

Hello,

Can anyone please provide me with a guide I can follow to create an entry in Cache's SSL/TLS configuration that would allow me to "speak" to an website via the Post method using SSL.

I need to simulate functionality that is provided by my browser but from with Cache.

The topics I have are:

1. From where do I source the certificate that will be used for this process?

2. What processing must I do on it to make it acceptable for Cache's SSL/TLS

3. What settings are required when filling the the form

2 3
1 2.2K
Question
· Jun 13, 2019
When is a number not a number?

Noticed some unexpected behavior when using $ZTH

Resultant values less than 1 are treated as strings and values >=1 are numbers. Causing heartburn in $Query / $Next / $Order loops. Is there a setting somewhere that can change this?

Example:

// Parse the time out of a text string whose format is YYYYMMDDHHMMSSsssssssss (lower case s = fractional parts)

Set MsgDT = "20180405000000001005933"
Set MsgDTH = $ZTH(($E(MsgDT,9,10)_":"_$E(MsgDT,11,12)_":"_$E(MsgDT,13,14)_"."_$E(MsgDT,15,23)),1)

//Do it again, but add a sec to the time string

0 7
1 428

I am trying to pull the word count from Microsoft Word document into Cache. Is there anyway to get the values of the extended file properties without opening the word document? If I right click on a word document (Word does not need to be installed) I can see the additional properties that I want to reference however don't know how to access these without calling out to VBA or poweshell.

0 3
0 339
Article
· Jun 10, 2019 2m read
GitHub now supports ObjectScript

Hey developers,

I have great news for you. A few days ago, GitHub was updated with the latest version of linguist project, which is being used to recognize source code types in repositories. It helps to determine which programming language had been used in every file of the repository. Repository statistics section shows the results of this module work.

Also, you can search across all available GitHub repositories for any chosen language.

6 3
1 706
Question
· Jun 6, 2019
DICOM document path querying

Say you have a DICOM document with an input information sequence with many sequence items. You could access every item one by one by looping and querying the path by passing it to the GetValueAt method as demonsrated below.

This works but there are some performance issues on my system if the document has to be read for each query (as far as I know, that is the case on my system). Is there a way of querying a path, which would return the sequence items as an array? I think I am missing something. With 900 items the process takes around 20 seconds currently.

0 1
0 234