I'm currently working on a Business Process Language (BPL) project where I'm using ##Class(%SQL.Statement).%ExecDirect to execute a SQL query. The query returns more than one row, and I'm facing an issue in handling the result set.
1) What's the correct way to check for an existence of a segment? So far I have been doing this by checking to see if a required field is non-null, and this seems to work but is a bit clumsy. In this case, it’s an X12 message being checked in an IF action in BPL:
Initial questions have been answered. Expanded the post with actual code (see below)
So, I'd like to update one (and preferably) more context-fields in my ensemble BPL business process based upon the information in the request that initiates said BPL proces. I got a few questions about that:
I have several stored procedures that when I execute them they will only return a single snapshot. In my BP I have been setting this to a Snapshot variable then looping using a WHILE through the snapshot variable just to get that single value.
Since it is only a single row, is there an easier way where I don't have to do a WHILE loop to pull the values out of that row? Can I call First Row or something like that to get me just the row into the Snapshot variable?
Created a business process and ticked "Is component".
Later trying to use it as component from another business process, and when trying to set up target for a call activity, selecting process components does not show anything in the list.
I have a case where our EMR is sending data, but not all the values needed for the Ancillary are valued properly and causes that message to error/halt processing on the Ancillary system, not ideal but its what they do. I would expect them to still process the message except that 1 field, but they don't.
I want to add validation to make sure certain fields are valued correctly for the Vendor.
So I add some statements to take those items that don't pass this validation out to a batch file with headers.
I am still trying to track down orphaned messages and have noticed that when we have Business Rules that send to a Business Process that some times there is an orphaned message that is generated as result of that send.
I had an interesting scenario come up, as when we moved from eGate to Ensemble and we will be moving to IRIS here in the near future I was taught to create Business Processes for writing to and extracting data from outside MS SQL Databases.
I'm currently working on a BPL (Business Process Language) in InterSystems Ensemble, and I'm facing an issue when trying to call the SendRequestSync() method within a code activity. My understanding is that SendRequestSync() is part of Ens.BusinessProcess, and since Ens.BusinessProcessBPL extends Ens.BusinessProcess, I believe it should be accessible.
However, during compilation, I'm encountering an error stating that the method doesn't exist in the class.
when ever I pull the xml file from business services and its failed in business process and I am getting the below error.
ERROR ErrPreviouslyCrashedMessage: Message '117' crashed previously.
Suppose I have an image and need to convert that image into a PDF for inclusion in an HL7.
I know that Zen Reports can display an image in a PDF but I do not want to view the image in a web page. I just need to convert the image to PDF in a Process and then include that PDF in an HL7. The workflow would be like this:
Get image -> Convert image into PDF -> Include PDF in HL7 OBX.
I know how to do the last part to include PDF in HL7 OBX. Just need ideas on the first part.
I am calling a business rule from one of my business processes and I noticed that when the business rule reports an error that the business process calling that rule just stops without any errors. Resultingly it fails to trigger the scope - catch-all construction that is surrounding the business rule. I know that it is possible to view the errors in business rules in the business rules log, but I really like to push an error message to Ens.Alert or something similar when my business rules report an error. How do I achieve that?
Hello, we have a couple of BPL processes. This works with a limited amount of messages but we run into issues when we process thousands of messages in a session. One BPL calls a Validation BPL process with async='False' and there is a response defined. The timeout is two seconds and that seems to be plenty of time for the validation process. I expected the calling process to wait for a response but that is not happening.
I have a BPL that calls a business service (actually does lots of other things unrelated to my question). We receive an acknowledgement back containing data that is processed in the BPL and sent to the source system. The process of sending to our downstream system "A" and receiving the response takes about 20 seconds per transaction (very slow on system A's side). Due to this slowness, we end up with a backlog close to 1000 messages by the end of the workday.
I have a Business Service that reads a file from a folder and sends it as a string to a Business Process. In the business process, I need to add a string to the end of the file string that is coming into the Business Process. I am trying to do this in object script in studio and I am struggling to figure out how to add the string to the end of the other string. I am still new to studio and object script I have been reading up on the documentation and I am not sure what is the best way to accomplish this.
I have a production with a HLv2 HTTP Listener.
For demo purposes, I need to send HL7 messages directly from a browser. Here is an example (React/typescript):
I have this response, which is a FHIR location resource in a bundle. I would like to load the entry(0).resource into a context property defined as HS.FHIR.DTL.vR4.Model.Resource.Location so I can use it as a source in a DTL. Any help would be greatly appreciated. Thanks.
when I run the process I end up with the following error:
----
ERROR <Ens>ErrBPTerminated: Terminating BP Propirion.BP.GetServices # due to error: ERROR <Ens>ErrGeneral: Object is immutable + ERROR <Ens>ErrGeneral: Object is immutable
----
I have created a context named : HL7Message type of: EnsLib.HL7.Message and in the start of the BP assigned the request to it (using set in assigned activity)
I am trying to write a generic process that will take any incoming message but would like to know where it came from so in my code I would like to do something like this
If (Document.Source="some serviceorProcess").
Just to be clear in the route you get these features is there a way of accessing them in code
We have defined four BPL Business Processes. One gets occasionally errors when pool size is two. No errors happen with pool size one. The error happens on calling %Save() on a large objects with many references to other objects.
Error #5803: Failed to acquire exclusive lock on instance of 'classname'.
I am working on a BPL to take data from a MS SQL database and create an HL7 Materials Message for our EMR. I have done this plenty of times in the past however I am running into an error.
"Remote Gateway Error: JDBC Gateway SP execute(0) error 0: Access to the remote server is denied because no login-mapping exists."
What is confusing is that this BPL doesn't differ from any of my other BPLs in connecting to MS SQL Server. I know I am missing something..
I am using the EnsLib.File.PassthroughService class in the business service, this business service will accept a text file from a location and pass it through to the BPL as a stream. I have been trying to work with the BPL in the GUI and I have been reading the documentation and trying to get it to work but I can not I continue to get errors and I am not sure why.
I will attach the Photos of what I have been trying, I think there is a problem with my call action because when I try and trace the message the context of the file does not even make it to the business operation.
Is it possible to hide certain properties in a class from displaying in the BPL visual editor, if you want to prevent drag and drop from accessing them or otherwise controlling or restricting their behavior?
Virtual document messages, such as EnsLib.HL7.Message, have hidden fields, such as Source, that do not show, presumably since the field list is rebuilt from the document schema. Setting the flag Internal, or XMLPROJECTION = "NONE" doesn't do it. Trying to follow the Virtual Document precedent to rebuild or edit the field list seems like a heavy list.
Hello, I am writing some cache code that will pick up a PDF file, Base64 encode the contents and then send on to a third party system within a Long String (via their API). I have been testing this and discovered that the PDFs do not open within the supplier system (I get an error saying that it hasn't been decoded correctly). I wanted to prove that the issue does not lie with the way that I have Base64 encoded it within Ensemble, and therefore as a test wanted to Encode the PDF stream, then decode the stream and write out to a new file.