This documentation is for WSO2 Enterprise Integrator version 6.5.0 . View documentation for the latest release in the 6.x.x family and the latest release in the 7.x.x family.

All docs This doc
||
Skip to end of metadata
Go to start of metadata

The .bar file relevant for this sample is XMLVariableTypeUsageProcess.bar.

Flow of the sample

This sample is based on a bookstore to handle pending arrivals of books.

  1. Get the list of pending arrivals..
  2. If there are no pending arrivals, a message stating "No Pending Arrivals" is printed.
    If there are pending arrivals, a user task is triggered and assigned to the admin to add a new book.

    The following code snippet shows the above condition using the XML variable. 

    {xmlDoc.xPath("/bookstore/pendingArrivals/text()") > 0}
  3. The new book is added to the book list.
  4. The last service task prints the book list.

Deploying and running the sample

  1. Login to the management console as the admin, using admin/admin credentials.
  2. Navigate to Processes > Add > BPMN and upload the XMLVariableTypeUsageProcess.bar file found in the <EI_HOME>/samples/business-process/bpmn directory.
  3. Login as admin on the BPMN explorer using admin/admin credentials.

  4. Select the Processes tab and start a two process instance of the XMLVariableType process; one with the Pending Arrivals Count field set to 0 and another one with the Pending Arrivals Count set to 1.
  5. Select Tasks>My Tasks tab and you will see that the process instance you started with a pending arrivals count of 1 will appear on the task list as a user task.
  • No labels