Skip Navigation Links
Product InformationExpand Product Information
Getting StartedExpand Getting Started
DownloadsExpand Downloads
LicensingExpand Licensing
Support & FeedbackExpand Support & Feedback
About UsExpand About Us
 
About Us
Order Processing End-to-End Demonstration

This sample demonstrates using Video Clips the complete creation of a basic order processing scenario in SmartsIntegrator.  Specifically here's the scenario :

  • Xml orders are received from a customer
  • A copy of each order must be sent to the legacy accounts system in CSV format. 
  • For each item in the order, the current stock level must be checked by calling a web service.
  • Any items out of stock will need to be ordered from the supplier, by sending an Xml order to the supplier.  This order format is different to the customer order format.

This scenario has been broken down into a number of animated video clips :

(1) Create the CustomerOrder Schema.  Here we define the schema to be used for receiving Customer Orders, as defined by the following sample Message :

- <CustomerOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" CustomerId="Customer1" CustomerEmail="test@customer1.com" CustomerName="Customer1" OrderDate="2008-04-01T13:01:01.0000000+00:00">
-  <OrderLines>
-   <OrderLine>
     <ProductId>ProductId1</ProductId>
      <Quantity>1</Quantity>
  </OrderLine>
  <ProductId>ProductId2</ProductId>
      <Quantity>13</Quantity>
  </OrderLine>
  <ProductId>ProductId3</ProductId>
      <Quantity>1</Quantity>
  </OrderLine>
  <ProductId>ProductId4</ProductId>
      <Quantity>3</Quantity>
  </OrderLine>
 </OrderLines>
</CustomerOrder>

(2) Create the SupplierOrder Schema.  Here we define the schema to be used for sending Supplier Orders, as defined by the following sample Message :

- <SupplierOrder xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <OrderHeader>
   <CustomerId>Customer2</CustomerId>
   <ItemCount>5</ItemCount>
   <OrderDate>2008-01-01T01:01:01.0000000+00:00</OrderDate>
</OrderHeader>
- <OrderItems>
    <OrderItem ItemCode="ItemCode1" Quantity="1">OrderItem1</OrderItem>
    <OrderItem ItemCode="ItemCode2" Quantity="24">OrderItem2</OrderItem>
    <OrderItem ItemCode="ItemCode3" Quantity="11">OrderItem3</OrderItem>
    <OrderItem ItemCode="ItemCode4" Quantity="10">OrderItem4</OrderItem>
    <OrderItem ItemCode="ItemCode5" Quantity="2">OrderItem5</OrderItem>
 </OrderItems>
</SupplierOrder>

(3) Create the AccountsOrder Schema.  Here we define the CSV file Schema, as defined by the following sample Message :

CustomerId,2008-01-01T01:01:01.0000000+00:00
ProductId1,Quantity1
ProductId2,Quantity2
ProductId3,Quantity3
ProductId4,Quantity4
ProductId5,Quantity5
ProductId6,Quantity6

(4) Create the CustomerOrder to SupplierOrder Map.  Here we create a Map to convert from a customer order to a supplier order, translating the product codes.  This Map copies over all order quantities literally, though shortly we will write a workflow to subsequently adjust the quantities being ordered according to current stock levels.

(5) Create the CustomerOrder to AccountsOrder Map.  Here we create a map to convert from a customer order to the format to be sent to the accounts system.

(6) Create the Order Workflow.  Here we create a Workflow to receive the customer order, map it to a supplier order and an account order, iterate the items in the order checking current stock levels and fixing up the supplier order, and then send the supplier and accounts orders.

(7) Test the Order Workflow.  Here we run a simple test file through the workflow to test for expected results.

(8) Create the Ports, and Bind the Workflow.  Here we create a Receive Port to receive the incoming customer order, and we create two Send Ports for the supplier and accounts orders.  Then we bind the Order Workflow to the Ports we created, so it is ready to run.

If you've been following along, if you now drop a sample Customer Order file into the receive directory, you should get Supplier and Accounts orders output into the corresponding send directories within a few seconds.  If things do not run as expected, check the Server is running, all ports are enabled, and that there are no errors in the Tracking log.

Further exercises

(1) It would be easy to expand this Workflow to send an email confirmation of order to the customer, by using a Send Port in conjuction with the Email transport.  As an exercise, implement this functionality.  (Note that you'll need to have at least one SmartsIntegrator Server configured to send email.)

(2) With the Workflow as it is, an order will be sent to the supplier even if everything is in stock, although the order will be empty.  As an exercise, prevent this from happening.  This could be done simplistically using a filter, or using logic in the Workflow.
 
Limited time offer - Get full SmartsIntegrator licenses with 75% off
Yes, for the moment full SmartsIntegrator licenses are just 25% of regular price. 

That's an unbelievable price of just $499 (£295, 375 EURO) per machine.  And all licenses include 12 months of free software updates and basic email support. 

This can't last for long as we really do need to make some revenue, but for the moment our priority is to get SmartsIntegrator established in the marketplace.  Take advantage of this fantastic opportunity now...