At the DTL level, how to Rollback a message so as to retry that message again

Consider the below scenario:

1. HL7 Service -> Process

2. DTL makes a call to a webservice (Post) via a REST operation via SendRequestSync call.

        a. if the post is successful, end the DTL

        b. if the server that hosts the webservice is down, i would like to keep retrying with the same message and not lose any messages in the queue.

does a simple "quit 0" at the DTL will  rollback the message and will retry? please let me know how not to lose any messages if the webservice server is down.

Appreciate it.

  • 0
  • 0
  • 203
  • 2
  • 2

Answers

I wouldn't use a DTL for process flow control.  I would have a BPL make those decisions and use the DTL strictly for transformation of the message.  The BPL diagram can then just fall through to the end once the REST call is successful.  The operation doing the REST call should then handle the infinite retry, Failure Timeout of -1 would tell it to never stop retrying as you said.

Hi!

     Assuming you meant "BPL" (Business Process Language) instead of "DTL" (Data Transformation Langue):

     If you simply want your Business Operation to try forever until it gets it done:

  •  On the BPL, make a synchronous call or make an asynchronous call with a sync activity for it
  •  On the BO, set FailureTime=-1. Also, try to understand the "Reply Code Actions" setting of your Business Operation. You don't want to retry for all kinds of errors. You probably want to retry for some errors and failure for others. If you set FailureTime=-1 and your Reply Code  Actions decides to retry for that kind of error, it will retry forever until it gets it done. If your Reply code Actions decides to fail for other types of errors, it will return an error to your Business Process.
  •  If you know that, for some errors, the BO will return a failure, protect the call you just did on your BPL with a scope action so you can capture this and take additional actions.

 

More about "Reply Code Actions" here.

 

Kind regards,

Amir Samary

Comments

May be set Failure time = -1 (at the REST operation component)?

Will that help, to keep retrying the same message until the connection is re-established with the external webservice server?

does any one know what 'quit 0' will do at the DTL level? Does this retry the same message? Appreciate it.