Business Operation

Syndicate content 12 

Hi,
We recover a large amount of data from an external database (SQLServer, about 1 million rows in JDBC).
However, we have treatment time issue.
This process takes more than 30 minutes whereas on a "classic" SQL Server Management Studio type request takes less than a minute.

While searching on the internet, I came across this article: http://makejavafaster.blogspot.com/2015/06/jdbc-fetch-size-performance.html
It explains how in Java, we can tweak the FetchSize parameter of the JDBC driver to optimize this kind of process.

Is there a way to access this JDBC parameter through the EnsLib.SQL.OutboundAdapter adapter?

If not, how do you deal with this kind of situation of large volumetry

Last answer 20 September 2018 Last comment 7 days ago
0   1 5
164

views

0

rating

I am trying to base64 encode a string with non standard characters encoded in utf-8 also tried windows 1252  and I am getting error like so 

 

ERROR <Ens>ErrException: <ILLEGAL VALUE>zEncodeStream+18^ -- logged as '-' number - @' set encString = $TRANSLATE($SYSTEM.Encryption.Base64Encode(streamString),$C(10,13))' 

any help appreciated if anyone has faced this before

 

Last answer 10 April 2019
+ 1   0 2
0

comments

44

views

+ 1

rating

IRIS and Ensemble are designed to act as an ESB/EAI. This mean they are build to process lots of small messages.

But some times, in real life we have to use them as ETL. The down side is not that they can't do so, but it can take a long time to process millions of row at once.

To improve performance, I have created a new SQLOutboundAdaptor who only works with JDBC.

BatchSqlOutboundAdapter

Extend EnsLib.SQL.OutboundAdapter to add batch batch and fetch support on JDBC connection.

Benchmark

Benchmarks released on Postgres 11.2 with 1 000 000 rows fetched and 100 000 rows inserted on 2 columns.

alt text

Prerequisites

Can be used on IRIS or Ensemble 2017.2+.

Installing

Clone this repositor

0   0 1
0

comments

53

views

0

rating

Hi dev community,

I am currently working on a project to send documents to a RESTful based API that supports bearer 
Token Authorization.

When we try to fire a JSON request from our EnsLib.Rest.Operation towards the 3rd party API with a 
valid Token we keep receiving Authorization Error codes HTTP 401 back.

If we use the same request and same Token from a test utility such as Postman the request is 
successful and we are able to move past the authorization stage.

We are inputting the Token in the header of the HTTP request as specified by the 3rd party API 
specification. We therefore are using the following code from the operation side, being tHttpRequest%Net.HttpRequest  object

Last answer 21 February 2019 Last comment 27 March 2019
0   2 3
158

views

0

rating

Hi

We have just completed a migration of a test environment from Ensemble 2012 to Ensemble 2017 on a new server. This is the last in a series of migrations but the first to encounter this particular issue. All web clients making SOAP requests to a particular external web service are receiving a fault that states:

The SOAP action specified on the message, '', does not match the HTTP SOAP Action, 'http://<expected target service action follows here>'.

Further investigation using ^ISCSOAP and a comparison with other working environments reveals that the SOAP request is completely missing the <SOAP-ENV:Header> element.

This absence of a SOAP header occurs for multiple Operations in more than one Namespace for this newly migrated server, yet it is present in every other environment, all of which use the same source code.

So, is there a single installation-wide setting that could be causing this behaviour

Last answer 22 March 2019
0   0 1
0

comments

37

views

0

rating

I am having an intermittent issue that when I make a call to MSSQL from a BPL that the response does not come back in the amount of time required. Since the call from the BPL is synchronous I tried changing the timeout to 60 but it has not helped (see below). Is there anyway to guarantee that the call waits long enough for a response before continuing on?

 

Thanks

Scott Roth

Last answer 20 March 2019 Last comment 21 March 2019
0   0 3
57

views

0

rating

Hi All,

I created a Business Operation to Integrate with Amazon S3.
I have used HTTP Outbound Adapter for the same. Used Get method of Adapter Class.
Basically in a request I want to send Unique File Name and File and in Response I want to get Version ID and if operation was successful, then set flag to true.

I have created a class for request in that I have two properties, as shown Below :
   

    Property fileName As %String;
    Property file As %GlobalBinaryStream;

