Hello.
We're trying to create a script that compiles everything on a certain namespace, for that we are depending on CompileAll. However it seems that this method doesn't check for a dependency tree even when using flags like: curb.
Hello,
Recently I have been required to work with a method called ExportToStream.
The situation asks me to export a UTF-8-encoded JSON as a XML to be imported on old releases. Here's how I attempted to fulfill this request:
do $System.OBJ.ExportToStream("path/to/my/json/file.json", .stream,,,"UTF8")
The file is indeed encoded as UTF-8 and although the XML header denotes that it has been exported as UTF8:
<?xml version="1.0" encoding="UTF8"?>
The body content seems to differ:
"text": "Condição de pagamento sujeito a análise de crédito: "
Hello,
We're considering adopting the ZPM solution as a way to manage many of our customer updates. However in order to do so we need to know a few things.
- Is ZPM client compatible with Caché 2017.x versions?
- Can we configure a self-hosted registry that doesn't require a GitHub repository link?
- Could the ZPM client zip and upload the whole package (all classes, routines, includes) instead of downloading it from a Github link?
- Can we declare a module that specifies classes themselves instead of their package counterpart? e.g. My.Class.CLS instead of My.PKG.
Hello all!
As we ObjectScript developers have been experiencing, preparing an environment to run CI related tasks can be quite the chore. This is why I have been thinking about how we could improve this workflow and the result of that effort is IRIS-CI.
See how it works here.
Quickstart
1.Download the image from the Docker Hub registry:
docker pull rfns/iris-ci:0.5.3
- Run the container (with the default settings):
docker run --rm --name ci -t -v /path/to/your/app:/opt/ci/app rfns/iris-ci:0.5.3
Looks like the $get is actually trying to use the property getter instead of evaluating the GetAt as a method first.
Should this be considered a bug?.png)
Just like the title says, I'm attempting to find a way to create a web application that instead of serving CSP files, it uses a dispatch class.
I searched for clues in the documentation, but the CSPApplication tag seems to be exclusively for CSP file-based applications.
I'm trying to avoid implementing a workaround such as using the Invoke tag to call the Security.Applications to generate the web application but I might be forced to do so, even though it's unpleasant if I had to say...
So, is there an official way to execute this task?
Hello.
I'm trying to export a XML stream containing some files that are supposed to have been written using UTF-8, but I'm facing some broken encoding issues.
You can see below that I'm indeed viewing a UTF-8 encoded and which is inside the CSP folder and encoded correctly (although displaying it on Studio would not display it correctly as the file is not using BOM and that's intentional).
Pretty straight forward.
I'm tempted to hard-code ISO-8859-1 inside my VSCode extension when working with CSP because this seems to be the encoding used by default, but I need to know if there's any other possible configuration. So can you share your experience when working with CSPs? Like issues with encoding, discoveries regarding it, workarounds etc.
Also, can someone tell me if it's possible to work with UTF-8 encoded CSP files using Atelier without breaking the encoding of the output file?
Hello again and welcome to the next tutorial on this series: Part 5 - Errors. Here we are going to learn how Frontier handles unexpected errors and how we can force them.
- Core concepts
- Getting started
- Creating a simple request
- Query parameters
- Aliasing query parameters
- Changing output format
- Rest query parameters
- Inferring object instances
- Using literal notation
- Seamlessly mixing instances with literals
- Returning streams
- Handling payloads
- How it works
- Making it useful
- Unmarshalling payloads into instances
- Using the unmarshaller to EDIT an existing object
- Using the SQL API
Hello,
I had an issue when using the method Exists, I noticed that if you provide a directory for this method it returns 1. This is really misleading, because sometimes the input could be a directory and the only way to predict this is to also test if the file is a directory.
I didn't tested using the Attributes method, but I supposed that this means could also be a solution for that issue. But still, I expected the Exists method to return 1 for files and 0 for directories, since there's also method called DirectoryExists already.
write ##class(%File).Exists("/InterSystems")
1
Hello everyone, it took some time but I'm finally getting things done again. Phew! But for now, allow me to introduce a tool that I've been using frequently.
I call it Forgery.
This description has been taken from my GitHub repository, also available on OpenExchange:
Forgery is a server-side utility that allows executing simulated HTTP request by forging calls to REST applications. This makes Forgery ideal for using together with test suites that need to call the API via HTTP but could face issues with license usage and its grace period.
Hello.
We're about to implement an application that could use WebSockets intensely so before we head to that direction we need to figure out about how some few things work. That being said, anyone care to give me some enlightenment?
- What's the criteria for a new session to be created when using WebSockets?
- What's the factor for calculating how many licenses to would be used when SharedConnection is enabled for WebSockets?
- Is there a way to use session in a way that it would optimize the license usage for a single user?
Hello again and welcome to the next tutorial on this series: Part 4 - Sharing data across router methods. Here we are going to learn how to share a object containing data that is available for read across every router methods.
You're required to complete at least the Part 1 before entering this one. Still, this is supposed to be a really short tutorial, since there isn't much to be said about data sharing.
Hello again and welcome to the Part 3 - Using the SQL API!
If you have been wondering about how to use SQL along with Frontier, you came to the right place. That's because since Frontier wraps the common Caché SQL API within it's own, you need to use the API provided from it. But you don't need to worry about its learning curve, because the Frontier SQL API is really simple.
If you arrived here without checking the Part 1, I'd recommend you doing so, because Part 1 covers the essential for getting started with Frontier routers.
Hello again! Welcome to the Part 2 - Handling payloads!
If you're new to this series, I'd recommend you to check out the Part 1 - Core concepts. You'll need a basic understanding about how Frontier works before continuing with the Part 2.
Hello all.
I think the forum experience is great as whole, but it could improve even more if we had somewhere to share our ideas. So that's why I'm creating a thread dedicated for that purpose. Maybe this way someone from InterSystems could catch something good?
Hello, I just noticed that the following query is not allowing when using cached queries.
The compiler will accuse the code about missing a closing quote.
Just so you know, if I use this query dynamically it works, so I guess it's related to the code linting.
Query T() As %SQLQuery [ SqlProc ]{SELECT TOP 3 JSON_OBJECT('lit':'Employee from','t':%TABLENAME,'name':Name,'num':SSN) FROM Sample.Employee}The bold part is what is causing the error.
Version 2017.
Hello.
The idea of this post is to introduce Frontier: An abstraction layer that allows Rapid REST development.
REQUIREMENTS:
- Caché 2016.2 or higher.
- Frontier.
Why?
Have you ever found yourself dealing with repetitive tasks like mounting objects, serializing them and eventually handling multiple errors for multiple cases? Frontier can boost your development by making you focus on what really matters: your application.
Frontier is made to stop you from WRITE'ing by instead forcing your methods to return values.
It's designed to make you code clean, and you'll see the why pretty soon.
Hello.
I just noticed that whenever I parse a JSON using %FromJSON, it always return the property values as primary data types, including long strings.
Hello.
I'm using device redirection to intercept incoming writes and need to figure a smart way to detect when to CLRF in order to prevent misleading outputs.
So basically, if the intercepted write ends with !, I need to know that and prevent my routine from writing ! as well.
Here's the source code for it:
Hello.
I'm having difficulties trying to figure (if possible) how to create an URL that also matches query parameters.
I tried: <Route Url="/:namespace/test(\?id\=):id" Method="GET" Call="Test"/>
<Route Url="/:namespace/test?(id)=:id" Method="GET" Call="Test"/>
<Route Url="/:namespace/test?id=:id" Method="GET" Call="Test"/>
But none of these worked.
Is it possible when using %CSP.REST or am I restricted to using route parameters?
Thank you.
EDIT:
Greetings, can someone give me some help? I'm trying to use job for a instance method, as it's described here but...
Anyway, I have a method like this:
Method PrepareInstance(path){set ..Tool = ##class(Tool).%New(path)do $System.Event.Signal($zparent)}That is being called like this:
Method TestPurge() As %Status{job ..PrepareInstance(..GetTestDirectory("../fixtures/_/dummy-project"))::10set msg = $System.Event.Wait("",10)
}But it fails because:
<METHOD DOES NOT EXIST>zTestPurge+1^UnitTest.Tool.1 *PrepareInstance
You might find it useful or not. It depends on what you can imagine it to be used with, like I had to.
Either way, I created a lib that can fetch environment variables from a file or from the OS where Caché is running.
Mostly know as dotenv. Many languages have it, so why not Caché?
The usage is pretty simple:
If you want to use OS env vars exclusively, just use the method:
##class(DotEnv.Parser).FromOS()
Otherwise, if you want to specify a .env file containing your variables to complement the OS ones use the method:
##class(DotEnv.Parser).FromPath("/path/to/file")Here's my issue. I've been using Sample.* globals and packages mapped to another development namespace to realize unit tests. So when I ran it, I notice that I forgot to start a transaction in order to be able rollback it to it's original data.
I assumed that I should use transactions since I was manipulating it's data but I didn't want it to be persisted.
I'm breaking my head trying to figure how to solve this issue.
EDIT: This article has been updated with up-to-date information about the Port project, which now includes a tutorial for basic usage.
The Port project is something that I've introduced more than two years ago but I hadn't enough room to elaborate a tutorial on how to use it till now.
First, the motivation:
Hello.
I would like to know if there's a way to batch a certain amount of writes done inside a job and display it sequentially on the main process.
My idea is to prevent the main process from freezing while displaying the batched data. The main process's device could be
the terminal or the Studio output.
%Studio.Debugger does something close to that when printing the output from the debug target process.
$System.Event.Signal($zparent) doesn't signals the parent if a device is open. So I can't create the batch buffer along, because I can keep the buffering device open and notify the main process.
Greetings.
I'm trying to do some experiments using the Atelier REST API, but I noticed a bug that I simply can't bypass.
When requesting the Atelier server asking for an array of docs, it seems to fail when using it with multiple formats.
Like: [ "RCWWW015.int", "Class.cls" ]
While this method does return the class's source code, it fails when fetching the routine.
Like this: