You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm confused about the variables $sender and $receiver in Command on Message Receipt .
Would the $sender be Partner AS2 Identifier, and the $receiver be Organization AS2 Identifier?
My test
Organization AS2 Identifier: supplier
Partner AS2 Identifier: tradingpartner
Advanced Settings - Command on Message Receipt
echo"$receiver got a message from $sender"
When I send the message from tradingpartner to supplier, I expect the log would be
supplier got a message from tradingpartner
but I got:
tradingpartner got a message from supplier
Code Trace
The variables are defined at /pyas2/utils.py:
defrun_post_receive(message, full_filename):
"""Execute command after successful receive, can be used to call the edi program for further processing"""command=message.partner.cmd_receiveifcommand:
logger.debug(f"Execute post successful receive command {command}")
# Create command template and replace variables in the commandcommand=Template(command)
variables= {
"filename": os.path.basename(full_filename),
"fullfilename": full_filename,
"sender": message.organization.as2_name,
"receiver": message.partner.as2_name,
"messageid": message.message_id,
}
variables.update(message.as2message.headers)
# Execute the commandos.system(command.safe_substitute(variables))
To swap sender and receiver values would more fit the meaning.
I'm confused about the variables
$sender
and$receiver
in Command on Message Receipt .Would the
$sender
be Partner AS2 Identifier, and the$receiver
be Organization AS2 Identifier?My test
supplier
tradingpartner
Advanced Settings - Command on Message Receipt
When I send the message from
tradingpartner
tosupplier
, I expect the log would bebut I got:
Code Trace
The variables are defined at
/pyas2/utils.py
:To swap
sender
andreceiver
values would more fit the meaning.The text was updated successfully, but these errors were encountered: