Question David Hockenbroch · Nov 8 Debugging %Net.SMTP Requests I'm having an issue with sending SMTP requests from a specific Microsoft 365 account to Gmail accounts. We can use other Microsoft 365 accounts, but something about this one specific account sending to Gmail fails. The error we get is just telling us that sending to the user xxxxx@gmail.com failed. In order to troubleshoot that, I'm looking for more detail than that. #InterSystems IRIS 1 4 0 80
Article David Hockenbroch · Nov 5 7m read Recognizing Barcodes With Embedded Python As we keep updating our software, we often realize that we require more and more modern solutions. So far, only one major piece of our software relies on reading barcodes in documents and images. Since Cache did not have a means of reading barcodes in the past, we have always achieved our goals by using a Visual Basic 6 application. However, it is no longer an ideal solution because it is currently complicated to maintain it. IRIS also lacks this capability, but it has recently got an option that makes up for it: embedded Python! #Code Snippet #Coding Guidelines #Embedded Python #JSON #ObjectScript #Python #Tips & Tricks #InterSystems IRIS 5 2 1 178
Article David Hockenbroch · Oct 14 9m read What's the Catch? Many programming languages use the try-and-catch construct to handle runtime errors gracefully. If the code within the try block encounters an error, it will throw an exception to the catch block, where the error handling occurs. #Beginner #Code Snippet #Coding Guidelines #Debugging #Error Handling #ObjectScript #Tips & Tricks #InterSystems IRIS 6 1 3 200
Question David Hockenbroch · Oct 12 Embedded Python - Errors with Numpy When I install the numpy package on Python on my PC using: pip install numpy I can use it in python on my machine. If I do: pip install --target C:\InterSystems\IRIS\mgr\python numpy I get errors any time I try to import it in embedded python. #Embedded Python #InterSystems IRIS 0 3 0 135
Article David Hockenbroch · Sep 11 9m read Dates with InterSystems Do not let the title of this article confuse you; we are not planning to take the InterSystems staff out to a fine Italian restaurant. Instead, this article will cover the principles of working with date and time data types in IRIS. When we use these data types, we should be aware of three different conversion issues: Converting between internal and ODBC formats. Converting between local time, UTC, and Posix time. Converting to and from various date display formats. #Code Snippet #ObjectScript #SQL #Tips & Tricks #InterSystems IRIS 7 1 4 229
Question David Hockenbroch · Aug 20 Override a Method in VS Code? Is there a wizard to override pieces of class (parameters, properties, methods, etc.) like there is in Studio? I can't find this functionality anywhere. If it's not there, it's certainly a piece I'll sorely miss as we transition to VS Code. #ObjectScript #VSCode #InterSystems IRIS 0 2 0 115
Article David Hockenbroch · Jul 16 6m read Method or Class Method? For programmers new to ObjectScript, one question will inevitably arise: “What is the difference between methods and class methods?” A typical answer would be: “A class method applies to a class, but a method applies to an instance of that class.” While that answer is correct, it lacks important information on how these methods di #Beginner #ObjectScript #InterSystems IRIS 10 1 4 267
Article David Hockenbroch · May 9 9m read Microsoft 365 - Events and Tasks In our previous article, we explored how to send emails through Microsoft 365 using the Graph API. Since then, an anonymous client reached out to me about setting up some other methods of notifications through that API. #API #Code Snippet #ObjectScript #Tips & Tricks #Tutorial #InterSystems IRIS 1 0 1 205
Article David Hockenbroch · Apr 25 3m read Making A Variable Watch Itself I came up with a challenge for myself to come up with a way to make a variable watch itself for a certain value and do something when it hits that value without having to check it every time something touches it. Basically, a way to say "if at any point during the execution of this code, if x = 0 (or whatever the condition is) do this thing." The class I ended up with watches a %Status: #Code Snippet #Error Handling #ObjectScript #Tips & Tricks #InterSystems IRIS 3 0 0 234
Article David Hockenbroch · Apr 2 9m read Emailing with Office 365 and ObjectScript One of the most common kinds of integration we are asked to do is emailing. One of the most typical email services our customers use is Microsoft’s Office 365. After setting up the right configuration on the Microsoft side, we can email from IRIS with two HTTP requests. #API #Authentication #Code Snippet #JSON #OAuth2 #ObjectScript #REST API #InterSystems IRIS 9 8 5 562
Article David Hockenbroch · Feb 19 7m read Reserving a License “I have been waiting for thirty seconds for service. This is outrageous! #Access control #Authentication #ObjectScript #Security #System Administration #Tips & Tricks #InterSystems IRIS 4 0 0 413
Article David Hockenbroch · Jan 24 7m read Securing xDBC Connections with ServerInitCode The ideal number of table permissions to assign for your users is zero. Permissions should be granted upon sign-in based on the application used for access. For web applications, we have a simple way of doing this by appointing application roles, matching roles, and required resources in the System Management Portal. ODBC and JDBC connections present a different problem, however, especially when third-party applications are involved. As providers of an ERP system, our customers often wish to be able to employ various software packages to integrate with or report on their data. Many of these programs are capable of running any kind of query. Yet, letting them do that can be devastating to a customer’s data. #Access control #Code Snippet #JDBC #ODBC #Security #System Administration #InterSystems IRIS 3 0 3 270
Article David Hockenbroch · Jan 4 22m read The Security Package - REST API Considerations So far, we have covered how to use ObjectScript to manage users, roles, resources, and applications. There are a few other classes in this package that work similarly to the ones mentioned above. However, these four classes are the ones everyone will have to use to manage their application security. #Access control #API #ObjectScript #REST API #Security #InterSystems IRIS 5 2 3 370
Article David Hockenbroch · Nov 2, 2023 9m read The Security Package - Managing Applications Programatically Here in %SYS, we have already examined users, resources, and roles. Now that we know how to set all of that up, we should give it a purpose. Next we will talk about applications! As you may expect, we will see various identical class methods defined here that we have seen in the previous classes. However, some of them will have some tiny yet significant differences. #Access control #Authentication #ObjectScript #System Administration #InterSystems IRIS 5 1 2 367
Article David Hockenbroch · Oct 4, 2023 8m read The Security Package - Managing Roles Programmatically We are back to %SYS once again! Since we covered managing users and resources in the last two articles, we can finally move on to roles. As you may have guessed, there are a lot of methods of managing them that you have already seen in our previous writings. #Security #System Administration #Tips & Tricks #InterSystems IRIS 4 3 4 535
Article David Hockenbroch · Sep 27, 2023 7m read The Security Package - Managing Resources Programmatically Welcome back to %SYS! If you read the first article in this series, you must have already seen how to manage your users through the Security.Users class programmatically. Today, we will move on to Resources! Many of the classes in this package use a very similar set of methods. #InterSystems IRIS 4 0 1 285
Article David Hockenbroch · Sep 14, 2023 9m read The Security Package - Editing Users Programmatically Have you ever thought of creating your own systems for editing users or, perhaps, even an API that you can call? #Access control #Authentication #Coding Guidelines #Security #System Administration #InterSystems IRIS 4 1 3 431
Question David Hockenbroch · Sep 11, 2023 Notification of Mirror Failure Is there any built-in functionality to send out an email or a text message when a mirror member fails? #Failover #Mirroring #Monitoring #System Administration #Caché 0 6 1 352
Article David Hockenbroch · Jun 2, 2023 5m read InterSystems Reports Migration - Generate Report to Stream We are looking at what we need to do to migrate from our current usage of Zen reports to InterSystems Reports. One of the hurdles for us is figuring out ways to interact with InterSystems reports programmatically from ObjectScript routines. There is a Java API for it, but it is possible to generate a report from InterSystems reports to a stream object in ObjectScript without diving into Java by using a %Net.HttpRequest. Here is a code example, followed by an explanation: #InterSystems Reports (Logi) #ObjectScript #Tips & Tricks #Caché #InterSystems IRIS 1 0 0 179
Question David Hockenbroch · Nov 2, 2022 Programmatically Adding Table Permission To A Role Is there a way to add specific table permissions to a security role programmatically? I'm working on scripting some of the initial setup work when we sell certain add-ons to our software, and I see how I can assign resources to a role and give it a description, but I don't see how I tell it that this role gives the user, for example, SELECT privileges only on the invoices table, or SELECT, INSERT, UPDATE, and DELETE. #ObjectScript #Access control #Security #Caché 0 1 1 235