This morning on the old Caché Google Group, someone posed the following question, which I've decided to answer here, because it's interesting!

Is there a way to iterate ClassMethod's params, and get param's names and values?

The first answer I can come up with is: it's not easy! In any method, you could try to write code like this (where methodName is the name of your method)

Last comment 18 February 2016
0 3
0

answers

686

views

+ 6

rating

XData blocks in Caché classes has a MimeType property, and dcoumentation says

MimeType — The MIME type (more formally, the internet media type) of the contents of the XData block. The default is text/xml

But unfortunately I can't set any other values, such as text/html or application/javascript, because XData still expect only XML. 

So, question is, for what reasons this property was appeared?

It would be very usefull to set in this property anything other then text/xml, and Studio would highlighted it as developer expected.

Last comment 18 February 2016
0 4
0

answers

141

views

+ 3

rating

Hello,

I am trying to use %ZEN.proxyObject to send out in JSON format so I do:

    set tProxyRequest = ##class(%ZEN.proxyObject).%New()
    set tProxyRequest.notanumber = "28001"
    set tProxyRequest.aboolean = "true"
    
    set tBody = ##class(%GlobalCharacterStream).%New()
    do ##class(Ens.Util.JSON).ObjectToJSONStream(tProxyRequest,.tBody,"aelotwu")
    w tBody.Read()

and I get:

{
        "aboolean":"true",
        "notanumber":28001
}

But I want this:

{
        "aboolean":true,
        "notanumber":"28001"
}

 

Help please !

Last comment 17 February 2016
0 6
0

answers

597

views

0

rating

In preparation for a presentation I need a  real-world LDAP schema that has been customized a bit beyond the basics.   Perferably this would be based on an OpenLDAP system which would make it easier to merge into this presentation. 

 

If you have such a schema you would be willing to share please respond or contact my directly at Rich.Taylor@InterSystems.com

Thanks in advance.

Rich Taylor

Last comment 17 February 2016
0 2
0

answers

141

views

0

rating

Here is my original query:

SELECT EventType, InitiatedAt, COUNT(*) as cnt
FROM HS_IHE_ATNA_Repository.Aggregation
WHERE EventType = 'LOGIN'
AND LocalDateTime > '2016-02-16 11:00:00'
GROUP BY EventType, InitiatedAt

This gives me data like this:

LOGIN%SYSTEM69918
LOGINOTHER39


However, I need to get the data back as two columns with all but the last concatenated and delimited, more like this

Last comment 17 February 2016
0 4
0

answers

798

views

0

rating

Hi,

Given a log file with these records representing, hypotethically, the ‘movements’ or changes in residential city, for citizens, like this: 

 ID           CitizenRef           RelocationDate                 City                        Surname
...
 48          1000                       2015-04-01                          Boston                  Smith
 49          1000                       2015-07-01                          Seattle                  Smith
 50          1000                       2015-10-01                          Boston                  Smith
 51          1000                       2016-01-15                          NewYork             Smith
...

Note - Smith (1000) lived in Boston, Seattle, and again in Boston (2015) and finally, in NewYork (2016). He has multiple entries in this log

Last comment 16 February 2016
0 6
0

answers

198

views

0

rating

Hi,

We do have a production including a SOAP.OutboundAdapter that make a request to a .NET WCF Service. The response from that service vary in size. When it come to large one, we talk about maybe 8000 records (with 6-8 attributes per record) in xml, the adapter always give a timout. Even if we put a high number of seconds or set -1. After 1 1/2h still nothing get back. It's just standing there and waiting for ever.

Our .NET developer have look at it (on the WCF-service)  and from ther point of view they say that it seems like Ensemle can't handle such big responses.

In .Net it.s possible to put the property "maxReceivedMessageSize" when they expecting large size responses.

Is it possible to do the same in ensemble or is it another best practise to solve this problem?

Sincerely, Michael Lundberg

 

 

 

Last comment 12 February 2016
0 3
0

answers

224

views

0

rating

I'm revisiting some older projects that can benefit from the new JSON support and dynamic object capabilities in 2016.1 FT / 2016.2 FT. (Particularly, some of the really new features in the latest 2016.2 FT.)
For the particular thing I'm working on, it would be very handy to be able to merge objects, similarly to https://api.jquery.com/jquery.extend/. The closest thing I've found so far (in 2016.2 only) is:

Set o1 = {"a":1,"c":2}, o2 = {"b":1,"c":1}
Write "o1: ",o1.$toJSON(),!
Write "o2: ",o2.$toJSON(),!
Write !
Write "Merge two objects into a third (new) object, with values from o2 overwriting those from o1 when property names are shared: ",!
Set o3 = o2.$compose({"returnValue":o1.$clone()})
Write "o3: ",o3.$toJSON(),!
Write "o1: ",o1.$toJSON(),!
Write "o2: ",o2.$toJSON(),!
Write !

