Question Eduard Lebedyuk · Jan 24, 2019 Should a property be quoted in object context or not Let's say I have a property as a variable value: set propName="Country" Is there a method to determine, should I quote it to access the object, so would the correct code be: write obj."Country" or just simple write obj.Country is enough? #Beginner #Data Model #Caché #InterSystems IRIS 0 4 0 329
Article Eduard Lebedyuk · Jan 23, 2019 3m read Iterate over Business process activities Recently I needed a classmethod that returns annotation value based on a name of a activity.As doing it at runtime seemed inefficient, I wrote compile-time utility that iterates over all business process activities and generates relevant code.This code could be used in a variety of situations when you need to iterate over business process activities, just add it as a secondary superclass to your BPL processes. #Beginner #Code Snippet #ObjectScript #Ensemble #InterSystems IRIS 1 2 1 427
Question Eduard Lebedyuk · Jan 17, 2019 String or Stream in the same persistent property? I have a persistent class.I want to store one of the properties there as a stream or a string depending on a size.99% of values would be strings (less than $$$MaxStringLength characters) so I don't want to store everything as streams.What do you think of this approach?What's the best architecture to implement in this situation? #Beginner #SQL #Caché 0 4 0 628
Question Eduard Lebedyuk · Jan 9, 2019 Work with devices connected via RS422/RS485 I connected from InterSystems Cache to devices connected via RS232 (commonly known as COM-port).Can the same be done with devices connected via RS422/RS485 interfaces? #Interoperability #Caché 0 2 0 245
Article Eduard Lebedyuk · Dec 29, 2018 6m read Importing code from external libraries Intro Recently I reread this article by @Bernd Mueller. It's about calling DELFATE function from zlib library. In this article I'll demonstrate several different approaches to callout libraries, we'll build the same functionality (compress function) in several different languages and compare them. #Beginner #Callout #Java #Node.js #JavaScript #Caché 1 0 0 720
Question Eduard Lebedyuk · Dec 27, 2018 Pattern matching with '*' and '?' I have an in-memory list of items and I want to check which items match my pattern string.Pattern string is a comma-separated list of items and special symbols like '*' and maybe '?'.There's something similar in $system.OBJ.Compile, it accepts patterns: "*.data.*,Sample.*" - and it would compile 'Sample' package and all 'data' packages.For example: set list=$lb("abc", "c", "aaa", "bbb") set result = ..match(list, "a*,*b") zw result result=$lb("abc","aaa","bbb") #Beginner #Caché 0 7 0 797
Question Eduard Lebedyuk · Dec 16, 2018 Debugging callout library <DYNAMIC LIBRARY LOAD> I have a simple callout library: #define ZF_DLL #include #include #undef ERROR int GetRandom(double* random) { // Py_Initialize(); // Py_Finalize(); *random = 1.0; return ZF_SUCCESS; } int main(int argc, char **argv) { printf("Random: "); double random=0; GetRandom(&random); printf("%lf", random); return 0; } ZFBEGIN ZFENTRY("GetRandom","D",GetRandom) ZFEND I compile this code as a shared library and it works fine with: #Caché #Callout 0 4 0 544
Question Eduard Lebedyuk · Dec 5, 2018 How do I specify System Default Setting for Production setting Added new System Default Setting for Production (not Host) setting.However, Production setting is still the same. I have tried restarting Production and instance, to no avail.How do I specify System Default Setting correctly?Production: #Beginner #Ensemble #Interoperability 0 3 0 550
Question Eduard Lebedyuk · Dec 2, 2018 Read command to get a line longer than 32767 symbols I'm using this code to read a file, line by line.Most lines are shorter than 32767 symbols, but some are longer. No line is longer than $$$MaxStringLength and long strings are enabled.Is there a param to Open/Read command I can pass to increase Read limit?My code: #Beginner #Caché 0 3 0 292
Article Eduard Lebedyuk · Nov 26, 2018 2m read Uploading and downloading files via http In this article, I would show how you can upload and download files from InterSystems products via http. The questions about working with files over http arise fairly often on community and I'm usually linking to my FileServer project which demonstrates file upload/download but I'd like to talk a bit more on how we can serve and receive files from InterSystems products. #Beginner #Best Practices #Frontend #REST API #Caché 8 3 5 2.9K
Question Eduard Lebedyuk · Nov 16, 2018 Update existing objects from XML I have a XML enabled persistent class and a XML representation of some object of this class (object ID is available).How can I use XML Reader (or some other mechanism) to automatically update this object? #Beginner #Object Data Model #ObjectScript #XML #Caché 0 4 0 580
Discussion Eduard Lebedyuk · Nov 9, 2018 Simplifying the editor Do you think our editor has too many unused features? I propose removing some, so it would look nice & clean! Here's some buttons that I think we really can let go. What do you think? #DC Feedback 0 3 0 338
Article Eduard Lebedyuk · Oct 8, 2018 5m read Configuring Apache to work with InterSystems products on Linux InterSystems products (IRIS, Caché, Ensemble) already include a built-in Apache web server. But the built-in server is designed for the development and administration tasks and thus has certain limitations. Though you may find some useful workarounds for these limitations, the more common approach is to deploy a full-scale web server for your production environment. This article describes how to set up Apache to work with InterSystems products and how to provide HTTPS access. We will be using Ubuntu, but the configuration process is almost the same for all Linux distributions. #Beginner #System Administration #Frontend #Caché 7 2 9 2.8K
Article Eduard Lebedyuk · Sep 17, 2018 7m read Send digest emails for workflow tasks with Publish/Subscribe InterSystems IRIS supports publish and subscribe message delivery. Publish and subscribe refers to the technique of routing a message to one or more subscribers based on the fact that those subscribers have previously registered to be notified about messages on a specific topic. This article demonstrates how several InterSystems IRIS capabilities can work together: Publish/Subscribe Email Workflow Alerts PPG (that's general capability though) In this article we would send emails about: New workflow tasks Unassigned workflow tasks Uncompleted workflow tasks Ensemble alerts Email recipients would be determined using Publish/Subscribe operation and each user would receive only digest email whenever possible. #Beginner #Business Service #Tutorial #Ensemble 0 4 1 607
Article Eduard Lebedyuk · Sep 10, 2018 4m read Dynamic objects and JSON support in InterSystems products Generally speaking, InterSystems products supported dynamic objects and JSON for a long while, but version 2016.2 came with a completely new implementation of these features, and the corresponding code was moved from the ObjectScript level to the kernel/C level, which made for a substantial performance boost in these areas. This article is about innovations in the new version and the migration process (including the ways of preserving backward compatibility). #Beginner #Caché #JSON #Tutorial 5 0 2 3.2K
Question Eduard Lebedyuk · Aug 29, 2018 How to replace $lb elements with empty elements I have a list set list=$lb(1,$c(0),2) How do I replace $c(0) with an empty element? My list should look like this: set list=$lb(1,,2) I tried using $list but it either replaces the element with an empty string: set $list(list,2)="" zw list Resulting in: list=$lb(1,"",2) Or removes the element altogether: set $list(list,2,2)="" zw list Resulting in: list=$lb(1,2) #Beginner #Caché 2 2 0 397
Question Eduard Lebedyuk · Aug 28, 2018 Replace elements in $lb Let's say I have a list structure: set list = $lb("stri,ng", $c(0), 2) I want to replace all $c(0) elements with empty elements, so my list would look like: set list = $lb("stri,ng", , 2) What's the fastest way to do that? #Beginner #Caché 0 13 0 623
Question Eduard Lebedyuk · Aug 27, 2018 Return $lb from Java Gateway call I want to call java method and return $lb structure from it.JDBC jar seems to contain relevant class - com.intersys.jdbc.CacheListBuilder, but so far I only managed to return a string that looks like a list.Here's my java code: #Caché #Interoperability #Java #Ensemble 0 3 0 351
Article Eduard Lebedyuk · Aug 14, 2018 6m read Continuous Delivery of your InterSystems solution using GitLab - Part IX: Container architecture In this series of articles, I'd like to present and discuss several possible approaches toward software development with InterSystems technologies and GitLab. I will cover such topics as:Git 101Git flow (development process)GitLab installationGitLab WorkflowContinuous DeliveryGitLab installation and configurationGitLab CI/CDWhy containers?Containers infrastructureCD using containersCD using ICMContainer architectureIn this article, we would talk about building your own container and deploying it. #Containerization #Continuous Delivery #Continuous Integration #InterSystems IRIS 4 14 3 1.4K
Question Eduard Lebedyuk · Aug 13, 2018 Forbid extending my class I have a class (to be deployed) and I want to forbid anyone from extending it.Is there any way to do that? #Caché #InterSystems IRIS #Security 0 21 0 568