In this post, I add a rule to BAM to automatically re-order iPads, when the inventory is less than 10.
To begin with I create a web service to mimic the re-ordering.
I create the following class in JDeveloper and expose as a web service.
I deploy to my SOA AdminServer and test
Note the wsdl -
Now open BAM in Architect mode, add a new data objetc - LowInventory with one field - Product.
Now open BAM in Active Studio mode, open the report -
Double click on the Action List and click Change Report Properties
Add a new Action
Edit the mapping - setting product in LowInventory to the value of Product from the ActionList.
Save the report and run in Active Viewer
Check the lowInventory Data Object
It has one row -
Now we add a rule to call the web service when this happens.
Configure the Web Service
I enter an order for 5 iPads.
I approve the order.
I select the order and click Re-order Product in the BAM report
I check the WLS console for the web service output.