Last comment 12 February 2016
0 4
0

answers

241

views

0

rating

I'm writing some custom functions for use in a routing rule.  I have a few that are working, but right now I'm trying to use one that has no parameters.  Typically this would be a sub instead of a function, but I'm not familiar enough with Cache to know what I need to do here. 

Here is the code

Last comment 11 February 2016
0 4
0

answers

200

views

0

rating

I've searched the ObjectScript reference for any instances of Upper, Lower or Case and the only thing is a case/switch statement.  In all the documentation I can only find SQL and Cache Basic references for things like UCASE.

So how do I do this in ObjectScript?

 

For instance,  if (ucase(dtype)="G") { }

Last comment 8 February 2016
0 4
0

answers

120

views

0

rating

Has anyone come up with a way to create a separate thread of processing that can achieve shared access to a set of objects created from the initials process?  The situation is this.  There is a large complex set of objects representing a business process.  Some of these objects are in-memory only.  The desire is to spin off a separate thread that could do some ancillary processing on this data set without slowing down the main process.   Any thoughts?

Last comment 8 February 2016
0 5
0

answers

495

views

0

rating

Most of projects on Caché, obviously, written not only in Cache ObjectScript, and should contain sources in other languages. Such as js or css for web-projects or any others. And it would be pretty good, if I could see all of files in one project, and possible to edit all of them. How to be in this case ?

And I think it is not a good idea, to place all project's sources in one root folder. Our project contains over 3 thousands classes and routines, and it is too difficult to find anything in such folder. Is not a good for it to use Java-way, and place every package in subfolder ?

Last comment 8 February 2016
0 3
0

answers

196

views

+ 5

rating

The minimum interval between invocations of the adapter by the Ensemble framework. For adapters that poll for external events, this is the polling interval. However, most polling adapters will process all inputs immediately if several are detected at one time. This is also the interval at which each Business Service will check for shutdown requests.

Is it seconds or what?  The default is 15  

Last comment 5 February 2016
0 4
0

answers

228

views

0

rating

I'm designing a workflow for PHR via FTP.  What I've done is create a single FTP adapter to pick up files from multiple customers.  A router then accesses a lookup table and determines if a particular customer is allowed to send a particular message type to the state.  If not, the message doesn't go out.  It seems like everyone is against this approach (other than my CEO, thankfully), including Intersystems:

Our recommendation though is to create separate interfaces to retrieve PHR data from individual
participants. This configuration ... gives us the ability to disable an individual data feed without affecting other other participants.

This seems like a terrible practice to me, but before explaining my reasons I wanted to see what everyone else thinks.

Last comment 5 February 2016
0 3
0

answers

177

views

0

rating

Hi, 

is it possible to integrate a csp file as the default page in the IIS 7?

I want reach http://localhost/csp/sys/UtilHome.csp over http://localhost/

 

Bill McCormick wrote in the GoogleGroup 

"There was a known problem with this in the 5.0 release and has been 
fixed. It will never work out of the box. You have to define a CSP 
application of the name "/" - the config manager used to invalidate this 
but putting it in the cpf worked - I forget if that is fixed or not. 
After that it should all just work. Feel free to log an issue with 
support if it still fails in anyway. "

 

But I didn´t understand this solution. 
I hope someone can help me.

 

Best regards 

Armin 

Last comment 3 February 2016
0 4
0

answers

278

views

+ 1

rating

Hi,

I created an iKnow domain, where I supplied dictionaries, blacklist, metadata and stemming. The datasource is a table.

I would like to use iFind semantic search feature. It is said in the documentation that iFind use iKnow semantic analysis. But I want iFind to use the iKnow  domain configuration I created earlier earlier. How can I do that ?

Regards,

Jack Abdo.

Last comment 1 February 2016
0 3
0

answers

172

views

0

rating

Hi!

Is there any simple way to query data about processed messages in all Ensemble productions?
What I ultimately would like to do is to periodically export that data to another system and run statistics on it.

I've been digging around in the SQL tables view and Ens.MessageHeader seems to contain most of what I'm after.
Using ODBC I could access that table view and query data, but only for one namespace per DSN it seems.

Can Ens.MessageHeader from different namespaces be mapped into a single namespace so that it can be accessed with ODBC?
Or is there a better way to access this data than to use the ODBC interface?


Thanks
Andreas
 

Last comment 31 January 2016
0 5
0

answers

254

views

0

rating