This question came on the Ensemble in Healthcare email list. It's a great question. I'm working on an answer, but am posting it here to get any other input. I'll also address the option of using %CSP.REST.

Hello everyone,

 

Using Intersystems Healthshare/Ensemble, I am trying to make a RESTful Interface between Android/iOS app and Cache database. I have some queries and I am unable to find where exactly I can get any resources on them.

Last answer 10 May 2016 Last comment 25 March 2016
0 2
6207

views

+ 2

rating

Greetings! This article describes yet another simple way of creating installers for the solutions based on InterSystems Caché. The topic covers applications, which can be installed or completely removed from Caché with one action only. If you are still documenting installation instructions that have more than one step to do to install your application — it’s high time you automated this process. 

Last comment 10 May 2016
0 6
983

views

+ 5

rating

I am trying to execute a system query. - %SYS.Journal.File_Search()

The Query is looking for a Journal File Name and a String.

However, the Query line accepts no parameters. - Query Search() As %Query(ROWSPEC = "Offset:%Integer")

But in the SearchExecute method if checks for File and String.

ClassMethod SearchExecute(ByRef qHandle As %Binary, String As %String, FileName As %String . . .
{
                i $g(String)="" q $$$ERROR($$$JournalFileSearchUndefined)
                i $g(FileName)="" q $$$ERROR($$$JournalFileUndefined)

Can anyone help me understand how the String and FileName is passed into the query?

 

Last answer 9 May 2016 Last comment 10 May 2016
0 2
478

views

+ 1

rating

Our company is looking for someone with expert object script skills and experience developing with REST using Caché. We have an existing application that currently supports a mobile application and a web application. The API is up and running but we need another developer to add new features and keep up with demand.

Experience with Amazon AWS is highly desired as the api is running on Windows in EC2. Familiarity with GitHub is also required.

Pay can be negotiated on a per hour basis after you provide an estimate for the time required to complete a given feature.

We are looking for 25-30 hours per week. If you are interested, please contact developers@pionetix.com

 

0 1
0

comments

203

views

0

rating

I was writing a routine that called some class methods and when I typed in ##class( and the package, there was a drop down list of all the classes that match that package but when I selected one of the dropdown entries it added the package name again.

For example if I enter ##class(dim.

I am presented with a list of classes in the dim package but when I selected one of them,(dim.OccupationList), what ended up in the editor was

##class(dim.dim.OccupationList

Last answer 9 May 2016
0 1
0

comments

234

views

+ 1

rating

Hi!

Want to share with you code snippet of try catch block I usually use in methods which should return %Status. 


{ 
 try {
  	$$$TOE(sc,StatusMethod())
 }
 catch e {
 	set sc=e.AsStatus()
 	do e.Log()
 }

Quit sc 
}

Here $$$TOE is a short form of $$$TROWONERROR macro.

Inside macro StatusMethod is any method you call which will return %Status value. This value will be placed into sc variable.

In case of sc contains error execution will be routed to try catch block. You can wrap any Status methods calls in your code if you need to catch the errors coming from them.

In try catch block I place my logic and have to mandatory calls:

s sc=e.AsStatus() to get the status of error.

D e.Log()  - to place all the stack of error to standard Application Error log which you can find in Management portal on this page

Last comment 9 May 2016
0 7
1187

views

+ 2

rating

The purpose of this post is to raise the profile of a powerful mechanism that has long been available to us, and to open a discussion about ways in which it can be used or abused.

You can read more detail about the mechanism here. To summarize, your class definition can use the Projection keyword to reference one or more projection classes. A projection class can implement methods that get invoked at key points in the lifecycle of your class.

A projection class must extend %Projection.AbstractProjection and will typically implement at least one or the following methods

Last comment 9 May 2016
0 10
799

views

+ 7

rating

I have a class which, in the previous instance, was able to extract metadata field names and data from a text file, and load this information into a domain. I am trying to run this in the field test instance, but it is not loading the metadata - only the field names. I am not getting an error, but the data is not loaded.

The few changes I made to the original class:

Previously, this class also ran iTables. I commented all that code out.

To create the domain, I replaced the line:

  set tSC = ##class(HSTA.DomainExpert.utils.DomainUtils).%CreateDomain(dname,.domoref,ikcfgName)

with two lines:
  set domoref = ##class(%iKnow.Domain).%New(dname)
  set tSC = domoref.%Save()

Also, the newly created domain does not show in the iKnow Architect "Open" menu, but it IS available in the Knowledge Portal

Last answer 8 May 2016
0 1
0

comments

226

views

0

rating

I have a scenario where I am calling a business operation which populates  and returns an EnsLib.SQL.Snapshot via dynamic SQL to a Business Process. I then want to iterate over this snapshot and call a RecordMap Operation to write those records to a delimited file.

Is this the correct way to do something like this? If so, does anyone have a sample which illustrates its correct usage?

When the snapshot is returned I save it into a context variable with:

set context.Snapshot=callresponse where the pOutput variable of the operation is set to EnsLib.SQL.Snapshot.

Would I then use a While block where the condition is context.Snapshot.Next() ? This seems to give an error

Last comment 6 May 2016
0 2
0

answers

268

views

0

rating

We are in the process of putting a new UI on the existing product documentation, including a mobile-optimized view. We also plan on releasing additional "solution based" documentation that is targeted at common usage scenarios or important configuration tasks.

We are interested in your feedback on our current product documentation - what you like and dislike and especially what changes you would expect to see to make it as useful as possible.

Last comment 6 May 2016
0 9
606

views

+ 3

rating

You may experience errors executing Java programs that rely on the JAVA_HOME environment.

For example when Create PDF from this pivot in DeepSee or in this case, outputting a Zen Report as PDF.

You can verify the PDF generation configuration by clicking on the Verify Now button on the Management Portal System > Configuration > Zen Report Settings page:

  

 

Outputting a Zen Report as PDF causes an error, for example ZENApp.MyReport.cls in the SAMPLES namespace:

 

Using the URI Query Parameter $LOG=1:

0 1
0

comments

252

views

+ 1

rating

Good afternoon, I have working prototypes of each of these approaches. I do not have an expansive cache background.

I have a couple of projects where I am ingesting files from disk.

The name of the file contains a lot of the information I will need to reference the file in the future.

What are the advantages and dis-advantages of these two approaches:

Store the whole filename and use SqlComputeCode to populate properties in a class?

Last answer 5 May 2016 Last comment 5 May 2016
0 1
283

views

+ 1

rating

On the class reference %Library.GlobalCharacterStream is marked as deprecated in favor of  %Stream.GlobalCharacter.

How I can migrate the data from class properties defined as %Library.GlobalCharacterStream to the new one %Stream.GlobalCharacter? 

Does the %Stream.GlobalCharacter have the same SQL support from %Library.GlobalCharacterStream?

Thanks.

Last answer 2 May 2016 Last comment 4 May 2016
0 3
561

views

+ 1

rating

Hello,

I am trying to router a custom message using the content of one of its property, but this property is a List. ¿How I can do it?

The rule could be something like this

<rule name="">
  <constraint name="msgClass" value="Test.TestMessage"></constraint>
    <when condition="Document.myList.GetAt(1).property1=&quot;AA&quot;">
      <send transform="" target="DummyOperation"></send>
      <return></return>
    </when>
</rule>

But this rule doesn't compile.

TestClass is a simple Request Class like this:

Class Test.TestMessage Extends Ens.Request
{
Property myList As %ListOfObjects;
}

¿Any help?

 

Last answer 4 May 2016 Last comment 4 May 2016
0 2
288

views

+ 1

rating

Hi,  The ZEN Mojo Widget reference at ../csp/sys/%ZEN.Mojo.WidgetReference.bootstrap33xHomepage.cls is a great reference for viewing the different components available with each helper plugin - and it also supplies snippets of JSON code to use in your layout definitions.

 

I'm having problems with the Bootstrap $navbar component however. This is layout definition, with a navbar and button contained within the bar.:

Last answer 4 May 2016
0 1
0

comments

178

views

0

rating

I was trying to modify the REST.DocServer sample in the SAMPLE namespaces to use the new %Object and %Array system objects (Ensemble 2016.2 build 636) with the following changes:

/// This method returns a list of namespaces for this server

ClassMethod GetNamespaces() As %Status

{

    #dim tSC As %Status = $$$OK

    #dim tList,tNS,tFilteredList,tValue As %String

    

    #; Get the list of namespaces

    Do List^%SYS.NAMESPACE(.tList)

    Set tNS="" For  {

    

        Set tNS=$Order(tList(tNS),1,tValue) If tNS="" Quit

    

        #; Only want namespaces which are enabled and are not remote

        If $List(tValue,1)=1&&$List(tValue,2)=0 {

            Set tFilteredList(tNS)=""

        }

    }

    

    #; If we have been asked for json

    If $Get(%request.CgiEnvs("HTTP_ACCEPT"))="application/json" {

      

Last answer 3 May 2016 Last comment 3 May 2016
0 3
254

views

0

rating

I get NOROUTINE when I try to call a label in a routine in another namespace:

 

d someLabel^|”OTHERNAMESPACE”|someRoutine(inputVar,.resultByReference)

 

Two questions:

1.  What is wrong with my syntax for calling a label in the other routine, versus just the root of the .int/mac?

2.  Can I pass a parameter by reference when using extended routine reference?

 

Last answer 3 May 2016
0 1
0

comments

265

views

0

rating

Hello,

It is time for me to eat my own dog's food and start implementing unit test running with coverage :) I will be inundating IRC with questions at this point, but I have a more general question first.

In this tutorial, it is supposed that your unit tests are exported as XML first... But that's not very practical. Is there a way, instead, to run all tests from a given project without having this export?

My first thought on how to do this would be to

Last answer 20 April 2016 Last comment 2 May 2016
0 1
325

views

+ 1

rating

On the Mac...

I've defined a Cache Connection to my local server. It worked for the last two days, but after an uninstall/reinstall of Atelier, it stopped working. The stack trace has these entries:

java.lang.RuntimeException: Can't read from secure storage node /com.intersys.eclipse.connmgr/ensrc

Caused by: org.eclipse.equinox.security.storage.StorageException: No password provided.

Regardless of the above problem, it made me wonder how I would delete the bad connection, or edit it, to change the Web Server port number for example. I don't see anything in Atelier Preferences. Trying to add a new connection using the same name doesn't work either. Is there a way yet?

Last answer 8 April 2016 Last comment 2 May 2016
0 1
483

views

+ 1

rating

Hi,

Is it possible to have a ZEN Mojo application that uses Bootstrap and controls from jQMobile ?

In a fresh installation running Zen Mojo version 1.1.1, my ZEN Mojo page declares:

Parameter CSSINCLUDES As STRING = "bootstrap-3-3-5/dist/css/bootstrap.min.css,jquery.mobile-1.4.5.min.css";
Parameter JSINCLUDES As STRING = "jquery-1.10.2.min.js, jquery.mobile-1.4.5.min.js,jquery-1.11.3.min.js,bootstrap-3-3-5/dist/js/bootstrap.min.js";
..

and a pageContents of:

Last answer 28 April 2016 Last comment 2 May 2016
0 1
302

views

0

rating