I have been building Business Processes in Ensemble for a few months and in a process i'd use a combination of data from the request that started the process and context variables that where filled by earlier calls in the process as input for a data transformation. I do not know how to achieve that.
This code snippet provides a ZEN page that downloads a stream from its database directly:
/// We assume that you have stored your data within this schema:
/// MyApp.Model.Storage: Filename,FileSize,Content,ContentType
Class zen.downloadStream Extends (%ZEN.Component.page,%CSP.StreamServer)
{
/// Wrapper to get the id of the download, we assume that the id is passed to this zen page
/// as a URI parameter, i.e.: MyApp.Downloads.cls?OID=1234
ClassMethod GetId()
{
Quit $Get(%request.Data("OID",1))
}
/// Set the appropriate header for the file.
ClassMethod OnPreHTTP() As %Boolean
{
Set tId = ..GetId()
If ##Class(MyApp.Model.Storage).%ExistsId(tId) {
Set tStream = ##Class(MyApp.Model.Storage).%OpenId(tId)
// You could "guess" the content type by its file extension
// or you can store it (before) in the database separately (like in this example).
// Set Extension = $Piece(tStream.Filename,".",$Length(tStream.Filename,"."))
// Set ContentType = ..FileClassify(Extension)
Set %response.ContentType = tStream.ContentType
Do %response.SetHeader("content-disposition","attachment; filename="_tStream.Filename)
Do %response.SetHeader("Content-Length",tStream.FileSize)
}
Else {
Set %response.Status="404 File Not Found"
Quit 0
}
Quit $$$OK
}
ClassMethod OnPage() As %Status
{
Set Download = ##Class(MyApp.Model.Storage).%OpenId(..GetId())
Do Download.Content.OutputToDevice()
Quit $$$OK
}
}
I have created some roles, and would like to know if there is a way to export the Roles and save them off to a file? I want to create a backup file of these roles for DR purpose, and in case I ever get hit by the preverbal bus.
i want to create an iris document database with Atelier with some properties, where i can import my JSON formatted data from an API to the database which i created. Right now i know how to import my local JSON formatted data to my created database:
I've created a datatype class whoch extends from %Library.String with a REGEX parameter and the validation of the value against the regular expression. The class does not support Populate using the regular expression as a template for data population.
Hello World; i have a problem to call function from cache , cache-call:functioninmaccache^MyFileMac(" + id+ ") This rule works but always gives the same link thanks for yours response
Can anyone tell me where to find good resources to learn Caché besides InterSystems. I am looking foe material (ie books, white paper, exercises, ect). There does not seem to be a lot of information on Caché.
Using our cool new debugging extension for Visual Studio Code I'm trying to debug a CreateProjection method of a class, but when I compile it the work apparently gets done in one of the worker jobs, so my breakpoint never triggers.
Is there a compiler flag or qualifier to force the compilation to be done in-process rather than getting handed off to a worker job?
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?
I need submit a object have a json string as property of class, but I get an issue, object can't save to SQL table if I take json data to json property. I try making a test class with only json property and get the same issue, no data row in SQL table after run ClassMethod . Some one know what's problem, please help me. Here my test class:
It has been pointed out to me that one of my applications fails to display all of the contents when displayed on an iPhone or a tablet of smaller res that a desktop screen.
Desktop..
iPhone..
The code does not change between the two views of the same page.
I'm new to Iris, trying to follow this guide ( https://community.intersystems.com/post/k-means-clustering-iris-dataset ) about using clustering. I've followed all instructions until showing the data. At that point, `dataFrame.show()` fails with `java.sql.SQLException: Access Denied`.
Atelier 1.2 as well 1.3 throws java.lang.NullPointerException when opening a class file.
Never mind how to open the class file, 1) witin project explorer 2) atelier explorer 3) open resources 4) switcing between tabs (open files) etc..., I get these errors every time.
Never seen this problem in Atelier 1.1.
Do I miss something within the Eclipse environment?
I would like to know , if its safe to use %NOLOCK in insert query while doing some parallel processing in Ensemble. We will have pool size of more than 1 for a business process. The business process does an entry in internal meta data table , which will be used for some internal reporting. The same row might get updated by some other process later point of time. i could not produce any error or any issues . Looking forward to hear some opinion on this.
Developing a Full-Stack JavaScript web app with Caché requires you to bring together the right building blocks. In this third part of this article series I will show how to link our React app to our three back-ends we created in part 2.
I have an http adapter that calls out to a web service and is looking for a "Completed" response. I want the adapter to wait a certain number of seconds before calling out again to get a response. I have tried setting the retry interval on the business operation but that does not do it. See my code below.
IRIS for Health — is the world’s first and only data platform engineered specifically for healthcare. It empowers you to rapidly create and scale the industry’s next breakthrough applications.
I have previously setup an Atelier project and it was running. I recently received the 1.3 release. Now, I am unable to click on the previously established connection to my Cache server (as seen in the Serve Explorer. I see the connection and the little arrow (implying that there is a hierarchy of items underneath). But, clicking that arrow opens nothing. Ultimately, I was trying to access files on the server so that I could add some new ones to my existing Atelier Project.