OnRamp for Commerce One MarketSite 3.5 SP1 | webMethods OnRamp for Commerce One MarketSite Adapter Documentation | webMethods OnRamp for CommerceOne MarketSite Adapter Installation and User’s Documentation | Using the Partner Manager | Submitting Documents to Partner Manager | Building a Service that Invokes the Partner Manager
 
Building a Service that Invokes the Partner Manager
*To build a flow service that submits a document to the Partner Manager
1. Use Designer to create a new flow service.
2. Insert the flow steps that your service will use to generate or retrieve the document that you want to submit to the Partner Manager. For example, if the document will originate from an ERP system such as Baan or PeopleSoft or from a database, build the invoke and data-transformation steps that will retrieve and generate the document at run time.
The following example shows a flow service that extracts a single document from the database (in this case, a PO) and converts it to an XML document. (Although an XML document is generated in this example, you can submit any type of data to the Partner Manager. It does not have to be an XML document.)
3. If you will use the Email or FTP transport to route the document to its destination, do the following:
a. Add a map step that creates an IS Document (IData object) called data.
b. Within data, create an object called content.
c. Map your document (which must be a String, or an object that contains a byte [ ] or an InputStream) to data/content.
The following shows how the MAP step is used to map the XML document generated by documentToXMLNode from the preceding example, to data/content.
4. Insert a step that invokes wm.PartnerMgr.gateway.transport.B2B:InboundProcess
5. Use the Pipeline Editor to set (or map) the following InboundProcess input values.
In this parameter…
Specify…
sender
The string that you are using to represent the sender. This value is what the Partner Manager will use to match the Sender value in its routing rules.
receiver
The string that you are using to represent the receiver of this document. This value is what the Partner Manager will use to match the Receiver value in its routing rules.
msgType
The string that you are using to represent the type of document you are submitting to the Partner Manager. This value is what the Partner Manager will use to match to the Message Typevalue in its routing rules.
$routeOnly
Optional. Whether you want the Partner Manager to log the document in its message store.
Valid values are:
*true Route the document without logging it in the message store. The $routeOnly parameter must exist in the pipeline for this to take effect.
*false Log the document in the message store to the message store when it is routed.This is the default value.
*no value Log the document in the message store to the message store when it is routed.
$tid
Optional. A string that specifies the transaction ID that you want Partner Manager to the document when it puts it in the message store. Used only when $routeOnly is false or doesn’t exist in the pipeline.
If you do not specify a transaction ID and $routeOnly is false or doesn’t exist, the Partner Manager automatically generates a transaction ID for the transaction.
$action
Optional. One of the following action codes that sets the state of the document when it is put in the message store. Used only when $routeOnly is false or doesn’t exist.
Set the value to assign a state as follows:
*0 Create
*1 Execute
*2 Rollback
*3 Commit
*4 Confirm
Note:
You might want to drop any unused variables from the pipeline before invoking InboundProcess, especially if the document will be routed to another service on a remote server. This will prevent Partner Manager from unnecessarily sending data across the network.
The figure that follows shows a finished flow service that generates and submits a document to the Partner Manager. (In this example, the sender, receiver, and msgType parameters already exist in the pipeline, so they are implicitly mapped to those parameters in InboundProcess.)