Purchase Order Business Object Examples


The schema used in the examples for the purchase order business object is shown next:

PurchaseOrder 
{ 
  POHeader 
  { 
      int DocumentID; 
      BSTR DocumentDateTime; 
      PartnerInformationFrom 
      { 
            BSTR Organization; 
            BSTR URI; 
            BSTR Country; 
            DomainIdentities 
            { 
                  BSTR Domain; 
                  BSTR Identities; 
            } 
      } 
      PartnerInformationTo 
      { 
            BSTR Organization; 
            BSTR URI; 
            BSTR Country; 
            DomainIdentities 
            { 
                  BSTR Domain; 
                  BSTR Identities; 
            } 
      } 
  } 
} 
  Amount 
  { 
      int flag; 
      ActualAmount 
      { 
            BSTR Currrency; 
            float ActualAmount; 
      } 
      ConvertedAmount 
      { 
            float ConvertedAmount; 
            float ConversionFactor; 
      } 
  } 
  LineItem1 
  { 
      int SerialNumber; 
      BSTR ItemType; 
      float Quantity; 
      Amount 
      { 
            int flag; 
            ActualAmount 
            { 
                  BSTR Currrency; 
                  float ActualAmount; 
            } 
      ConvertedAmount 
      { 
            float ConvertedAmount; 
            float ConversionFactor; 
      } 
  } 
} 
  LineItem2 
  { 
      int SerialNumber; 
      BSTR ItemType; 
      float Quantity; 
      Amount 
      { 
            int flag; 
            ActualAmount 
            { 
                  BSTR Currrency; 
                  float ActualAmount; 
            } 
            ConvertedAmount 
            	{ 
                  float ConvertedAmount; 
                  float ConversionFactor; 
            } 
      } 
  } 
} 
  LineItem3 
  { 
      int SerialNumber; 
      BSTR ItemType; 
      float Quantity; 
      Amount 
      { 
            int flag; 
            ActualAmount 
            { 
                  BSTR Currrency; 
                  float ActualAmount; 
            } 
      ConvertedAmount 
      { 
            float ConvertedAmount; 
            float ConversionFactor; 
      } 
  } 
} 
  LineItem4 
  { 
      int SerialNumber; 
      BSTR ItemType; 
      float Quantity; 
      Amount 
      { 
            int flag; 
            ActualAmount 
            { 
                  BSTR Currrency; 
                  float ActualAmount; 
            } 
      ConvertedAmount 
      { 
                  float ConvertedAmount; 
                  float ConversionFactor; 
      } 
  } 
} 

Get a Purchase Order Record

The get operation demonstrates a Request-Response scenario.

To retrieve a purchase order record:

  1. Click Purchase Order.
  2. Click Get. The Get PO Details page is displayed.
  3. Type the purchase order code in the Purchase Order ID field or use the default.
  4. Click Get. The details of the specified purchase order are displayed on the html page. If the specified purchase order record does not exist, the status ENTRY NOT FOUND is displayed on the html page.

Insert or Update a Purchase Order Record

The Insert-Update operation demonstrates a Request-Response scenario.

To insert or update a purchase order record:

  1. Click Purchase Order.
  2. Click Insert-Update. The Purchase Order Insert_Update page is displayed.
  3. Type the purchase order code in the Document field or use the default.
  4. Click Add. If the record does not exist, it is created and the status, INSERTED ENTRY, is displayed on the html page. If the record exists, it is updated and the status UPDATED ENTRY is displayed on the html page.

Delete a Purchase Order Record

The delete operation demonstrates a Request-Response scenario.

To delete a purchase order record:

  1. Click Purchase Order.
  2. Click Delete. The Delete PO Details page is displayed.
  3. Type the purchase order code in the Purchase Order ID field or use the default.
  4. Click Delete. The purchase order record is deleted and the status DELETED ENTRY is displayed on the html page. If the purchase order record does not exist, the status ENTRY NOT FOUND is displayed on the html page.

Publish a Purchase Order Record

The Sync operation demonstrates a Publication scenario. TIBCO BusinessWorks listens to the publish events related to the purchase order business object, and displays this information on the browser when you use the Sync operation.

The Sync operation is only available for the TIBCO BusinessWorks examples.

To publish a purchase order record:

  1. Click Purchase Order.
  2. Click Sync. The Sync Operation page displays.
  3. Click Start.
  4. The purchase order details for all the purchase order IDs you had specified until now are displayed on the html page.


TIBCO Adapter™ for COM Examples Guide
Software Release 5.3, September 2005
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com