This is in my Operation Class
 

            set pResponse = ##Class(SaveFileResponse).%New()
            set fileName = pRequest.fileName
            set file = pRequest.fil

Last comment 4 February 2019
0   0 2
0

answers

151

views

0

rating

Hi All,

Actually I am trying to implement a RESt API where in I will get ZIPCODE as request and I need to call external API which will take ZIPCODE as input and give State and City in response.

But the problem is the request is in XML Format and also response is in XML format.

Example :

https://XYZ.com/ABC.dll?API=CSLookUP&XML=<CSLookupRequest USERID="USERID">
<ZipCode ID='0'>
<Zip5>20024</Zip5>
</ZipCode>
</CityStateLookupRequest>

and in Response 

<?xml version="1.0" encoding="UTF-8"?>
<CSLookupResponse>
    <ZipCode ID="0">
        <Zip5>20024</Zip5>
        <City>WASHINGTON</City>
        <State>DC</State>
    </ZipCode>
</CSLookupResponse&gt

Last answer 24 January 2019 Last comment 24 January 2019
0   0 2
83

views

0

rating

Running predictive models natively in an InterSystems IRIS Business Process has of course always been the goal of our PMML support, but somehow never made it into the kit because there were a few dependencies and choices that needed addressing and answering. Anyhow, thanks to some pushing and code kindly provided by @Amir Samary (Thanks again Amir!), we finally got it wrapped in a GitHub repo for your enjoyment, review and suggestions.

Last comment 24 January 2019
+ 1   2 3
114

views

+ 1

rating

I'm writing a SOAP client in Ensemble (2017.2.2) that is required to pass empty elements to the SOAP server in the form <xsi:type="ns:ResponsibleUser"/> where ResponsibleUser is a class that itself has no properties. I initially thought I'd found the answer with the XMLIGNORENULL parameter of XML enabled classes but this didn't make any difference for SOAP requests, only working when I wrote the XML to a file. Then I came across the XMLIGNORENULL parameter for the SOAP client class (inherited from %SOAP.WebBase), but this only works for %String properties and not for properties of arbitrary class types.

Is there a way to force the output of an empty object-valued property as an empty element in a SOAP request?

Thanks in advance for any guidance

Last answer 15 January 2019
0   0 1
0

comments

100

views

0

rating

I created the Process to extract the required data from ADT message to a Dynamic Object. I wanted to send the JSON stream to EnsLib.File.PassthroughOperation operation and generate a file with the content of JSON stream.

Here are the codes for Process:

set oMetadata = ... /// metadata is from ADT message which is dynamic object

set jsonRequest = ##class(%ZEN.Auxiliary.jsonProvider).%ObjectToJSON(oMetadata)
set tSC = ..SendRequestAsync(..JSONOperation,jsonRequest,0,,..MetadataContext)  /// send the jsonRequest to operation

Here are the errors in the operation: "ERROR <Ens>ErrGeneral: No MessageBody classname for MessageHeader

Last answer 12 December 2018 Last comment 9 January 2019
+ 1   0 3
193

views

+ 1

rating

I am trying to explore some new possibilities outside of the normal day to day HL7 interfacing we do. I have only done 1 other Web Service interface but it was using a SOAP proxy wizard. Now I am tasked with trying to make a call to an external API 

https://npiregistry.cms.hhs.gov/api/

but I am a bit confused about how to go about doing it. Since they don't have a wsdl, this means it is a REST web service correct? or is it considered an API call? When I read the documentation it feels like it is more geared to building REST services/operations within Ensemble then connecting to one on the outside, am I missing something here.

Can someone help clarify this for me?

Is a API considered a Web Service? 

Am I missing something in the Documentation?

Thanks 

Scott

Last answer 1 December 2018
+ 3   2 5
362

views

+ 3

rating

Is their a way to queue messages in a business operation to be processed later? I want to process messages over a certain size on a schedule, but let everything else process in real time. Is their a way to do this with one business operation or would I have to queue the large messages in a different business operation?

Last answer 13 December 2018
0   0 1
0

comments

124

views

0

rating

Hi

Totally new to IRIS and Cache.

Trying to evaluate it and work out how we could use it.

As a standard application database. Object or relational etc. does not matter. 

Issue is ObjectScript.

So:

1) Can we develop, maintain and use an IRIS database and never use ObjectScript i.e. use only Java, Python, C++ interfaces etc. (exactly which one does not matter)? Would that make designing and using the IRIS database more prone to inefficiency and error?

