Hello,
I'm using Atelier 1.3 with eclipse photon. I could not find an option to override (refactor) a classmethod function as was in studio.
Can someone help ?
- Log in to post comments
Hello,
I'm using Atelier 1.3 with eclipse photon. I could not find an option to override (refactor) a classmethod function as was in studio.
Can someone help ?
If someone want to have this new studio on IRIS 2019.1.0 cube:
After install of 2019.2 studio :
1. backup your IRIS/bin folder.
2. Copy everything from "C:\Program Files (x86)\InterSystems\IRIS Studio" to "C:\InterSystems\IRIS\bin"
and you will have a direct access from the cube to the new studio.
Hello Godfrey.
Can you please give more information about the problem you are facing ?
where do you have this "insert" button ? Is it in a CSP page you developed (if yes, the code might help here) or is it in the management portal ?
IRIS is a very good product, with many new capabilities.
However, as IRIS is available on 64 bit O/S only, customers running for Cache/Emsemble on (old) 32 bit O/S, will have to migrate those to 64 bit O/S before they can migrate to IRIS.
Another concern is if your current (Cache/Ensemble) is using external calls using COM objects (proxy classes to external DLLs).
It looks like that on IRIS this functionality was totally removed:
- The "activate wizard" in Studio no longer exists
- The %Activate package is also removed.
Hello,\
You may find documentation on how to work with streams here:
https://docs.intersystems.com/iris20191/csp/docbook/DocBook.UI.Page.cls?KEY=GOBJ_propstream
in BPL you can add a "code" element where you can create and populate your stream with data,. or you can add a "call" element to call a classmethod where you implement the code.
For example: to create a stream and write some data into it :
(if you need to have this stream data vailable for other components of the BPL it is best to use a %context property for it)
set stream = ##class(%Stream.GlobalCharacter).%New()
do stream.Write("some text")
do stream.Write(%request.anyproperty)
do stream.Write(%context.anyproperty)
in your request / response messages to pass to BO you will have to add a stream property :
Property MyProp As %Stream.GlobalCharacter;
Another improvement, would be: instead of using ^oddCOM use the class %Dictionary.CompiledClass and loop on Properties
this will give you compliance for future releases.
Both syntax are good. the %New can handle "," or ":"
Last version of Cache/Ensemble that support OpenVMS is 2017.1. IRIS does not.
Hi,
To get information about a namespace, You may use this code :
(run it only in %sys" namespace)
Properties variable is passed by ref (i.e. it has a point at the beginning)
%SYS>S Status=##Class(Config.Namespaces).Get("user", .Properties)
%SYS>zw Properties
Properties("Globals")="USER"
Properties("Library")="CACHELIB"
Properties("Routines")="USER"
Properties("SysGlobals")="CACHESYS"
Properties("SysRoutines")="CACHESYS"
Properties("TempGlobals")="CACHETEMP"
Hi,
Take a look on %Dictionary.ClassDefinition class.
you may get all the properties from Properties
Every class (with its methods) is compiled into an INT routine.
MOMLBL will help you diagnose performance on executed lines of code.
https://docs.intersystems.com/iris20181/csp/docbook/DocBook.UI.Page.cls…
Hi Ryan,
Ens.Request class does not contain any properties. so you should make a sub class and put a %String property.
Json is basically a string.
Example:
Class User.REQ.JsonRequest Extends Ens.Request
Property JSON As %String(MAXLEN = "");
Hi,
Methods and call to methods, like any other code you write, need to be reviewed and tested.
When you type in studio you will see a tool-tip with the current parameter position in bold. .png)
Some times, when you need to pass a huge number of parameters to a function/method you might put there in a key=value array and simply pass this by ref.
The class Security.SSLConfigs can give you an API to create SSL configurations.
Look at the "Create" classmethod.
Hello,
1. A deeper look on how you implement ed your indexes According to the "cost" it looks that the query is not optimized.
2. Do you have an index on "TranEffectDate" on "SDS_DATA._Transaction" table ?
3. I would recommend that you run this query (after improve of the "cost") with parallel processing.
Hello,
As I understand, you want to have Cache as a client, doing a post toward a secure web page.
For this you need to define an SSL "Client".
1. Go to "System Administration" --> "Security" --> "SSL/TLS configuration" --> "Create new configuration"
2. Give any name you want in "Configuration name" for example : SSL
3. Default values for "Type" = "client" and "Enabled"
4. Clisk "Test" button (before save) enter a web site (google.com) click "ok" then enter port = 443. You should get the following:
"SSL connection succeeded"
5. Save the configuration.
Using that SSL with %Net.Httprequest - https://irisdocs.intersystems.com/iris20191/csp/documatic/%25CSP.Documatic.cls?APP=1&LIBRARY=%25SYS&CLASSNAME=%25Net.HttpRequest
The trick is to use the "SSLConfiguration" property of %Net.HttpRequest class to store the name of the SSL configuration you have devfined earlier.
Here is a sample code :
S Req = ##class(%Net.HttpRequest).%New()
S Req.Server = "www.server.com"
S Req.SSLConfiguration = "SSL"
D Req.InsertFormData("name","value")
D Req.Post("/location/path")
S Res = Req.HttpResponse
I $IsObject(Req) D Res.OutputToDevice()
Hi.
You could do that with the following way
1. Define your own custom event class (inherit from %CSp.SessionEvents) then you may interact with the session creation/deletion:
2. In OnStartSession() callback in the event class, you may store the sessionId in your own global/table.
3. In OnEndSession() callback in the event class you may delete/kill your own data.
4. Pass the SessionId from the parrent window to the child (if you do not have it there already)
5. Have a timeout JS code to call the server using #server or #call every x sec. with a check of your own global/table for this SessionId.
If not exist - preform a "windowsClose" or a in-window message...
Here is more documentation abourt it :
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCSP_sessions
Hello,
If you need to save your class in more than 1 namespace, and you are using studio, you may do it automatically with studio hooks.
This is done in that way:
1. You create your own source control class which inherit from %Studio.SourceControlBase
2. you put your code in that class. For example you may use OnAfterSave method to run on all namespaces that your class need to be saved, loop on this list (except the current one of course) and save + compile your class (programmatically) in each namespace.
Hello,
If you mean to use "Internal" keyword, this will prevent the Class (Web) method from being displayed in the class documentation.
https://irisdocs.intersystems.com/iris20191/csp/docbook/DocBook.UI.Page.cls?KEY=ROBJ_method_internal
If this SOAP web service if for internal use, and should not be used elsewhere, I would go for an approach of secure this specific web service.
https://irisdocs.intersystems.com/iris20191/csp/docbook/DocBook.UI.Page.cls?KEY=GSOAPSEC
Hi.
Julius ConntQ function will give a wrong answer for ^Locations","Canada") since it will count also the "USA" nodes.
Here is a code that will do the trick :
ClassMethod Count(node)
{
S QLen=$QL(node) I QLen S Keys=$QS(node,QLen)
F Count=0:1 S node=$Query(@node) Q:node="" || (QLen && ($QS(node,QLen)'=Keys))
Quit Count
}
W ##class(Yaron.test).Count($name(^Locations))
5
w ##class(Yaron.test).Count($name(^Locations("USA")))
3
w ##class(Yaron.test).Count($name(^Locations("Canada")))
2
Hello,
You have a stream property which is a part of the request message that you pass to a BO.
Please be more specific with what exactly do you want to do with that stream ? (
for example:create a file, use it with rest, use it with SQL, iterate on a json/xml, store in db etc.).
Then we can help you.
When you create a class that the IDs are maintained by the system (standard class without modifying the storage, then there is a save mechanism to give a new ID to every new object that is being saved to the database.
Of course that when multiple users are saving new data simultaneously , a specific process ID after a %Save() might not be the last one in the table.
Hello,
Usually, when you have a BS calling a BP then to a BO, if all will have a "poll size" of 1 messages will go in-order.
Another option, if you do not want to work with "queues" you can work with "inproc".
Hi.
There is a version on stand alone studio 2019.2 on WRc that can connect to any version including old ones.
This is an only studio kit.
Hello,
your method returns %ArrayOfObjects so you need to create and populate it within your code...
your code should look like (I have highlighted the relevant changes in code) :
set booksRS = ##class(%ResultSet).%New("Library.Book,BooksLoaned")
set rsStatus = booksRS.Execute()
S books = ##class(%ArrayOfObjects).%New()
if rsStatus = $$$OK {
while booksRS.Next() {
set book = ##class(Library.Book).%New()
set book.Title = booksRS.Get("Title")
set book.Author = booksRS.Get("Author")
set book.Genre = booksRS.Get("Genre")
set dbFriend = ##class(Library.Person).%OpenId(booksRS.Get("Friend"))
set book.Friend = dbFriend
Set sc = books.SetAt(book,$Increment(i))
}
}else{
w !,"Error fetching books in GetoanedBooks()"
}
do booksRS.Close()
return books
Hello,
I have done many migrations from DSM -> Cache in the past, so I can share some of the knowledge here.
Basically there are two phases involved in the process:
1. Migration the DB itself (.i.e globals). For this you can use utility called %DSMCVT which will read the globals from a DSM DB into a Cache/IRIS DB. Sometimes a 7/8bit -> unicode is also part of the process, so an appropriate code for that should be written.
2. Migration of code, that, as mentioned before is the complex part of the process, as you need to rewrite/modify parts of your code that handle with O/S specific issues:
a. File system - all devices code is different (i.e. open/use/close commands) when working with files/directories.
b. Calls to VMS special variables/functions, need to be converted to "standard" code.
c. Some systems rely on VMS "batch queues" for scheduling jobs or for printing reports. This should be addresses as well.
d. Some systems rely on VMS FTP functionality. In this case you need to write the same functionality it inside Cache/IRIS.
d. Using tools, like "screen generator" tools that uses some CHUI non-standard" ANSI codes for on screen attributes, might need to be "adopted" to standard ANSI codes.
As mentioned before, the time/effort for such a migration, highly depends on the native of your application, and the way it was designed. for example if you have 1 central function to print a report (lets say it is in a global), then you need to modify only this function to have all your reports working on the new system. This also applies to "central" functions for reading/writing files, dates calculations etc.
Agree.
It would be nice to have a connector for ASB (Azure service bus)
Analytics (aka DeppSee) build it.
also... great advantage for Intersystems itself (to earn more for license upgrade).
Hello,
I recommend either ways:
1. copy the *.DAT file to new server: for this you need to dismount the DB on source before copy (so you have downtime), mount it and do a merge between 2 DB/Namespaces.
2. Do a (hot) backup for the DB that has the table = NO downtime (!) - then copy the *.BCK file to other server, restore to a NEW DB and merge.
This is slower - but downtime is 0