Why can’t I resubmit messages to my From Translator component?

Introduction

Simple, there are no messages to resubmit!

This is because a From Translator component can only use Lua code to grab data (from disk, or a web service etc). Therefore a From Translator component never receives (queued) input messages — so there are no messages to resubmit.

Tip: For the same reason there is also no sample data available in a From Translator.

Issue [top]

Why can’t I resubmit messages to my From Translator component?

Solution [top]

If you need to resubmit data for a From Translator component you can re-process the original input data for the channel — by resending the original data from its external source.

For example:

  • If you are reading data from a file you can re-process the original data file (by moving it back to the input directory)
  • If you are using a web service then you will need to arrange for it to resend the data that you need to reprocess
  • The same process applies to whatever source you are using — the data must be resent

Alternatively for testing purposes only you could (temporarily) hard code test data within your channel that mimics the input you would receive. You can use iguana.isTest() to ensure that the test data is only used in the the Editor (test mode). If you take this approach we recommend putting the data in a local test module which can easily be modified or removed (rather than inline which is much less clean and tidy).

If you have any questions please contact us at support@interfaceware.com.

How it Works [top]

A From Translator component never receives queued messages because can only use Lua code to grab data (from disk, or a web service etc).

Conclusion: No input data is queued for this component, so there is no data to be resubmitted.

Clear as mud? Well lets approach it from the other direction.

There are three From components that receive input data for their scripts:

  • LLP Listener: Receives HL7 messages from a socket
  • From HTTPS: Receives data from a web service
  • From Channel: Receives queued messages from another channel

All of these components have a built-in listening/receiving function, and when they get a message it is queued and then passed into main() using the Data parameter.

A From Translator is different as it does not have a built-in listening/receiving function and uses code to grab data from disk. Therefore the Translator has no input data to pass to main() in the Data parameter, hence there is no queued input data.

Conclusion: No input data is queued for this component, so there is no data to be resubmitted.

Leave A Comment?