#Ensemble

23 Followers · 2.3K Posts

InterSystems Ensemble is a complete and easy-to-use integration platform that enables users to connect people, processes, and applications in record

time.

Learn more

Documentation

Question Colin Brough · Nov 21, 2023

How do we trigger a BPL Business Process on a time schedule?

We are building a production that takes a steady stream of (HL7) lab results messages, processes them and stores them in a temporary database table. At scheduled points during the day (eg 0800, 1300, 1600) the database is queried and messages sent on to the downstream system. Aiming that the Processes to be implemented in BPL if possible - but we are having trouble triggering code in a BPL as a scheduled job.

We can get an ObjectScript class method to be run via the Task Manager - but we are not clear how to pass control into the B

12
0 742
Article Megumi Kakechi · Dec 7, 2023 2m read

InterSystems FAQ rubric

To resolve the error <PROTECT>, remove the read-only attribute of the system-wide library database (IRISLIB for InterSystems IRIS, CACHELIB for Caché/Ensemble/HealthShare (Caché-based))

Once you have finished importing the routine, remember to change it back to read-only.
 

[Version 2013.1 and above]
[Management Portal] > [System Administration] > [Configuration] > [System Configuration] > [Local Database] Uncheck "Mount read-only" from the database name link.

[Version 2011.1 - Version 2012.2]
[Management Portal] > [System Administration] > [Configuration] > [System

3
0 570
Question water huang · Dec 5, 2023

hi there,when object export to xml,i know that,it will call propertynameLogicalToXSD method,but i can`t find out that use %XML.Reader to parse XML to object  witch method will be called before ,

simple code like this:

Class Samples.NewClass2 Extends (%Persistent,, %XML.Adaptor)
{
Property OPDT As %Library.DateTime;
}

my xml is 

<NewClass2><OPDT>2023-11-30 11:07:02</OPDT></NewClass2>

and how parse it to object ,and not modify the xml?

4
0 498
Question Glenda Anaya · Jun 9, 2016

Hi,

We recently updated Ensemble, on our Unix DEV server , from version 2013.x to 2015.2.3 (Build 855U) and when we test our SSL/TLS configuration we get the following error:

ERROR #729: Certificate /qmd/ens_chldev_1/mgr/SILCert/SILCSSSJR-CER.cer is not valid for TLS Web client authentication .

The certificate was working fine before the update in DEV and it is working fine in our PROD Unix server with Ensemble 2012.x.  Any ideas why we are getting this error?

Regards

5
0 2342
Article Mihoko Iijima · Nov 30, 2023 3m read

InterSystems FAQ rubric

Class definitions created by users are stored in class definition classes. They can be used to obtain a list of class definitions from a program.

Note: Class definition classes refer to all classes contained in the %Dictionary package.

In the sample code below, a list of class definitions is obtained using the query Summary of the class %Dictionary.ClassDefinitionQuery.

Class ISJ.Utils
{
ClassMethod ClassInfo()
{
    #dim ex As %Exception.AbstractException
    try {
        set currentNS=$NAMESPACE
        while (1) {
            read "Please specify namespa
2
0 619
Question Nezla · Dec 3, 2023

Hi Guys,

I have a client posting me JSNON file using a Get action and I'm using the below code to retrieve the data:

Class SX3.Production.HTTP.GetPSRequest Extends Ens.BusinessService [ ClassType = "", ProcedureBlock ]
{Parameter ADAPTER = "EnsLib.HTTP.InboundAdapter";Method OnProcessInput(pInput As %CharacterStream, Output pOutput As %CharacterStream) As %Status
{
    Set pOutput=##class(%GlobalCharacterStream).%New()
    Set tSC=##class(Ens.Util.JSON).ObjectToJSONStream(pInput,.tJsonPayload,"aceloqs")
    set jsonString = tJsonPayload.Read($$$MaxStringLength)
      ^data=jsonString
 

issue

6
0 303
Question Nezla · Nov 30, 2023

Hi Guys,

Do we need to configure something in ports so that we can use it in a production?

I've a production with 8 running services and recently added a new service with new port but unable to get it working  

raising error 404.

When using an existing port that is used by current running service, my new service works fine but not when using a new port, I've added the new port to inbound rules in the firewall bit still no luck, so is there something I need to do to in Ensemble ?

Thanks

3
0 255
Article Megumi Kakechi · Nov 23, 2023 1m read

InterSystems FAQ rubric

When executing OS commands, use $ZF(-100).

do$ZF(-100,"",program,args) // Execute the Windows command [synchronously].
do$ZF(-100,"/ASYNC",program,args) // Executes a Windows command [asynchronously].

When executing OS shell commands such as mkdir and copy, also specify /SHELL.

do$zf(-100,"/shell /async","mkdir","c:\temp\x")

Please refer to the following documents for details:

About $ZF(-100) [IRIS]
About $ZF(-100)

2
1 543
Question Nimisha Joseph · Nov 23, 2023

I'm pretty new to ensemble.I'm working on a BPL process where I need to retrieve a result set from an SQL activity, loop over the results, and call a web service. I'm having trouble passing the request parameter(Labtype) into the SQL query for the WHERE condition .Can any one suggest how to loop over the result set as well.Any suggestions on how I can achieve it?

7
0 510
Article Enrico Parisi · Nov 18, 2023 3m read

 I think WebTerminal is an outstanding project, kudos to @Nikita Savchenko 

One useful functionality is missing, the the ability to run Operating System (Linux or Windows) commands.
In many cases WebTerminal is used when access to the OS is difficult, so having the ability do run simple OS commands from WebTerminal would be a big advantage.
Using "normal" terminal, be it Windows IRIS console, Windows Telnet or within "iris session" in linux is simple, from the IRIS terminal prompt just precede the OS command with "$" or "!".
See the article "Terminal tip: Running OS-level commands" from @Joh

1
0 402
Article Megumi Kakechi · Oct 19, 2023 2m read

InterSystems FAQ rubric

A tool (^GLOBUFF utility) is available to check the database cache usage for each global variable.

You can run the utility directly or programmatically in the %SYS namespace.

Here's how to run the utility directly:

USER>zn "%SYS"
 
%SYS>do ^GLOBUFF
 
Find which globals are using the most buffers.
 
Display the top <25>:     → Press Enter  // Default is to display top 25 globals
 
Total buffers: 102400     Buffers in use: 6926     PPG buffers: 77 (1.112%)   // Global name, database name, percentage occupied by the buffer
 
Item  Global                             Database    


5
1 932
Article Mihoko Iijima · Nov 9, 2023 1m read

InterSystems FAQ rubric

To create a user-defined error you need to prepare the XML that describes the error code and corresponding message that you want to use as a user-defined error.

Please set the error code as a negative integer.

<?xml version="1.0" encoding="UTF-8"?> 
<MsgFileLanguage="en"><MsgDomainDomain="UserErrors"><MessageId="-111"Name="MyError">An error has occured</Message> 
    <MessageId="-222"Name="MyError2">An error has occured 2</Message> 
  </MsgDomain></MsgFile>

Once the XML file is created, load it into the namespace you want to use.

setx=##cla
2
2 717
Question Colin Brough · Nov 13, 2023

We are successfully using System Default Settings to manage differences in settings across environments where the production and underlying code are otherwise identical. However, the TestingEnabled and LogGeneralTraceEvents settings don't appear to be settable via this mechanism. While we appear to be able to set them on the SDS page, they do not show up as selectable when resetting the settings on the Production Settings tab in the management portal - see screenshots below. Is there any way of managing these two settings so we can have development and test servers running with TestingEnabled

3
0 347
Article Stefan Cronje · Nov 6, 2023 2m read

Hi folks,

I have published a new package on OEX.

In short, it is a string datatype that support various configuration options and flexibility.

Business Case

  1. You have some library classes and other reusable structures that you use across systems.
  2. You have a "multi-tenant" environment where one code base is shared amongst tenants, which each have their own namespaces configured.
    1. Specific rules and business processes are stored in that tenant's namespace.
    2. The core class structures are the same.
    3. Tenants have different data validation requirements and some want data consistency across s
0
0 403
Article Mihoko Iijima · Nov 2, 2023 3m read

InterSystems FAQ rubric

For routines (*.mac)

You can hide the source by exporting/importing only the *.obj that is generated after compiling the source program.

The command execution example specifies EX1Sample.obj and EX2Sample.obj, which are generated by compiling EX1Sample.mac and EX2Sample.mac, as export targets and exports them to the second argument file.

After moving to another namespace, I am using the exported XML file to perform the import.

USER>do$system.OBJ.Export("EX1Sample.obj,EX2Sample.obj","D:\routine.xml")       
Exporting to XML started on 10/23/202311:33:49
Exportin
1
0 660
Article Mihoko Iijima · Oct 26, 2023 2m read

InterSystems FAQ rubric

Information on properties defined in a class can be obtained using the following system classes:

%Dictionary.ClassDefinetion

%Dictionary.PropertyDefinition

The code description example is as follows.

Class ISJ.Sample
{
ClassMethod getPropInfo(classname As %String)
{
    set cls=##class(%Dictionary.ClassDefinition).%OpenId(classname,,.status)
    if $$$ISERR(status) {
        write "Specified class does nt exist",!
        quit
    }
    set x=cls.Properties
    for i=1:1:x.Count() {
        // Get property info (%Dictionary.PropertyDefinition)
    
0
2 630
Question Nezla · Oct 23, 2023

Hi Guys,

We currently for reason I'm getting too many locks in the system (around 990 locks) and is making the system slow

most of these locks are on globals 


I have a method that sets values in some globals every minute which I guess will place a lock on each one and expecting the system would just automatically release them afterward, use to be fine before but for some reason now the list of locks keeps growing, so is there way to just release the lock after setting values in my globals  because I don't need them locked anyway?

Thanks

11
0 770
Job Jaceita Chilton- Walker · Oct 24, 2023

If interested email to me at jwalkerbdrsolutionsllc.com

Ensemble/IRIS Developer to join our growing team! This position will be performed virtually from the individual's home office working on EST time schedule. This position requires US Citizenship with a Public Trust or the ability to obtain one.
(Military Veterans are highly encouraged to apply)
Role Overview
BDR is in search of a proficient InterSystems Ensemble/IRIS developer to contribute to our Department of Veterans Affairs (VA) contract. The ideal candidate will have a solid background in InterSystems IRIS development within a healthcar


0
0 435
Question Tey Kitthajaroenchai · Sep 26, 2019

Hi community, 

I created a business operation class using the FTP Outbound Adapter, and it works when configured for SFTP but when I try to use it for FTPS, it does not work as expected.  The connection is established, it creates the file on the destination server but then is disconnected in the middle of the transfer and the PutStream returns 0 and never seems to finish the write of the file.  Anyone have any idea of what's happening or any steps I can try to troubleshoot?  

Thanks in advance.

Info:

Connected to FTP


2
0 795
Question Colin Brough · Oct 17, 2023

Pointers please for debugging a SOAP web-client.

We have several clients in different productions all accessing a web-service. We are trying to add another client in a new production, and its not working. The messages between the relevant Process and the SOAP web-client Operation are the same in the working and the non-working productions. But the web-service is reporting an XML parsing error to the non-working production. Here's the error as reported in the SOAP web-client Operation...

Is there any way to see the output of the web-client Operation - what Ensemble is actually sending out?

3
0 441
Article Mihoko Iijima · Oct 12, 2023 1m read

InterSystems FAQ rubric

ObjectScript allows you to pass any number of arguments using arrays. Do it by adding ... after the argument name.

An example is as follows. In the example statement, the argument information is set in a global variable (a variable stored in the database) so that it can be easily checked after the method is executed.

Class TEST.ARGTEST1 Extends%RegisteredObject
{
ClassMethod NewMethod1(Arg... As %StringAs %Boolean
{
 kill ^a
 merge ^a = Arg
}
}

The result of running it in the terminal is as follows.

USER>DO##class(TEST.ARGTEST1).NewMethod1(1,2,3,4,5)
US
1
0 520
Question Colin Brough · Oct 6, 2023

We are trying to call a SOAP web-service from Ensemble, following the documentation here: Creating an Ensemble Web Client | Creating SOAP Services and Web Clients with Ensemble | Caché & Ensemble 2018.1.4 – 2018.1.8 (intersystems.com)

While the version of Studio on our system doesn't display exactly the same options as described when using the SOAP Wizard, it did create a set of classes that look to be covering the correct bases - a set of Request and Response classes relating to the methods presented by the web-service, as discovered via the WSDL, and an Operation class and a few (9) SOAP cl

2
0 256
Question Jordan Everett · Oct 10, 2023

Hello! I just had a quick question for anyone out there with more experience on deploying Ensemble productions.

I'm currently trying to export my Ensemble production WITH the Business Partners so I don't have to rebuild or add to that table after I import my Ensemble Production. I know that this is a small thing and doesn't actually affect anything in the production in terms of performance, but I like to have it for better documentation.

I've tried including it in my export, but I'm unable to find it and I'm wondering if there is something obvious that I'm missing?

3
0 257
Question Michael Davidovich · Sep 20, 2023

When making a synchronous request to a custom business process and there's an error and  0 is returned, it seems that the response is not sent back to the custom business service.  Rather, a Ens.MessageHeader with IsError=1 is returned without a message body (which would normally be the response object).

I tried using ##class(Ens.MessageHeader).%OpenId($$$JobCurrentHeaderId).IsError to check the error status but I keep getting the node that $$$JobCurrentHeaderId compiles to is undefined.  There's clearly a Ens.MessageHeader object being sent back to the process, but I can't access it.  My sol

2
0 277
Article Megumi Kakechi · Sep 28, 2023 2m read

InterSystems FAQ rubric

In the sample below, an image file is encoded into a Base64 string in a class property, saved, decoded again with Base64, and restored to another file.

【Usage class】

Class User.test Extends %Persistent
{
Property pics As %GlobalBinaryStream;
}


【When importing】

  set x=##class(User.test).%New() // create a new object

  // prepare an image
  set file=##class(%File).%New("c:\temp\Mii.png")
  do file.Open("RUK\BIN\")
  for {
       if file.AtEnd=1 quit
       // Convert image to Base64 format in chunks of 1024 bytes
       set cnt=file.Read(1024)
       se
2
2 726
Article Mihoko Iijima · Oct 5, 2023 1m read

InterSystems FAQ rubric

On Linux, use the iris command to execute a routine or method from a shell and get the return value.

For more information,  please refer to the document "About Instance Connections".

An example of a command is as follows.

iris terminal instname [arguments]

The return value of a shell script can be specified using a special variable using the Terminate() method of the %SYSTEM.Process class when the process ends, rather than by specifying an argument in the QUIT or RETURN command that is specified when a routine or method ends. Use the method of returning a value to

2
1 574
Question Corentin Blondeau · Oct 2, 2023

Hello,

I have a method in an operation wich return a list of %String (listId).
I call it multiple time in a Business Process and want to have all the lists I get put into one.
Not having "set context.listIdProcess = callresponse.listId" , but a way to add the elements of listId in context.listIdProcess.

There is an other way than append each element of the list?


Thanks for yours answers,
Corentin

7
1 348