Question Eduard Lebedyuk · Dec 5, 2019 Task schedule - once a month but different day each month 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? #InterSystems IRIS 0 4 0 478
Question Eduard Lebedyuk · Dec 4, 2019 How to check that business host is in production? 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. #Beginner #Ensemble 0 3 0 276
Question Eduard Lebedyuk · Nov 14, 2019 Scheduling Business Services I have several Business Services which I need to run once on each trigger. Trigger can be either: Specific time (so once a day, every day) Specific day (so once a month, every month) 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. #Business Service #Ensemble 0 2 0 334
Question Eduard Lebedyuk · Oct 12, 2019 How do you search with REST 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: all parameters are AND parameters, user can't make combos, ORs, etc. User can only provide values all values are integers so I don't have to think about URL limits all values are atomic all conditions are about equivalency Some options I know of: 1. URL parameters. #REST API #InterSystems IRIS 0 9 0 2.6K
Question Eduard Lebedyuk · Oct 1, 2019 Current rss memory consumption / use of $zf(-100) 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: #Beginner #System Administration #InterSystems IRIS 1 2 1 326
Question Eduard Lebedyuk · Sep 14, 2019 Replacing character groups 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. #Code Snippet #ObjectScript #Caché #InterSystems IRIS 0 6 0 551
Question Eduard Lebedyuk · Sep 8, 2019 Set NULL in dynamic object 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")) } } #InterSystems IRIS 0 3 0 648
Question Eduard Lebedyuk · Sep 8, 2019 SQL condition in SELECT query 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: #Business Process (BPL) #Ensemble 0 2 0 383
Question Eduard Lebedyuk · Aug 28, 2019 Run code on Business Process start 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? #Business Process (BPL) #Ensemble 1 2 0 448
Question Eduard Lebedyuk · Aug 26, 2019 Best way of setting request stream property from BPL? 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? #Beginner #Business Operation #Business Process (BPL) #Ensemble 0 3 0 350
Question Eduard Lebedyuk · Aug 17, 2019 Difference in JavaGateway handling of %GlobalBinaryStream / byte[] between InterSystems IRIS 2018.1.2 and 2019.1 I have two local instances:IRIS for Windows (x86-64) 2018.1.2 (Build 626_3U) Wed Jun 12 2019 19:07:59 EDTIRIS for Windows (x86-64) 2019.1 (Build 510U) Thu Mar 14 2019 14:13:37 EDTI'm using Java Gateway to talk to external system.Both instances are using the same:jargenerated classjava versionThey are calling the same method with this java signature: #Java #InterSystems IRIS 1 1 1 194
Question Eduard Lebedyuk · Jul 23, 2019 DeepSeeWeb add markers to line chart I have this fact tableCheckTimeErrorMarker (1 or 0)2019-01-01 00:01:00102019-01-01 00:02:00512019-01-01 00:03:0020And the cube which is pretty much 1:1.I have build an MDX: #Analytics #Analyzer #InterSystems IRIS BI (DeepSee) 0 2 0 212
Question Eduard Lebedyuk · Jul 19, 2019 Can I determine inside Ensemble Job that Ensemble tries to shut down the job From inside Business Service (OnProcessInput method specifically) I want to determine if Ensemble tries to shut down the job.Is it possible? How? #Business Operation #Business Process (BPL) #Business Service #System Administration #Ensemble 0 2 0 194
Question Eduard Lebedyuk · Jun 8, 2019 Set environment variable from terminal 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 val Returns val="" because $zf(-1) spawns new process. #Red Hat Enterprise Linux (RHEL) #System Administration #Caché 0 10 2 1.2K
Question Eduard Lebedyuk · Jun 7, 2019 Different XML projections for the same class 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 onwhere I send it), for example:Different list of attributes are projectedAttributes have different names...Is there a way to do that with XML Adaptor? #ObjectScript #SOAP #XML #Caché 0 1 0 219
Question Eduard Lebedyuk · May 29, 2019 Send request to BP on production start 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? #Business Process (BPL) #Ensemble 0 1 0 337
Question Eduard Lebedyuk · May 17, 2019 Is there a way to get [ Internal, Private ] property? 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. #Object Data Model #ObjectScript #Caché 1 8 1 614
Question Eduard Lebedyuk · Apr 15, 2019 CacheGlobalOrder example to iterate over global and get data I managed to use CacheGlobalOrder to iterate over global and return the next subscript: #C++ #Callout #Caché 0 1 0 401
Question Eduard Lebedyuk · Apr 15, 2019 Iterate over %List/$lb in C I'm using callin to get global values.Here's a simple function to get string value from global and return it: #Beginner #C++ #Callout #Caché 0 11 0 572
Question Eduard Lebedyuk · Apr 8, 2019 Can datatype redefine getter/setter? I have a lot of string properties, which need custom but similar Getters and Setters.Currently I'm generating Getter and Setter in class generation code but that expands class definition.Is there a way to specify custom datatype which would generate custom getters and setters? #Beginner #Object Data Model #Caché 0 17 0 540