![]() |
![]() |
|
|
Using Workflows with RosettaNet
The following sections explain how to develop workflows for WebLogic Collaborate for the RosettaNet business protocol:
These procedures refer to the workflow diagrams in the RosettaNet samples. To access a workflow diagram, run the WebLogic Process Integrator Studio. For information about defining WebLogic Collaborate workflows, see Creating Workflows for BEA WebLogic Collaborate.
Understanding RosettaNet
The following RosettaNet documents are required reading if you want to implement your own PIP using the support for RosettaNet provided by WebLogic Collaborate, and recommended reading if you want to fully understand the sample RosettaNet PIP implementations:
Understanding PIP Workflow Instances
WebLogic Collaborate implements the standard RosettaNet PIP definitions through the use of WebLogic Process Integrator public workflows. These workflow interface with other trading partners, while private workflows are used for message generation and resolution.
Figure 3-1 Message Workflow
Figure 3-1 shows the process by which PIP workflows pass messages between trading partners. Generally speaking, RosettaNet-oriented workflows send messages as follows:
Getting Started
Before you develop a PIP workflow, you should create a schema file from the PIP specification's DTD file. WebLogic Collaborate uses the schema file to validate RosettaNet messages. Schema files are not required if you do not intend to use validation. WebLogic Collaborate includes full implementations of PIPs 0A1 and 3A2, both of which can be used under both RosettaNet 1.1 and 2.0. You should use the schema files from these PIPs as a model for your own PIP schema file. These schema files are available in:
WLC_HOME\rosettanet\schemas
For more information on the use of custom schemas, refer to Administering BEA WebLogic Collaborate.
While most RosettaNet workflow development tasks are identical to those used for developing standard XOCP-oriented workflows, there are some differences. The standard procedures are documented in Creating Workflows for BEA WebLogic Collaborate; you should refer to them before creating RosettaNet workflows. The existing RosettaNet templates also provide a useful template base that you can use when creating new PIPs and workflows for them.
The remainder of this section discusses issues involving the creation of RosettaNet-specific workflows.
Working with Workflows
The RosettaNet PIP templates are public workflows, that allow you to connect to a trading partner. These workflows are designed to work with private workflows that:
Starting a Public Workflow
To start a public workflow from a private workflow within WebLogic Process Integrator, choose Actions
Starting a Private Workflow
To start a private workflow from a public workflow within WebLogic Process Integrator, you must choose Actions
RosettaNet Template Variables
RosettaNet workflows implemented under WebLogic Collaborate require a number of workflow variables to operate. These variables are used in three ways:
All system variables are required for a RosettaNet workflow. Requirements for input variables are based on the actual input requirements of the PIP, but all RosettaNet workflows require the input variables listed in the following table. Output variables are also based on the requirements of individual PIPs, but the set shown in the table is required for all RosettaNet workflows.
Table 3-1 Required RosettaNet Workflow Variables
An important point to note when using these workflow variables is that all input variables must be initialized when you start a public process workflow. The values used to initialize the input variables do not need to be exposed or transmitted. In addition, while you must set the NOF0A1 parties, there are no conventions for distinguishing among users in NOF0A1. Because the actual destination for the PIP is determined by the workflow, you may assign either identity to yourself or your trading partner.
Receiving a RosettaNet Message
WebLogic Collaborate supports two different methods of receiving RosettaNet messages-----Start nodes and Event nodes. These two different node types are used depending on the circumstances under which the message is received.
Start Nodes
You can configure a workflow so that WebLogic Collaborate starts it automatically when WebLogic Collaborate receives the first message for a PIP instance. To configure this action, declare received PIPs as Start node events. Your receiving workflow starts and processes the incoming PIP. For an example, see the Participant Workflow discussion in Starting Collaborative Workflows in Creating Workflows for BEA WebLogic Collaborate.
The PIP3A2 Supplier workflow template serves as an example of how to configure a workflow template definition to be started by an incoming message. In this example, the starting event is set as a Collaboration Event. The workflow is automatically started and the output and system variables are set when a RosettaNet message has been received.
Event Nodes
Workflows can contain events that are triggered when a message is received for the PIP instance associated with the workflow. For an example, see the Initiator Workflow discussion in Starting Collaborative Workflows in Creating Workflows for BEA WebLogic Collaborate.
Implementing Timeouts
Workflows can use an optional timeout path to wait for an incoming RosettaNet message. If the workflow waits for a response to a sent message (for example, the 3A2 Buyer workflow), you must create a separate timeout path to wait for the response. This path, illustrated in the 3A2 Buyer workflow template, consists of a timer, set for the appropriate timeout period, and a stop node.
Out of Sequence Reception of Signals
RNIF 1.1 and RNIF 2.0 define different standards for reception of signals and replies. These differing standards affect how your PIP workflow resolves these messages.
RNIF 1.1 specifies that replies must always follow signals. Thus, you might see a signal/response pattern as follows:
RNIF 2.0 allows out-of-sequence receipt of signals. For example, a workflow might receive a reply before the receipt acknowledgment. Thus, RNIF 2.0 allows a signal/response pattern such as the following:
This pattern must be processed accurately in your workflow design. The PIP 3A2 Customer workflow template provides a useful example of how to handle this. The RNIF 1.1 version of the PIP template processes the signal, followed by the response. The RNIF 2.0 version provides logic to process the signal and the response separately.
Sending a RosettaNet Message
A workflow can send a RosettaNet message by invoking an integration action called Send Business Message. To select this action:
For example, when you choose the Send Business Message action, the following screen appears.
Figure 3-2 RosettaNet 2.0 Send Business Message Dialog
Depending on the message type that you select, various options are available for the message.
Validating a Message
The message validation process uses the Xerces 1.2.0 DOM parser, which supports an alpha implementation of the XML Schema specification. The Xerces 1.2.0 DOM parser is packaged with the WebLogic Collaborate software.
The following sections describe how WebLogic Collaborate validates RosettaNet messages and provide a bibliography for further reading about message validation:
RosettaNet Message Validation
BEA WebLogic Collaborate provides message validation services for both RNIF 1.1 and RNIF 2.0 messages. In either case, you use the appropriate DTDs to perform message validation. Depending on the values specified in the validateServiceContent and validateServiceHeader workflow variables, you may validate either, both, or neither:
For an explanation of the exception handling process, see the RNIF at the following URL:
http://www.rosettanet.org
The example XML schema files and document type definition (DTD) files are located on your WebLogic Collaborate installation at:
WLC_HOME/rosettanet/schemas
Recommended Reading About Message Validation
The following information is recommended reading to fully understand the example XML schemas; it is required reading if you are planning to implement your own XML schemas:
http://www.w3.org/XML/Schema
XML Schema Part 0: Primer provides good descriptions of the features and capabilities of XML schema.
http://xml.apache.org/xerces-j/schema.html
Performance Tuning and Message Validation
Message validation is used primarily while setting up and configuring your system with a partner. Once you are satisfied that invalid message generation issues have been removed from the system, you may optionally turn off message validation to boost performance. As noted elsewhere, there is no requirement for message validation to be performed during message processing. Rather, it is assumed that valid messages are being sent.
Message Attachments
RNIF 2.0 includes support for optional message attachments in the RosettaNet action message. Attachments are not file type-specific, and may contain binary data. Examples of possible attachments include Word documents, GIF images, PDF files, and so on. The information for each attachment is contained in the service header of the message.
BEA WebLogic Collaborate provides support for attachments by allowing a user application (for example a private workflow) to provide a description of the attachment, contained in a BEA-specific structured XML file, as an input to the PIP workflow. The XML file is a description of the file attachment. It is not the actual attachment. It only specifies which files should be attached by WebLogic Collaborate.
The following is the DTD information describing the attachments:
Listing 3-1 WebLogic Collaborate Attachment DTD Information for RosettaNet
<!ELEMENT WLCRosettaNet ( Attachment+ )>
<!ELEMENT Attachment (
description?,
Type,
Id,
LocalLocation
)>
<!ELEMENT description ( FreeFormText ) >
<!ELEMENT FreeFormText ( #PCDATA ) >
<!ATTLIST FreeFormText xml:lang CDATA #IMPLIED >
<!ELEMENT Type ( #PCDATA ) >
<!ELEMENT Id ( #PCDATA ) >
<!ELEMENT LocalLocation ( #PCDATA ) >
The following table describes the elements used in the DTD.
When the message is received, any attachments are stored locally in the WLC_HOME/runtime/rnattachments directory. The filename of the stored attachment is prefixed with a timestamp. For example, you might use the following XML description for an attachment.
Listing 3-2 Sample XML Attachment
<?xml version ="1.0"?>
<!DOCTYPE WLCRosettaNet SYSTEM "WLCRosettaNet.dtd">
<WLCRosettaNet>
<Attachment>
<description>
<FreeFormText>Product user guide in PDF</FreeFormText>
</description>
<Type>application/pdf</Type>
<Id>"001801236324xyz@xyz.test.com"</Id>
<LocalLocation>c:\pdf\myfile.pdf</LocalLocation>
</Attachment>
<Attachment>
...
</Attachment>
</WLCRosettaNet>
This sample would generate the following data in the service header and in the MIME header.
Listing 3-3 Sample Service Output
<Attachment>
<description>
<FreeFormText>Product user guide in PDF</FreeFormText>
</description>
<GlobalMimeTypeQualifierCode>PDF
</GlobalMimeTypeQualifierCode>
<UniversalResourceIdentifier>
cid:Attachment.001801236324xyz@xyz.test.com
</UniversalResourceIdentifier>
</Attachment>
Listing 3-4 Sample MIME Header
Content-Type: application/pdf; name="myfile.pdf"
Content-ID: <Attachment.001801236324xyz@xyz.test.com>
Content-Description: Product user guide in PDF
![]() |
![]() |
![]() |
|
Copyright © 2001 BEA Systems, Inc. All rights reserved.
|