The Accept Invoice Process

The Accept Invoice process is a skeleton version of a process designed to be used in an accounts payable department for initial invoice processing.

The primary purpose of this process is to demonstrate correlations, so it implements only two data attributes, the invoice number (invoiceNr), and the approval status (approvalStatus). It uses one correlation set (Invoice) with one attribute (number).

Accept Invoice process of the CorrelationsExample project
Figure 1. The Accept Invoice Process

Process Flow

The process works as follows:
  • You create a new invoice with the Generate Invoice activity. The only data you must input is an invoice number.
  • The Set Description activity sets the instance description (this.description) so that it contains the invoice number.
  • You display the invoice at the Display Invoice activity. The main purpose of this activity is to have an interactive activity before the Message Wait, described below.
  • The Wait for Release activity (which is a Message Wait activity) holds the instance till one of two things happen:
    • It receives a notification.
    • The time out interval of the due transition elapses (it's set at two hours).

    You "release" the invoice by sending a notification. To do this, you can use the Release Invoice activity, which is listed in the WorkSpace Applications panel, or you can release it from the included ReleaseInvoice Java application. If you release it from the Release Invoice activity, the approvalStatus process variable is set to "Released". If you release it from the Java application, approvalStatus is set to "Approved".

  • Upon release, the instance proceeds to the Invoice Ready activity. When you execute this activity, WorkSpace displays the status of the invoice.