2) Can we import an existing Cache database into IRIS and convert its ObjectScript code into Java, Python whatever? Is that a big, difficult, error-prone job?

If the answers are no that may not be a showstopper but would like to know it now. 

A lot of training will be involved in any case I know and Oracle has PL/SQL but ObjectScript developers are rare.

Apologies if the answers are in the doco. Have read some of it but need some indication about the above urgently.

Last answer 14 November 2018 Last comment 14 November 2018
+ 1   0 2
239

views

+ 1

rating

I am working on my first REST operation concept and had a question about the Property Parameters. If I put a value in CAPTION, does that mean that when I use it in my call that it will come out in the URL?

For example...

Property enumerationType As %String(CAPTION = "enumeration_type");

Then in my operation...

Set tURL=..Adapter.URL_"?q="_pRequest.enumerationType

so when it builds the URL it looks like..

Last answer 10 November 2018 Last comment 9 November 2018
0   0 3
106

views

0

rating

HealShare 2017

Hi dev community,

I am currently  working on an interface that needs to communicate to a SOAP/ITK endpoint.

I am using the EnsLib.ITK.AdapterKit.Operation.SOAPOperation to interface with an ITK 
service, but it is proving to be more complex than originally expected to set up the web client 
against that particular end-point since I haven't been provided with a WSDL from ITK service side as 
the vendor state they are following the ITK standard and no WSDLs are needed.

I have set up an EnsLib.ITK.AdapterKit.Operation.SOAPOperation within Health Share production and 
we are currently trying to fire some test messages (I am able to send ITK/SOAP requests via 
POSTMAN successfully, and I would like to replicate the same behavior now from the ITK operation). 
 The first blocking stone I am finding is in one of the config settings for the ITK operation

0   0 1
0

comments

74

views

0

rating

We have many sFTP business operations that work successfully.  I just modified an existing one to point to a new IP and Port, as well as use new credentials (username and password only).  When I attempt to sFTP a file, I receive the following error.

ERROR <Ens>ErrFailureTimeout: FailureTimeout of 15 seconds exceeded in EnsLib.FTP.PassthroughOperation; status from last attempt was ERROR <Ens>ErrOutConnectFailed: SFTP Connect failed for sftp.pmpclearinghouse.net:22/OARRS PMP/SSL='!SFTP'/PubKey=''/PrivKey=''
with error ERROR #7500: SSH AuthenticateWithUsername Error '-2146430958': SSH Error [80101012]: Authentication failed (username/password) [FFFFFFFF80101012] at Session.cpp:277,0

Last answer 22 March 2017 Last comment 26 October 2018
0   0 5
939

views

0

rating

Hi!

We would like to retry message so that it's restored to end of operation's queue. This is in situation where order of messages is not needed to be handled by Ensemble, there is version number in message data and receiving application can ignore incoming message if necessary.

We would try to send message until it's accepted (or manually suspended), but this should not block operation's queue.

We have already this in actions:

D - Disable the Operation, log an error and restore the message to the front of the Operation's queue.

Would be nice to have one like this:

Q - Disable the Operation, log an error and restore the message to the END of the Operation's queue.

Best Regards

Mauri

Last answer 10 October 2018
0   0 2
0

comments

123

views

0

rating

This article will provide tips and tricks on customizing Ensemble business hosts with configurable settings.

Ensemble production Settings are configurable values that control the behavior of a production and its hosts.

The documentation for adding and removing Settings and specifying categories and controls for Settings is provided at the link:

http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EGDV_prog#EGDV_prog_settings

“To provide new settings for a production, a business host, or an adapter, modify its class definition as follows

Last comment 9 October 2018
+ 5   1 7
1412

views

+ 5

rating

I am having an issue with the output file format on a production where quotes (" ") around column values are being removed from the imported file.  For example, my input file is a csv formatted as such: "123", " ", "ABC".  The output file format that is being generated produces: 123, , ABC.  I need the output file to retain the quotes around the data.

Is this something that can be corrected in the record map?  Or is it an issue elsewhere?

Last answer 17 September 2018 Last comment 17 September 2018
0   1 2
110

views

0

rating

Hello,

I am trying to send a HL7 Billing Batch 2.3:FHS file out to an FTP site:

