Application ACK not working

I trying to get ACK back from the destination to the sending system.

I configured the Business Services to Ack Mode Application but sending system is getting Ensemble generated ACK [7] not destination ACK [9].

This is Ensemble 2018.1.1.312.0.

Ultimately I would like a NACK back when I have a Business Rule that blocks a messages from sending to Business Operations but currently [5] is an ACK |AA

|.

  • 0
  • 0
  • 136
  • 4
  • 1

Answers

Ah, I see. For some reason I assumed you were attempting to NACK based on un-routed messages.

Did you configure the Response From value in the Business Process to specify the Business Operation from which you want the NACKs relayed?

Configuring the Response From did the trick to get ACKs, and NACKs from the Business Operation to original sender.

The second part was to NACK based on un-routed messages. Is this possible?

I see in RoutingRule [ruleSet, rule, when] I can add a otherwise and a transformationDTL into a NACK to target back to the Business Service.

Will this work?

I guess it's worth trying, but I have a gut feeling that it won't work. If it doesn't ...

You could accomplish this in a BPL, but you would have to build the response logic from the BO along with the filtering/routing logic.

You could alternately create a custom BO that simply generates NACKs and set the send target in your otherwise to that ... just override the OnMessage() method:

Class HICG.HL7.Operation.NackFactory Extends Ens.BusinessOperation
{

Parameter INVOCATION = "Queue";

Method OnMessage(pRequest As EnsLib.HL7.Message, Output pResponse As EnsLib.HL7.Message) As %Status
{
    Set pResponse = ##class(EnsLib.HL7.Message).%New()
    Set pResponse.DocType = "2.3.1:ACK"
    Do pResponse.SetValueAt(pRequest.GetValueAt("MSH"),"MSH")
    Do pResponse.SetValueAt("ACK","MSH:9")
    Do pResponse.SetValueAt("MSA|AE|"_pRequest.GetValueAt("MSH:10")_"|No Destination","MSA")
    Do pResponse.%Save()
    Quit $$$OK
}

This is obviously not robust code, but it does generate a NACK as a response object for every message sent to it, and if the BP is configured to forward responses from the Production BO created based on this, you'll get what you're looking for.

Comments

Are you attempting to do this with a routing rule, a BPL, or some other custom BP type? I don't believe you can do what you want directly with a routing rule.

I am doing this with a routing rule.

When working with Ensemble, with Ack Mode set to Application on the Business Service, it is supposed to respond with the ACK acquired from the Business Operations.

This is not happening. Is this a bug?