Question Stephen Wilson · Mar 11, 2020 Can you have a custom %Status object without the error code in the $SYSTEM.Status.GetErrorText(sc) output ? There does not seem to be any separation between the error code and error text in a %Status object. For custom errors, I simply want to display the message and not Error #5001: Some error text. #Error Handling #ObjectScript #Caché 0 5 0 577
Question Stephen Wilson · Feb 4, 2020 Caché Studio : How to find and record all global variables referenced in routine or collection of routines? I am looking to run some analysis on existing software to quickly identify global variable references. Ideally you would feed in a "starting routine" and after going through all referenced routines you would end up with a finite set of global variables. So the primary purpose is to take say 10,000 lines of code and map out the referenced global structures without relying on a programmers eye. I found the post on Object Script equivalent to Studio "Find in Files" interesting but the downside is that output is too verbose and would require parsing to extract the global structures. How would you override writing to the terminal so that you could parse the data? #ObjectScript #Caché 0 4 0 889
Question Stephen Wilson · Sep 20, 2019 Is there an OAuth 2.0 "sliding expiration" for JWT access tokens to extend the expiry date? In .NET Core you have an option to extend a session using a "sliding expiration". This means that if over half the time has passed and the user actively uses their session then the expiry timer gets reset and the user remains logged in. This can lead to the curious situation where you have an active authenticated user with an expired access token being used in data-access requests. #.NET #OAuth2 #Frontend #Caché 0 1 0 3.5K
Question Stephen Wilson · Aug 21, 2019 ASP .NET Core Identity (v3) uses PBKDF2 algorithm with HMAC-SHA256, 128-bit salt, 256-bit subkey, and 10,000 iterations. What does Caché use? The .NET Core Identity model has an IPasswordHasher<> interface for for Hashing a password so that it can be stored in a databaseVerifying a provided plain-text password matches a previously stored hash. I am getting invalid password errors during the login process when the .NET Core Identity model computes a hash from a plain text input and compares it to a password hash value I've returned from Caché. The default hashing algorithm is PBKDF2 with HMAC-SHA256, 128-bit salt, 256-bit subkey, and 10,000 iterations (detailed article on .NET Core Identity PasswordHasher). The algorithm Caché uses is probably different which may be why I am getting errors. #.NET #ObjectScript #Security #Caché 0 6 1 2.5K
Question Stephen Wilson · Aug 13, 2019 Adding custom claims to in OAuth 2.0? I have an OAuth 2.0 development environment where Caché is serving all three roles as the Authorization Server, Client and Resource Server based on a great 3-part series on OAuth 2.0 by @Daniel Kutac. I have a simple password grant type where an x-www-form-urlencoded body (as described in this post) is sent as a POST to the token endpoint at https://localhost:57773/oauth2/token and a response body with a HTTP Response 200 header is returned. The response body looks something like this. #OAuth2 #ObjectScript #Caché 2 3 0 2.4K
Question Stephen Wilson · Oct 10, 2018 Has anyone used .NET Core EF with Caché? What would a sample DbContext look like and how would you register the DbContext in the Startup.cs ConfigureServices method? #Beginner #Caché #Data Model #.NET 1 6 0 1.2K
Question Stephen Wilson · Oct 8, 2018 Can you perform Kills or Sets directly on globals within .NET without ObjectScript classes or generated proxy classes ? I think I already know the answer to this but I thought I'd ask anyway. So the Node.js adapter allows you to perform operations directly on Globals. Does the InterSystems.Data.CacheClient.dll or InterSystems.CacheExtreme.dll provide a mechanism to access Gobals directly or are you accessing globals via Caché ObjectScript classes? #Beginner #Object Data Model #Caché 0 5 0 540
Question Stephen Wilson · Oct 4, 2018 Cache Objects -How to check for a null property when reading an object? You have a global ^CODE("TNO","BIO",291,"AKI") that may or may not exist. On the data side of the global ref it can have a boolean value of 0 (false) or 1 (true) and this global is wrapped up in a Caché class accessible from myobject.AKI property. At the object level, how do you check whether the property is defined ie. is there a $DATA equivalent for Cache Object properties? Also, how would you kill /null the property as opposed to making the value 0 (false) or an empty string? #Object Data Model #Caché 0 10 0 3.4K
Question Stephen Wilson · Sep 19, 2018 How to pass JSON body as part of a HTTP Status 404 Response message 404 Not Found { "error": { "errors": [ { "domain": "global", "reason": "notFound", "message": "Not Found" } ], "code": 404, "message": "Not Found" } } I want to do something like the above sample from a Google Storage JSON API. I have a call to Write obj.%ToJSON() followed by return ..ReportHttpStatusCode(..#HTTP404NOTFOUND) however the HTTP Status code is always 200. If I remove the Write obj.%ToJSON() statement it returns a 404 status with no body. How do I return both? #Frontend #JSON #Object Data Model #REST API #Caché 0 1 0 2.6K
Question Stephen Wilson · Sep 14, 2018 How do I process queryString parameters in a HttpGet Request in a %CSP.REST page? So by queryString I mean name-value pairs passed in as part of the URL. Currently my service works when called like this #Object Data Model #REST API #Caché 0 2 0 625
Question Stephen Wilson · Jun 22, 2018 Is there a way to delete a class package on the server from Atelier? When I delete a class package, it seems to delete it from my workspace but the delete action is not synchronized with the server. Is there a way to delete this package both locally and on the connected server within Atelier?#UPDATE - Added product version informationAtelier version: 1.2.118 (Beta)Caché $ZV: Cache for UNIX (IBM AIX for System Power System-64) 2017.2 (Build 744) Fri Sep 29 2017 11:04:53 EDT #Development Environment 0 2 0 469
Question Stephen Wilson · Jun 19, 2018 Is there a SQL Storage Map GUI in Atelier (any version)? In Studio, you can open the inspector and view the SQL Storage Map on %Persistent classes. Can you do this in Atelier or do you have to read the XML text? If it doesn't currently exist, are there plans to include it? The inability to perform certain functions in Atelier that can be done in Studio can be a 'point of conflict' when asking/forcing/encouraging developers to move to Atelier. #Object Data Model 1 2 0 330
Question Stephen Wilson · May 8, 2018 What is the simpliest way to call a Caché built-in function like $HOROLOG from Node.js? I was following the Node.js: installation and connection test for use with Caché and was wondering how to populate a subscript with a value calculated by a built-in COS function eg. $HOROLOG without having to write wrappers for every built-in function or use temporary global storage. Any ideas? #Caché #Node.js 0 2 0 443
Question Stephen Wilson · Apr 19, 2018 Does a RESTful API in Caché remove the requirement to use a DLL and generate proxy classes for .NET web development? Does developing a RESTful API in Caché remove the requirement to use the InterSystems.Data.CacheClient.dll and generate proxy classes using the Caché Object Binding Wizard for .NET web development? If anyone has links to sample applications using .NET with Caché and REST Services, I would be grateful if you could share them. #.NET #Beginner #Object Data Model #REST API #Frontend #Caché 0 4 0 544
Question Stephen Wilson · Feb 16, 2018 Can you please fix the 'upload file' button to attach files to posts? I discovered the upload file button does not appear to work properly but you can still attach files under 'change additional settings'. Are there plans to fix this? #Other 0 6 0 585
Question Stephen Wilson · Sep 14, 2017 Can you build a report showing when all .INT files in a namespace were last executed? So you have a namespace with thousands of .INT files and you want to identify routines that have not been executed in say the last 5 years. How would you do that without amending any existing software? #Caché #ObjectScript 0 1 0 264
Question Stephen Wilson · Sep 6, 2017 Can you call something that is non-interactive that will clean out any globals in ^CacheTempUser.* ? These Globals are usually cleared out as part of the startup/shutdown processes. If your server never reboots how would you clean these out? #Object Data Model #ObjectScript #Caché 0 5 0 384
Question Stephen Wilson · Aug 16, 2017 Is there any way to extend Cache ObjectScript using custom-defined commands and symbols? Has anybody defined their own Cache ObjectScript (COS) commands and symbols? Is it even possible? For a list of currently used commands and symbols please use the following link.http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS #Caché #Ensemble #ObjectScript 0 3 0 385
Question Stephen Wilson · Aug 8, 2017 Is this a bug? ZBREAK Trace option does not appear to handle comma-separated SET command I came across this behaviour when debugging some Cache ObjectScript code. I have provided a simple example below. Example 1: #Caché #ObjectScript 0 3 1 334
Question Stephen Wilson · Aug 3, 2017 How do you get the 'Array Value' in the ZBREAK trace option? I am running a ZBREAK trace on a legacy FDBMS application that uses arrays but rather than displaying the array value contents, I am seeing logs similar to the following.Trace: ZBREAK SET LINE=Array Val at BIOPWR+6^BIOPWRMy ZBREAK trace settings are as follows: #Caché #Debugging #ObjectScript 1 5 1 426