I need to ran a task on a specified days (once a month but a different day each month).
How can I do that in Task Manager?
I need to ran a task on a specified days (once a month but a different day each month).
How can I do that in Task Manager?
For simplicity sake let's say that we talk about active production.
I need to know if the business host is added to the production or not.
Currently I have:
do ##class(Ens.Director).IsItemEnabled("HostName", .sc)
set defined = $$$ISOK(sc)Which looks like a workaround.
One of the most useful features in Studio is code snippets.
Here's how to add snippets to VSCode.
Here's a generalized instructions.
1. Go to File - Preferences - User Snippets and choose objectscript.
2. Add your snippet, here's an example:
"SQL Statement": {
"prefix": ["sql"],
"body": ["#dim rs As %SQL.ISelectResult",
"set rs = ##class(%SQL.Statement).%ExecDirect(,\"SELECT * FROM\")",
"while rs.%Next() {",
"\twrite rs.ID, !This quick guide shows how to serve HTTPS requests with InterSystems API Management. Advantage here is that you have your certs on one separated server and you don't need to configure each backend web-server separately.
Here's how:
1. Buy the domain name.
2. Adjust DNS records from your domain to the IAM IP address.
3. Generate HTTPS certificate and private key. I use Let's Encrypt - it's free.
4. Start IAM if you didn't already.
5. Send this request to IAM:
POST http://host:8001/certificates/
{
"cert": "-----BEGIN CERTIFICATE-----.In this article, I would like to talk about the spec-first approach to REST API development.
While traditional code-first REST API development goes like this:
Spec-first follows the same steps but reverse. We start with a spec, also doubling as documentation, generate a boilerplate REST app from that and finally write some business logic.
This is advantageous because:
Let's develop our API in a spec-first approach!
I have several Business Services which I need to run once on each trigger.
Trigger can be either:
For the time, it would be stable (i.e. 0100), but the second case varies - one month it could be 10th, another month - 12th.
After each run I want the service to turn off, so that all the time the service is not running it would be colored grey in Production Management Page.
I plan to use Task Scheduler, but open to suggestions.
Thoughts? Ideas? Code?
First webinar on InterSystems API Management!
We are pleased to invite you to the upcoming webinar in Russian: Introduction to InterSystems API Management on November 21 at 10:00 Moscow time (GMT+3)!
As you might have heard, we recently introduced the InterSystems API Manager (IAM) - a new feature of the InterSystems IRIS Data Platform,
enabling you to monitor, control and govern traffic to and from web-based APIs within your IT infrastructure.
In this webinar I will highlight some of the many capabilities IAM allows you to leverage. InterSystems API Manager brings everything you need:
There would be a live demo.
This webinar is for System Architects, Developers and DevOps Engineers.
Time: November 21 at 10:00 Moscow time (GMT+3)!
The language of the webinar is Russian.
InterSystems API Management (IAM) - a new feature of the InterSystems IRIS Data Platform, enables you to monitor, control and govern traffic to and from web-based APIs within your IT infrastructure. In case you missed it, here is the link to the announcement. And here's an article explaining how to start working with IAM.
In this article, we would use InterSystems API Management to Load Balance an API.
In our case, we have 2 InterSystems IRIS instances with /api/atelier REST API that we want to publish for our clients.
There are many different reasons why we might want to do that, such as:
The question is pretty much in title. I'm developing a REST API, it has a search endpoint with 10 optional parameters. How do I pass them and stay RESTFul?
To ease the question a bit let's agree that:
Some options I know of:
1. URL parameters.
GET /search?param1=value1¶m2=value2...Quick and easy but I'm not sure it's really RESTFul
This series of articles would cover Python Gateway for InterSystems Data Platforms. Execute Python code and more from InterSystems IRIS. This project brings you the power of Python right into your InterSystems IRIS environment:
The plan for the series so far (subject to change).
We're back with more AI, more ML and more presenters!
We are pleased to invite you to the upcoming webinar in English: AI Robotization (Python, R, Interoperability) for InterSystems IRIS on November 7 at 11:00 EST!
I need to know the current rss memory consumption. On earlier Cache versions I used this method:
set sc = ##class(%Net.Remote.Utility).RunCommandViaZF("smem -u cacheusr | grep cacheusr | awk '{print $6}'",,.rss)It doesn't work because we use $zf(-100) on IRIS 2019.1.
New version:
ClassMethod Test()
{
set cmd = "smem"
set args = 8
set args(1)="-u"
set args(2)="irisusr"
set args(3)="|"
set args(4)="grep"
set args(5)="irisusr"
set args(6)="|"
set args(7)="awk"
set args(8)="'{print $6}'"
set sc = ##class(%Net.Remote.Utility).RunCommandViaZF(cmd,,.rss,,,.code,.What's the best way to replace character groups?
I want not to remove character groups as $zstrip does but to replace them with whitespaces.
$translate needs explicit character list.
Effectively I want to remove any characters besides letters, numbers and a small (known) subset of punctuation characters, replacing everything else with whitespaces.
I'm happy to announce the latest Python Gateway release.
This is not an InterSystems product, it is community supported open source project.
Download new release from GitHub.
Now for the new features.
Fast transfer. Pass globals, classes and tables from InterSystems IRIS to Python with ease and speed (10x faster than old QueryExecute). Documentation.
Proxy Gateway allows generation of ObjectScript classes for Python classes. Instantinate objects, call object and class methods using familiar ObjectScript code (docs).
set module = "random"
set sc = ##class(isc.py.gw.Generator).Code golf is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code that implements a certain algorithm.
Here's a list of Code Golf competitions we had on Developers Community.
And some interesting challenges:
Did I miss something? Add more challenges in comments.
Just wanted to share my Zabbix template for monitoring InterSystems IRIS on Linux servers.
It monitors irisusr (configurable) memory consumption:
How to use:
Is there a way to set null in dynamic object without using %Set methods?
I have this method and I need to set NULL as, well, null and not string.
ClassMethod node(name) [ CodeMode = expression ]
{
{
"name":(name),
"content":($case(##class(%Dictionary.ClassDefinition).%ExistsId(name), $$$YES:"mycontent", $$$NO:"NULL"))
}
}I'm writing "Finder"-like dialog and need to get list of BPL classes.
The query is dependent on current "path" - it outputs all BPLs in the current path (if any) and all sub-packages which contains BPLs.
So far I have this query:
Query getBPL(path, needPlus = {(path'="")}) As %SQLQuery
{
SELECT DISTINCT $PIECE(Name, '.', 1, $LENGTH(:path, '.') + :needPlus) Name
FROM %Dictionary.ClassDefinitionQuery_SubclassOf('Ens.BusinessProcessBPL')
WHERE Name %STARTSWITH :path
}My problem is, if I'm not in "root" path I need to add additional dot level, but in root path I only need to add one.
I want to execute initialization code on the start of my business process.
I thought OnInit is a way to go, but apparently not - ^dbg global remains empty:
Class Test.BP Extends Ens.BusinessProcess
{
Method OnInit() As %Status
{
Set ^dbg = 1
Quit $$$OK
}
}Ideas?
I have BPL BP and BO.
To call BO I need to populate the stream property of the request message.
What's the best way to do it?
I have two local instances:
I'm using Java Gateway to talk to external system.
Both instances are using the same:
They are calling the same method with this java signature:
package isc.rabbitmq;
public class API {
public void sendMessage(byte[] msg) throws Exception {}
}On the InterSystems IRIS side I'm calling it like this:
set sc = ##class(%Net.Remote.Service).OpenGateway(gatewayName, .Let's have a round of CodeGolf!
As usual the goal is to write the shortest solution for a specified problem.
Today we have one of the classics: FizzBuzz.
Write a program that prints the numbers from 1 to 100.
But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”.
For numbers which are multiples of both three and five print “FizzBuzz”
I have this fact table
| CheckTime | Error | Marker (1 or 0) |
| 2019-01-01 00:01:00 | 1 | 0 |
| 2019-01-01 00:02:00 | 5 | 1 |
| 2019-01-01 00:03:00 | 2 | 0 |
And the cube which is pretty much 1:1.
I have build an MDX:
SELECT NON EMPTY [Measures].[Error] ON 0,NON EMPTY [CheckTime].[H1].[Minute].Members ON 1 FROM [CHECKCUBE]Which produced this chart in DeepSeeWeb (there's obviously more data, but you get an idea):

However, I want to add a Marker - if it equals 1 then I need some indication on the chart, so the graph should look like this:

Is there a way to do that in DeepSee or DeepSeeWeb?
From inside Business Service (OnProcessInput method specifically) I want to determine if Ensemble tries to shut down the job.
Is it possible? How?
When I describe InterSystems IRIS to more technically-minded people, I always start with how it is a multimodel DBMS at its core.
In my opinion that is its main advantage (on the DBMS side). And the data is stored only once. You just choose the access API you want to use.
How do I set environment variable for current process?
set env = "MYVAR"
set s = $ZF(-1,"export " _ env _ "=2048m")
set val = $system.Util.GetEnviron(env)
zw valReturns val="" because $zf(-1) spawns new process.
I have one persistent, xml-enabled class.
I need to convert objects of this class to XML.
However I need to project each object in different ways (depending on
where I send it), for example:
Is there a way to do that with XML Adaptor?
How do I send request on production start?
Here's what I got so far in my production class:
ClassMethod OnStart(pTimeStarted As %String) As %Status
{
job ..InitialTraining()
quit 1
}
lassMethod InitialTraining() As %Status
{
hang 5
set sc = ##class(EnsLib.Testing.Service).SendTestRequest(...)
quit sc
}Is there a better way without hang, etc?
I have a class defined like this:
Class test.ABC Extends %RegisteredObject {
Property myProp As %Binary [ Internal, Private ];
}Is there a way to get a value of myProp from outside of the object?
I can't modify or extend the class obviously.
This series of articles would cover Python Gateway for InterSystems Data Platforms. Execute Python code and more from InterSystems IRIS. This project brings you the power of Python right into your InterSystems IRIS environment:
The plan for the series so far (subject to change).