#Business Operation

4 Followers · 262 Posts

InterSystems Ensemble provides specialized business operation classes that use specific outbound adapters to communicate with external systems and UI.

Documentation.

Question Thembelani Mlalazi · Mar 16, 2018

I am trying to read data from MySQL Server 2012 to a stream  and I keep getting an error here is my code so far

ERROR

An error was received : ERROR <Ens>ErrException: <INVALID OREF>zGetBatchDetails+14^DDQTools.DQTGetBatchOpp.3 -- logged as '-' number - @' set sc=reStream.WriteLine(rec) '
< set tSC=$$$OK
 
  set ^tvalue=1
 
  set ^tvalue=$INCREMENT(^tvalue)
 
    #dim rs as EnsLib.SQL.GatewayResultSet
    #dim reStream as %Stream.GlobalCharacter
    if $$$ISERR(pRequest) quit pRequest
    set sc=..Adapter.ExecuteQuery(.rs,..GetTheSubmissionData(pRequest.pMonth, pRequest.pApp,
3
0 862
Question Thembelani Mlalazi · Mar 13, 2018

Hi guys have an operation that I would like to write the results from the results set to a csv file but have been struggling to get it to work here is my code so far and also here is the error that I get when I try to test this operation using the testing on the ensemble

error:

An error was received : ERROR <Ens>ErrException: <COMMAND>zMessageHandler+6^DQTools.DQTOpp.1 -- logged as '-' number - @' Set tSC=..CheckRequests(.pRequest,.pResponse)'
 
code:
 set file = ##class(%Stream.FileCharacter).%New()
 set fileName="C:\File\99_Testing\123.txt"
  do file.LinkToFile(fileName)
  while
8
0 648
Question Manikandasubramani S · Mar 10, 2017

Hi All,
      I need to route a file based on its type in Ensemble Production. But I don't want to write a Business Process code to achieve this. Am using FilePassThroughService to get a file.
     There are two FilePassthrough operations for different type of files. Is there anyway to achieve this using Business Process Rule itself?
      Also how to get the filename in Business Process Rule that comes from FilePassThroughService?

    Thanks in advance.

3
0 1130
Question Jorge Manuel García Benítez · Jan 25, 2018

Hi guys,

I have a technical question. I have a Ens.BusinessOperation which contains a main method with parameters "In" As Ens.StreamContainer and Output "Out" As Ens.StringContainer. Return type is %Status.
Can this method just do "Quit $$$OK"?.
Currently this BO is used for see messages in Full Trace View.
It is a correct way to proceed?

Thank you

2
0 513
Question Scott Roth · Jan 12, 2018

What happens if you don't declare a Persistent value when you call ExecuteQuery()? What does Ensemble set as the key value for your query? I have a query that I've executed on SQL Server, and I get 15 rows, but because this is my second time querying the data Ensemble thinks it exists. 

The Method in question is SelectProviderClarityAudit. If I call this query multiple times it is not returning the same number of results each time in Ensemble.

Class osuwmc.CPD.ClarityDBPoll Extends Ens.BusinessOperation [ ClassType = "", ProcedureBlock ]
{
Parameter ADAPTER = "EnsLib.SQL.OutboundAdapter";
Paramete

3
0 521
Question Thembelani Mlalazi · Dec 7, 2017

I am trying to transform an Enlib.EDI.XML.Document through aXLT I know how to trans form the xml document  through a xlt stylesheet but been trying to get an Enlib.EDI.XML. Document from a procees by creating aoperation that will do the transformation of this to file if this can be done in a process all ideas welcome  so far I have come to this and I keep getting an error

:ERROR{ERROR #5002: Cache error: <PROPERTY DOES NOT EXIST>zXMLTOJson+6^TestEnvironment.Custom.GENERAL.CUSTOM.XLT.XMLToJsonOperation1.1 *Parameters,EnsLib.EDI.XML}
Class XLT.XMLToJsonOperation1 Extends (Ens.BusinessOperation,
7
0 1023
Question Thembelani Mlalazi · Dec 12, 2017

I have a business operation which I want to run an d I keep getting the above error have tried trace and logging every stage but can not figure out why the error comes from I am expecting this service to run everytime it is called hence the implementation  so could anyone help out  please

Operation 

Class XmlToJsonOperation Extends (Ens.BusinessOperation, )
{
Parameter ADAPTER = "EnsLib.File.OutboundAdapter";
Property Adapter As EnsLib.File.OutboundAdapter;
Parameter INVOCATION = "Queue";
Property CompiledStyleSheet As %XML.XSLT.CompiledStyleSheet;
/// Style sheet to convert Message to
3
1 1731
Question Scott Roth · Nov 30, 2017

I have a process that I am trying to duplicate from SQL Integration Services (SSIS) into Ensemble so that the rest of my team can help support any issues that may happen.

This particular job creates multiple dictionary files, but for each one of the dictionary files it creates, it also creates a control file that tells the vendor what to process.

So example....I have a result set that is written to a.txt but I also need to create aa.ctrl, then I will have a b.txt and need a b.ctrl.

Using only one EnsLib.RecordMap.Operation.BatchFileOperation  for the control files, is it possible to pass the Fi

1
0 537
Question Scott Roth · Nov 3, 2017

I am trying to replace one of our SQL Integration Service jobs with Ensemble and I am running into an issue executing a query against a MS SQL database using JDBC drivers.

My SQL Outbound code looks like this.

Method SelectPaceartCharges(pRequest As osuwmc.Paceart.DataStructures.SelectPaceartBillingExtract, Output pResponse As EnsLib.SQL.Snapshot) As %Status [ ReturnResultsets ]{set query = "declare @currentYear int=datepart(year,getdate()) "set query =query_" declare @secondSundayOfMar datetime = CAST('3/8/' + CAST(@currentYear as varchar) as datetime)"set query =query_"
4
0 803
Question Kurro Lopez · Oct 20, 2017

Hi all,

For special definition of the company, we need to define a PoolSize according to the environment that the "Ensemble" is working.

So the first try as been add the parameter into "System Default Setting"

However, this parameter is not available in "Setting default values" in Setting tab.

I've opened the code of my production and I've noted that this parameter is a attribute of the XML element of this item

<Item Name="MyHostName" Category="DBU" ClassName="MyClass.BO.UserREST" PoolSize="5" Enabled="true" Foreground="false" Comment="" LogTraceEvents="true" Schedule="">
    <Setting Target="Host
1
0 575
Question Tom Philippi · Oct 11, 2017

I just deployed my production from test to acceptance but I found that the deployment misses some Soap Webclient classes which are used by my business operation components.I have used the management portal to create the deployment (i.e.production settings -> Export) and I expected that all classes used by the production were automatically included.Apparantly, that is not the case.Is this default behaviour for Ensemble?And can I somehow force Ensemble to automatically include these classes?

1
0 344
Article Zhong Li · Sep 25, 2017 5m read

1. Scope and Objective:

Recently we supported a few NHS cases that required TIE (Trust Integration Engine) integration with the PKB service.   Hence this article is meant to be a 10-minute quick guide to describe a demo solution (simple configurations and end-2-end implementation steps) for Health Connect (Ensemble) Integration with PKB (Patient-Knows-Best) service.

0
1 1623
Article Nathan Ng · Sep 6, 2017 4m read

Preface

Before we begin, I'd like to mention that I am by no means an Ensemble expert, so take this with a grain of salt and please feel free to offer any suggestions for improvement. That being said, I have enjoyed working with Ensemble and wanted to share the approach I took to poll an external REST API for patient data in the hopes that it might help others with a similar goal.

If you get bored easily and just want to see some code, feel free to jump straight to the example on github. It uses dummy data (for obvious reasons) but the core principles should be the same.

The Goal

The goal of the

5
0 1745
Question Guy Peer · Aug 28, 2017

Hi,

I have a process in which i call a rest operation in a while loop, get a response in JSON format of 50 issues, with paging, meaning this call will happen until the total amount of issues will be returned. each JSON is parsed into a proxyObject, and inserted to a list. later the entire list will be sent to an SQL operation which will write the data in the appropriate tables.

The problem i'm encountering, is when i use the "ASSIGN" action, with insert at a certain key (context.i=context.i +1  for each iteration of the loop), i get an Error  that says that the value 3 is invalid key.

i've

6
0 767
Question Eduard Lebedyuk · Jul 26, 2017

I'm trying to create asynchronous Ensemble service/operation pair for SOAP passthrough.

General configuration:

  • Ensemble Service receives a message and immediately returns an answer to a caller (message received or some error)
  • Ensemble Service asynchronously calls Business Operation
  • Business Operation  does guaranteed message delivery, etc.

Is it a viable approach?

Any tips? Ideas? Caveats? Code?

Seems like I can sublass EnsLib.SOAP.GenericService and change Sync to ASync (and provide a default reply immediately).

3
0 830
Question Eduard Lebedyuk · Jul 26, 2017

I have tried to create Ensemble SOAP passthrough operation following this guide.

Here's my production configuration (after steps 1-4):

Class Passthrough.Production Extends Ens.Production{XData ProductionDefinition{<Production Name="Passthrough.Production" LogGeneralTraceEvents="false"><Description></Description><ActorPoolSize>2</ActorPoolSize><Item Name="PassthroughOperation" Category="" ClassName="EnsLib.SOAP.GenericOperation" PoolSize="1" Enabled="true" Foreground="false" Comment="" LogTraceEvents="false" Schedule=""><Setting Target="Adapter" Name="HTTPServer">www.w
3
0 736
Question Murillo Braga · Jul 17, 2017

Hello mates,

When turning on the “Archive IO” option within the business operations, it provides us the capability of seeing the input and output communication with external systems. For instance, watching the messages sent out + ACK message sent back .

Our production has got a scheduled task that runs daily (by default I guess, as many others) and is in charge of purging “Errors and log files”. And this is likely to be linked to the “Archive IO” feature, right?

The thing is, after tweaking the variable to keep it for 7 days, it doesn't seem to be working, as messages older than 1 day will be

2
0 640
Question Kevin Brown · Mar 31, 2017

Is there a way to use a HL7 field value as part of the File Naming in the Business Operation FileOperation class.  I know we can do this in a custom class, but I was wondering if it could be done the default FileOperation class?

Example:

MSH-4 contains the value 12345

We would like to name the file 12345_YYYYMMDDHHMMSS.HL7

MSH.4 value here_%Y%m%d%H%M%S.HL7

It may not be possible, but I just want to see if anyone has any information

Thanks,

Kevin Brown

3
0 933
Question Kurro Lopez · Jan 26, 2017

Hi all,

Sorry to bother frown

I have a Business Object with SOAP.OutboundAdapter and it gets the response from a WebApi.

Following the sample Creating REST Services and Clients with Ensemble - Developing a REST Operation, I've done the call and it retrieves a JSon with the information. The result is a JSon with a Base64 content (at least 15000 bytes)

I've put a trace to check the content  with $$$TRACE(tHttpResponse.Data.Read() I have a cut result (to 1200 character), so the JSonStreamToObject is not able to allocate the full result into a object.

is there any way to handle more character in

6
0 633
Question Raghu Kodumuri · May 8, 2017

Hello,

I am wondering if there any mechanism available in the Healhtshare where send a request from the service to the operation without storing the Data on CACHE.DAT?

My company going to receive ADT's and CCDA's from an external source (Hospital), The incoming data will have two kinds of patients, our patients, and not our patients.  We do not want to keep the data on our servers of those patients that do not belongs to our company due to HIPPA complaint

Looking forward to hearing great ideas from this community.

Thank you

Raghu

3
0 417
Question Richard Housham · Apr 27, 2017

Hi I'm hoping the community will once more help me out with a question!

Right I have a production that takes an attachment from an email and processes it, sending out a hl7 message at the end. This works ok.

Now I just need to take the email and send it back out to a 'backup' email address, basically giving
a) A backup incase there is a problem with the email or something else further down the line.
b) A log of the emails receieved.

So I thought the best thing to do is have an operation with an email adapter and to send that my message.

That gave me some code that's basically like this.
Class eRefer

6
0 906