• No labels

2 Comments

  1. We are trying to create a very simple scenario.
    Our internal database handle (and store) product orders. We want to send out a notification to a manager when ever product order worth £100 or more placed in our system. This process should be fully automated (i.e no user interaction).
    I was thinking to implement it as follows:
    * Inquire database for “new” orders (i.e. orders placed on last 24 hours) worth more than £100 and update a flag against those orders (so we don’t pick them up again, when job run again).
    * If above inquiry return any results, run email notification to manager
    * If inquiry return no rows skip to the end
    I was able to query the data base using "Database update tool" plug-in and send out the notification using "Email Tool" plug-in. However I'm not sure how to make a decision (i.e. if there are no new orders skip notification), based on result of the database query.
    Can any one help, please?

    1. Hi Malika,

      You will need to set up some sort of scheduled task that will periodically check on the orders.

      In the scheduled task, you can probably trigger a workflow that runs a Bean Shell script (you may see some example after the jump) that goes to the DB to perform the checking then to trigger the Email tool if there's any order found within the criteria set.

      Thanks.