Hi Henk-Jan,
If the message is OK, we have to send a CONTRL saying: message
received and structure OK. But if message is NOK, we have to send a
CONTRL saying: your message does contain an error, without specifiying
it (like you do in an APERAK).
So the following mapping should do the trick:
mport bots.transform as transform
import time
def main(inn,out):
ref = transform.unique('messagecounter')
out.put({'BOTSID':'UNH','0062':ref,'S009.0065':'CONTRL','S009.0052':'D','S009.0054':'3','S009.0051':'UN','S009.0057':'EGG504'})
sender= inn.ta_info['frompartner']
receiver= inn.ta_info['topartner']
out.ta_info['topartner'] =sender
out.ta_info['frompartner'] =receiver
out.ta_info['testindicator'] = inn.ta_info['testindicator']
out.put({'BOTSID':'UNH'},
{'BOTSID':'UCI','0020':'SearchForMessageRefInSourceFile','S002.0004':sender,'S002.0007':'14','S003.0010':receiver,'S003.0007':'14','0083':'4','0085':'18'})
out.put({'BOTSID':'UNH'},{'BOTSID':'UNT','0074':out.getcount()
+1,'0062':ref})
So do you suggest that an additional should be run, querying the DB to
select errors and generating a CONTRL for those errors (one per
message)?
Thanks for your feedback!
JF
On Apr 26, 12:40 am, "
hjebb...@gmail.com" <
hjebb...@gmail.com> wrote:
> actually a confirmation is only send if the message is OK.
> but, as always, there might be a solution in Bots ;-))
> I use this at the moment in a test-service: if you send an email as with DESADV D 01B to
easydes...@gmail.com, you will get an errorreport back.