Article
· Jul 18, 2016 15m read
Remote proxy objects via dynamic dispatch

This article created as side effect of preparations to the longer set of articles about simple, but still handy MapReduce implementation in Caché. I was looking for relatively easy way to pass arguments to (potentially) multiple targets via remote calling facilities. And after several attempts I have realized that we do have very powerful mechanism in the Caché ObjectScript which might be of particular help here – dynamic dispatch for methods and properties.

7 7
0 1.1K

Hi,

I am new to Cache and I am trying to convert a JSON string (msgdata) that contains a JSON payload to an object to be saved into a Driver. Entity table. I am running into 2 issues and would appreciate any help:

1) It seems that when the 1st element of a list within the payload (Choices) is an empty string, after I call %ConvertJSONToObject, the obj.%data("payload").Choices contains just 1 empty element, removing the next 3 valid values (10,20,30). The same does not happen if I change the input to [10,20,"",30], in this case it works correctly.

0 3
0 969

Hello, guys.

I want to add a class to my project. This class is in UDL format.

I know that there is a method: ##class(%Compiler.UDL.TextServices).SetTextFromStream. The problem is that to use this method I need to know the name of the class (including all packages) in advance. But, a class can have any name(I mean C:/source/AAA/BBB/CCC.cls, but the real name is Sample.Human.cls).

For now I found only one way to get to know the name of a class - just parse the class code and search for a word which is followed by "Class" word. Is there any better way to do that?

1 6
0 374

Hello,

How to get XML subtree from XPATH.DOMResult object as Stream or CacheString.

Here is my classmethod. My system receives XML message which has nested structures. The requirement is to send one message at a time to the destination. I have created the XPATH document and used EvaluateExpression method and which returns XML.XPATH.Result of type DOM. I am able to read the dom and get value of the element and its text. But I am looking to send back the subtree.

Code:

0 8
0 1.1K

I have a Zen Mojo application, developed using Bootstrap plugin and using "Explicit Dispatch" with multiple templates.

I have every template representing an specific area of my application (customer, order, logon, application settings, etc.).

Each template has specific code, client side validation and so on related to its areas by using javascript.

0 2
0 295

I have two pages and I am using the push and pop to go and back navigation. When I click the button forward and back in the browser, I can't navigate more between pages.

The following code:

Page 1 - onSelect Method:
var obj = {idExame: VALID, objUsu: ObjUsu};
zenPage.gotoArea ('itemexames', key, key, false);
view.pushDocument (key, obj, key, obj);


Page 2 - onSelectMethod, back:

var documentKey = "PacienteExamesinitial";
var layoutKey = "PacienteExamesinitial";
var area = "pacienteexames";

1 4
0 357

I am looking for a database management tool I would have expected to find something like on the SMP website

Aim

show current database usage (ie size allocation) by database then table etc and allow continued drill down,

show information as a table, so can then sort by size to find the biggest item easily

also show it graphically

And then have ability to track and trend growth in size over time

identify a normal growth pattern

alert if variation (higher or lower) from normal based on recent trend

0 2
0 1.1K

I'm new to Cache and trying to follow the Using Cache Studio PDF. In section 2.4.3(Adding a Zen form) it tells you insert the following code;

<button caption="Save" o select="zenPage.saveRecord();" />

Unfortunately that code fails compilation. If you try and use the tools there is no o select option nor a select or onselect option. I was wondering if anyone has used this PDF before and knows what the correct attribute should be?

0 3
0 135

Customer is experimenting with %vid variable for selecting row numbering for sql queries. Basically he's trying to implement paging functionality.

He is confused that select %vid from (select ...) returns dummy number whilst select *,%vid from (select...) returns correct data.

1 4
2 1.6K

I have the following problem:

  • There are several classes with method generators, which needs to be compiled during every compilation
  • I have "ckub" qualifiers enabled in studio
  • I don't want to remove "u" qualifier because I need it very much in another namespaces

So how do I force classes with method generators to recompile when "u" qualifier is present?

0 2
0 1.2K

NewBie's Corner Session 3 More Read and Write commands & Multiple commands

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

Click on the Caché Cube in your system tray and select Terminal to try out the commands.

Write command with carriage return and line feed

When the exclamation point "!" is inserted after a Write command, a carriage return and line feed combination is produced. Note in this example, that a comma separates the exclamation point from the variable "X".

0 1
0 485
Question
· Jul 13, 2016
Overriding soap body

We can override soap body by using WriteSOAPBodyMethod. Something like:

Method Online(ByRef Obj1 As myClass1, Obj2 As myClass2, Output ObjOutput1 As myClass1Output(XMLNAME="Obj")) [ ..., WebMethod ]

{

s ..WriteSOAPBodyMethod="override"

d (..WebMethod("Online","ProcessRequest")).Invoke($this,"Online",.Obj1,.Obj2,. ObjOutput1)

s ..WriteSOAPBodyMethod=""

}

Method override(proxy As %SOAP.ProxyDescriptor, tag As %String)

{

}

0 1
0 370

Hello,

One of our AP would like us to provide the file upload/download sample code by using ZEN Mojo.

I already provided them the attached "upload-sample".

I tried to create the "download-sample" in a similar way, but I couldn't do it yet.

Does anyone have a good idea/sample about this?

I'd like to download the server side file(e.g. c:\temp\nene.jpg) into client machine with a OpenFileDialog(image.png).

Thank you in advance.

0 6
0 855
Question
· Jul 13, 2016
Access namespace files

Hello, guys!

I want to get access to the folder where all files of the namespace are stored using COS. I found a way to get access to class files and found a folder where all csp, html, css etc files are stored.

However, is there any folder which contains all files(even .mac and .int)?

Or, probably, there is a method which gives all files content?

1 2
0 338
Article
· Jul 10, 2016 4m read
NewBie's Corner Session 12 Do and Goto

NewBie's Corner Session 12 Do and Goto

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

InterSystems Caché provides a GUI (Graphical User Interface) based Integrated Development Environment (IDE) called Caché Studio. Developers can use Studio to create and maintain applications.

Controlling Process Flow

Controlling Process Flow means controlling the execution path of code. The execution of code flows from the top to the bottom in a routine, except for the following:

0 0
0 251

++Update: August 2, 2018

This article provides a reference architecture as a sample for providing robust performing and highly available applications based on InterSystems Technologies that are applicable to Caché, Ensemble, HealthShare, TrakCare, and associated embedded technologies such as DeepSee, iKnow, Zen and Zen Mojo.

Azure has two different deployment models for creating and working with resources: Azure Classic and Azure Resource Manager. The information detailed in this article is based on the Azure Resource Manager model (ARM).

12 4
0 11.7K

NewBie's Corner Session 11 Routine Line Types and Gotos

Welcome to NewBie's Corner, a weekly or biweekly post covering basic Caché Material.

InterSystems Caché provides a GUI (Graphical User Interface) based Integrated Development Environment (IDE) called Caché Studio. Developers can use Studio to create and maintain applications.

In this session we will cover Routine Line types; which are Label lines, Executable code lines and the Routine Header line as well as Gotos.

0 0
0 283

I am writing a static SOAP response to simply test connectivity. The end users is getting an error "Message: The processing instruction target matching [xX][mM][lL] is not allowed.", which I believe is related to white space. if I observe the response, it looks like there are two blank lines between the header and the body, which I'm guessing is the white space problem. But I can't seem to get rid of it.

Any ideas?

Code:

0 3
0 1.2K