The file needs to be  in Variable Length / Carriage return carriage control format--  

 When I send the file, the format is Fixed Length 512 Byte Record-- Not Working

The data is ok within the file-- It is just the way I am sending it out of Ensemble that is not correct.

I am thinking that it is a setting within the Operation that I am missing or not choosing correctly.

Charset-AsciiCR

Separators -|^~\&\r

Default Char Encoding: Binary

I appreciate the help,

Herb

Record format:      Fixed length 512 byte records

Last answer 13 September 2018 Last comment 13 September 2018
0   0 2
71

views

0

rating

Hi, 

Connections/ SOAP Operations to 3rd Parties can hold some challenges like the 3rd party changes it 's structures/ WSDL  and returns an additional property in a SOAP response. So I have tried to implement the XMLIGNOREINVALIDTAG in the proxy SOAP response structures , but in Ensemble this seems to get ignored.

Are there any good suggestions on how to handle this an ideal would have been that the other party inform you of changes before hand....

Or we can ignore the tags, and inform the operations of such problems but the rest of the response message is valid and could be processed

Best regards

Last comment 11 September 2018
0   0 2
0

answers

103

views

0

rating

Below is a simple alert processor based on the EnsLib.HTTP.OutboundAdapter  to send text alerts via an SMS Gateway service. Typically, all that is needed to send an HTTP Post to the gateway service is the destination phone number, a source phone number, credentials, and the URL.

The code below is based on the Anveo gateway whose interface is as follows

Last comment 10 September 2018
+ 4   0 5
586

views

+ 4

rating

In a EnsLib.REST.Operation I have...

Set tSC=..Adapter.Post(.tHttpResponse,,pRequest.stream)

This sends JSON string over HTTP

I am getting this error back from the server

ErrHTTPStatus: Received non-OK status 415 from remote HTTP server: 'HTTP/1.1 415 Unsupported Media Type'

I have been told that the media type should be "JSON"

how do I go about changing the media-type of the HTTP Request?

Last answer 3 September 2018
0   0 2
0

comments

302

views

0

rating

Hi,

I'm getting mad trying to get data from an external REST service that uses Basic Authentication from Ensemble. The BO worked fine when I was using a test server without authentification, but as soon as we need to go to production I cannot have it working.

So far, I've created the username/password at the credentials page (Ensemble-Configure-Credentials). I've setup the BO to use this credentials. But nothing happens.

I've tried with the Rest Client (addon for Mozilla), and using the same address, port and user/pwd works just fine.

So, the question is: how can I use the Basic authentication in a BO in Ensemble? Any help woul be highly appreciated :)

SOLVED: It was my fault... it was failing because of the proxy :P

Last answer 2 August 2018 Last comment 25 July 2018
0   0 6
417

views

0

rating

Hi, 

I am using a standard EnsLib.HL7.Operation.FileOperation to create files based on HL7 messages but I just realised that lines in the output file only contain CR (Character Return) but no LF (Line Feed). It is really important to have both as another system picking those files will fail otherwise...

Is there any way to configure this?

Thanks

Last answer 26 July 2018 Last comment 27 July 2018
0   0 2
143

views

0

rating

Hi,

I have a question related with EnsLib.SQL.OutboundAdapter adapter.

Is there a way to open an oracle transaction and do either commit or rollback depending on the query result?

Is posible to keep open an oracle transaction to execute a lot of queries on different methods on the same business operation and do a commit when the business process finished?

Thanks and Best Regards

Sergio Vidal

Last comment 24 July 2018
0   0 2
0

answers

147

views

0

rating

I'm trying to add an Operation to store DICOM files but each time I add a Operation using the class EnsLib.DICOM.Operation.TCP it reverts into Services and I cannot work out why this is happening. I've tried following the guide online (link at the bottom) but the Operation still reverts to a Service.

Any pointers would be appreciated,

Thank you.

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...

Last answer 29 June 2018
0   0 2
0

comments

96

views

0

rating

I have a service that takes a file and pass it through to the production .While I am passing the file through I get the file stream and set it to a variable within my message and the variable is of type %Ens.StreamContainer. But after all processing and I need to write out my file to a pdf format The file gets written but is a corrupt file since I can not read it I have tried this with asimple pass through everything is fine .But here I do not know what I am doing wrong here is the operation cod

Last answer 22 June 2018 Last comment 29 June 2018
0   0 4
223

views

0

rating