| java.lang.Object org.wfmc.sample.WfMCSampleTools
WfMCSampleTools | public class WfMCSampleTools (Code) | | Implements Tools used by the WfMC Sample Workflow Process.
Caveat emptor: Like the WfMC sample workflow itself, this class
implements a simplistic treatment of the problem domain. There's no
synchronization, transactionality, persistence, etc. In other words, don't
try and use any of this stuff as the basis for a real-life application!
author: Adrian Price |
Method Summary | |
public static void | billAccount(int orderNumber) Charges the credit card and prepares a receipt for a credit order. | public static void | cancelOrder(int orderNumber) [WfMC activity description was wrong - copy/paste from shipOrder.]
Cancels an order. | public static String | checkData(Document orderInfo) Validates an order.
Parameters: orderInfo - An instance of the Order type as defined inorderschema.xsd. | public static String | checkVendor(int accountNumber, double amount) Checks a vendor [what does that mean?]. | public static void | composeMessage(String status, int orderNumber) Composes a message. | public static String | createInvoice(int orderNumber) Creates an invoice using the order information and stores it on a server.
Parameters: orderNumber - The order number. | public static String | createReceipt(int orderNumber) Creates a receipt using the order information and stores it on a server.
Parameters: orderNumber - The order number. | public static int | enterOrder(Document orderInfo) Enters order details.
Parameters: orderInfo - An XML document conforming to the Order element asdefined in orderschema.xsd. | public static Document | getCreditInfo(int orderNumber) Returns the credit info for the specified order.
[WfMC Description was wrong (copy/paste from shipOrder)]
Parameters: orderNumber - The order number. | public static Document | setCreditInfo(int accountNumber, double amount, String cardType) Creates and initializes a CreditInfo object. | public static String | setOrderStatus(String creditStatus) Converts status returned by credit check to OrderStatus. | public static String | shipOrder(int orderNumber) This application presents a screen that presents order information for
the order identified by shipOrder. | public static Document | transformData(String orderString) Transforms a string representing an order into an XML document. |
_accountInfo | final public static String[][] _accountInfo(Code) | | |
billAccount | public static void billAccount(int orderNumber)(Code) | | Charges the credit card and prepares a receipt for a credit order.
Parameters: orderNumber - The order number. |
cancelOrder | public static void cancelOrder(int orderNumber)(Code) | | [WfMC activity description was wrong - copy/paste from shipOrder.]
Cancels an order.
Parameters: orderNumber - The order number. |
checkData | public static String checkData(Document orderInfo)(Code) | | Validates an order.
Parameters: orderInfo - An instance of the Order type as defined inorderschema.xsd. An string conforming to the OrderType schema defined inlinein wfmc-sample.xpdl. The string is restricted to: ValidData,InvalidData,Accept,BadCredit,OverLimit,BadDataFormat. |
checkVendor | public static String checkVendor(int accountNumber, double amount)(Code) | | Checks a vendor [what does that mean?]. Why are we talking about
vendors? This is a Sales Order Processing workflow not a Purchase Order
Processing workflow - our concern is with customers, not vendors.
Parameters: accountNumber - The [vendor's?] account number. Parameters: amount - The total amount of the order. An string conforming to the OrderType schema defined inlinein wfmc-sample.xpdl. The string is restricted to: ValidData,InvalidData,Accept,BadCredit,OverLimit,BadDataFormat. |
composeMessage | public static void composeMessage(String status, int orderNumber)(Code) | | Composes a message.
Parameters: status - An XML document conforming to the OrderType schema definedinline in wfmc-sample.xpdl. Parameters: orderNumber - The order number. |
createInvoice | public static String createInvoice(int orderNumber)(Code) | | Creates an invoice using the order information and stores it on a server.
Parameters: orderNumber - The order number. The WEBDAV URL of the resulting invoice. |
createReceipt | public static String createReceipt(int orderNumber)(Code) | | Creates a receipt using the order information and stores it on a server.
Parameters: orderNumber - The order number. The WEBDAV URL of the resulting receipt. |
enterOrder | public static int enterOrder(Document orderInfo)(Code) | | Enters order details.
Parameters: orderInfo - An XML document conforming to the Order element asdefined in orderschema.xsd. A newly allocated order number. |
getCreditInfo | public static Document getCreditInfo(int orderNumber)(Code) | | Returns the credit info for the specified order.
[WfMC Description was wrong (copy/paste from shipOrder)]
Parameters: orderNumber - The order number. An XML document conforming to the CreditInfo element defined increditService.wsdl. |
setCreditInfo | public static Document setCreditInfo(int accountNumber, double amount, String cardType)(Code) | | Creates and initializes a CreditInfo object.
Parameters: accountNumber - Account number to check. Parameters: amount - Amount to authorize. Parameters: cardType - As defined by CardType in orderSchema.xsd An XML document conforming to the CreditInfo element defined increditService.wsdl. |
setOrderStatus | public static String setOrderStatus(String creditStatus)(Code) | | Converts status returned by credit check to OrderStatus.
Parameters: creditStatus - The order status. |
shipOrder | public static String shipOrder(int orderNumber)(Code) | | This application presents a screen that presents order information for
the order identified by shipOrder. The user may update the order with any
changes such as back order information. It returns a string indicating
whether the order is complete or on back order.
Parameters: orderNumber - The order number. Order status: "Complete" or "Backorder". |
transformData | public static Document transformData(String orderString)(Code) | | Transforms a string representing an order into an XML document.
Parameters: orderString - An XML document conforming to the Order element as defined inorderschema.xsd. |
|
|