Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
get filename at routescript function postoutcommunication
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mike Marti  
View profile  
 More options Sep 14 2012, 7:51 am
From: Mike Marti <mma...@aeondesign.ch>
Date: Fri, 14 Sep 2012 04:51:11 -0700 (PDT)
Local: Fri, Sep 14 2012 7:51 am
Subject: get filename at routescript function postoutcommunication

Hi all,

Can anybody tell me, how i get the filename at the function
postoutcommunication in the routescript. I have a route which reads my data
from database and transform it to xml file, this works very well. What i
now want is, that in this route after xml is produced, also a soap request
will be called which transform my xml data to the soap server.

Thanks for help

Regards

Mike


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
henk-jan ebbers  
View profile  
 More options Sep 14 2012, 9:59 am
From: henk-jan ebbers <eppye.b...@gmail.com>
Date: Fri, 14 Sep 2012 15:59:54 +0200
Local: Fri, Sep 14 2012 9:59 am
Subject: Re: [Bots Open Source EDI Translator] get filename at routescript function postoutcommunication
hi Mike,

welcome to the bots mailing list.

I did simular things.

best way to do this is to use a customized out-communication method.
use communication type 'communicationscript'

from the source code of 'communication.py':
     """
     For running an userscript for communication.
     Examples of use:
     - call external communication program
     - call external program that extract messages from ERP-database
     - call external program that imports messages in ERP system
     - communication method not available in Bots ***or use sub-classing for this***
     - specialised I/O wishes; eg specific naming of output files. (eg including partner name) ***beter: use sub-classing or have more user exits***
     place of communicationscript: bots/usersys/communicationscripts
     name of communicationscript: same name as channel (the channelID)
     in this communicationscript some functions will be called:
     -   connect (required)
     -   main (optional, 'main' should handle files one by one)
     -   disconnect  (required)
     arguments: dict 'channel' which has all channel attributes
     more parameters/data for communicationscript:   hard code this in communicationscript; or use bots.ini
     Different ways of working:
     1. for incoming files (bots receives the files):
         1.1 connect puts all files in a directory, there is no 'main' function. bots can remove the files (if you use the 'remove' switch of the channel).
         1.2 connect only builds the connection, 'main' is a generator that passes the messages one by one (using 'yield'). bots can remove the files (if you use the 'remove' switch of the channel).
     2. for outgoing files (bots sends the files):
         2.1 if there is a 'main' function: the 'main' function is called by bots after writing each file. bots can remove the files (if you use the 'remove' switch of the channel).
         2.2 no 'main' function: the processing of all the files can be done in 'disconnect'. bots can remove the files (if you use the 'remove' switch of the channel).
     """

hope this helps, or gives you ideas

kind regards,
henk-jan

On 09/14/2012 01:51 PM, Mike Marti wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »