Topic
  • 7 replies
  • Latest Post - ‏2012-02-29T03:17:27Z by SystemAdmin
captain_knave
captain_knave
46 Posts

Pinned topic UCA based on timer - Email

‏2012-02-18T00:08:14Z |
Hello Folks,

I want the system to trigger a UCA (that generates an email to designated list of users) when no activity is performed for two weeks. Lets say that I have a page where user selects department(each dept has a unique name) and enter the quantity of supply they want for next week. Users will place their orders of supply by every friday. If no orders are received, UCA should trigger an email alert to the user who did not place an order on friday.
How to do this using BPM 7.5 standard version. Thanks.

-K
Updated on 2012-02-29T03:17:27Z at 2012-02-29T03:17:27Z by SystemAdmin
  • kolban
    kolban
    3322 Posts

    Re: UCA based on timer - Email

    ‏2012-02-18T00:25:52Z  
    Hi there Captain Knave,
    I'd suggest that we split the problem into two parts. Let us break it into"

    o How do we send an email to a designated list of users?
    o How do we know when to send an email?

    The first part can be achieved by the IBM supplied System Data Toolkit capability which (if I remember correctly) is called something like "SMTP Send". This is an integration service which, when called, will send an email to a named set of users through an SMTP email server. The body, subject and recipients can be supplied through parameters (variables).

    The second part is (to my mind) more interesting. In a BPD, we can attach Timer Events to activities and, if the activity has not completed within a configurable amount of time, the Timer Event fires. When the timer event fires, we can either cancel the activity (probably not what we want) or cause a new (additional) path to be fired while leaving the original activity alone. This new path could be connected to your system service that sends the email (see above).

    So ... I could imagine a BPD which has a set of Human Services and if a particular Human Service is not completed/progressed within a given time frame an attached Timer Event fires which sends the email. All of this is available in the 7.5 Standard edition of IBPM.

    I am guessing that more details or permutations may be requested ... so let us maybe use this as the start of a conversation and see how we go from here.

    Neil
  • captain_knave
    captain_knave
    46 Posts

    Re: UCA based on timer - Email

    ‏2012-02-21T21:51:38Z  
    • kolban
    • ‏2012-02-18T00:25:52Z
    Hi there Captain Knave,
    I'd suggest that we split the problem into two parts. Let us break it into"

    o How do we send an email to a designated list of users?
    o How do we know when to send an email?

    The first part can be achieved by the IBM supplied System Data Toolkit capability which (if I remember correctly) is called something like "SMTP Send". This is an integration service which, when called, will send an email to a named set of users through an SMTP email server. The body, subject and recipients can be supplied through parameters (variables).

    The second part is (to my mind) more interesting. In a BPD, we can attach Timer Events to activities and, if the activity has not completed within a configurable amount of time, the Timer Event fires. When the timer event fires, we can either cancel the activity (probably not what we want) or cause a new (additional) path to be fired while leaving the original activity alone. This new path could be connected to your system service that sends the email (see above).

    So ... I could imagine a BPD which has a set of Human Services and if a particular Human Service is not completed/progressed within a given time frame an attached Timer Event fires which sends the email. All of this is available in the 7.5 Standard edition of IBPM.

    I am guessing that more details or permutations may be requested ... so let us maybe use this as the start of a conversation and see how we go from here.

    Neil
    Hi Neil,

    This first part is pretty much easy to accomplish. For the 2nd part, Please see the attached BPD.

    I have attached a timer to the human task that needs to be performed by a set of users every week. Now this timer fires the reminder (sends an email) every minute(for testing purposes, will be changed o 1 week later) if someone does not sends in a request within a minute. Is this the correct way? Because while testing i noticed that my timer fires every minute irrespective of the task being performed or not. Please let me know if you need more info. Thanks.

    -K
  • captain_knave
    captain_knave
    46 Posts

    Re: UCA based on timer - Email

    ‏2012-02-22T22:53:33Z  
    Hi Neil,

    This first part is pretty much easy to accomplish. For the 2nd part, Please see the attached BPD.

    I have attached a timer to the human task that needs to be performed by a set of users every week. Now this timer fires the reminder (sends an email) every minute(for testing purposes, will be changed o 1 week later) if someone does not sends in a request within a minute. Is this the correct way? Because while testing i noticed that my timer fires every minute irrespective of the task being performed or not. Please let me know if you need more info. Thanks.

    -K
    So i figured out why that timer was firing again and again. Now a new issue that i am facing is that,since this task is never ending, the timer runs fine. If my task is completed, the timer stops and everything else stop. May be i mis-communicated earlier. I want the timer to start as soon as the task is complete. So that incase if someone missed to perform this task on time, they will get an email.
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: UCA based on timer - Email

    ‏2012-02-22T23:23:37Z  
    So i figured out why that timer was firing again and again. Now a new issue that i am facing is that,since this task is never ending, the timer runs fine. If my task is completed, the timer stops and everything else stop. May be i mis-communicated earlier. I want the timer to start as soon as the task is complete. So that incase if someone missed to perform this task on time, they will get an email.
    Instead of having 1 task that lives forever, you should probably issue a new task after one is done. Assuming your timer is "fire on the due date" and you set the due date for each task issued, you are set. In the BPD you would have the line out of the task just loop back to itself.
  • captain_knave
    captain_knave
    46 Posts

    Re: UCA based on timer - Email

    ‏2012-02-28T22:24:13Z  
    Instead of having 1 task that lives forever, you should probably issue a new task after one is done. Assuming your timer is "fire on the due date" and you set the due date for each task issued, you are set. In the BPD you would have the line out of the task just loop back to itself.
    So lets say that the task needs to be sent out to 5 groups. And the same rule applies for every group that if it is not performed within the due date, alert the group via email. In this case, dont i need to have a service that keeps running continuously and sends task to people in the group?
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: UCA based on timer - Email

    ‏2012-02-29T03:02:22Z  
    So lets say that the task needs to be sent out to 5 groups. And the same rule applies for every group that if it is not performed within the due date, alert the group via email. In this case, dont i need to have a service that keeps running continuously and sends task to people in the group?
    Captain -

    You are not being very clear on the behavior you want. I'll outline 3 scenarios below. Hopefully one of them is what you are looking for.

    Scenario A - Send an email (1) if the task is not complete by a certain time.
    Solution - put a non-repeating timer on the task, route the line from the timer to the "Send Email" service you have written, set the time the timer fires. For this one you can set the time however you like (custom date, before/after difference, etc)

    Scenario B - Send emails (many) periodically until task is completed.
    Solution. - put a repeating timer on the task. Make the due date for the timer a custom variable in the BPD that you've explicitly set to when the timer should first go off. As the first activity after the timer goes off, reset this date value to the next time you want it to fire. Route a line from there to the Send Email service you wrote.

    Scenario C - you want to send an email (1) X amout of time after a task completes (for some reason I thought this was what you were asking earlier in the thread)
    Solution - route a line from the task to a timer (stand alone). Have the timer wait an appropriate amount off time. Route the timer to the Send Email service, and then to the next task.

    If none of these are your scenario, can you please clarify what you want?
  • SystemAdmin
    SystemAdmin
    7615 Posts

    Re: UCA based on timer - Email

    ‏2012-02-29T03:17:27Z  
    Captain -

    You are not being very clear on the behavior you want. I'll outline 3 scenarios below. Hopefully one of them is what you are looking for.

    Scenario A - Send an email (1) if the task is not complete by a certain time.
    Solution - put a non-repeating timer on the task, route the line from the timer to the "Send Email" service you have written, set the time the timer fires. For this one you can set the time however you like (custom date, before/after difference, etc)

    Scenario B - Send emails (many) periodically until task is completed.
    Solution. - put a repeating timer on the task. Make the due date for the timer a custom variable in the BPD that you've explicitly set to when the timer should first go off. As the first activity after the timer goes off, reset this date value to the next time you want it to fire. Route a line from there to the Send Email service you wrote.

    Scenario C - you want to send an email (1) X amout of time after a task completes (for some reason I thought this was what you were asking earlier in the thread)
    Solution - route a line from the task to a timer (stand alone). Have the timer wait an appropriate amount off time. Route the timer to the Send Email service, and then to the next task.

    If none of these are your scenario, can you please clarify what you want?
    Re-reading your original post, I think I see what you want. It is based off of a model we don't normally encourage in the BPM space. If I was going to do what you were looking at doing, I would create a master BPD that would have a Multi Instance Loop with a weekly task for each department. Each of these tasks would then have a timer on them to send the reminder if they were not filled out (scenario A above). I would have a UCA fire off a new instance of this BPD each week.

    This is the typical BPM model because we tend to coach that a user's work should be waiting for them in their inbox, rather than them "just knowing" they should do something.

    To make your model work, which seems to be "if the user has already done this work, even though it wasn't a task, then don't remind them". This is more of an application approach to my mind, as it assumes the user is responsible for doing work for which there is no task. But how to do it?

    Well you need to figure out how you know the work has bee done. Assuming there is a DB or similar System of Record you can inspect and determine this then you do the following.

    1. Create a service that can look at the SOR and determine which departments haven't submitted their reports.
    2. Create a service that can send a reminder email to a department.
    3. Have the service in 1 call the service in 2 for each delinquent department.
    4. Add service 1 to a time based UCA that is scheduled for the correct time each week.

    Please note that the above solution doesn't use a BPD or the word "Process" anywhere. This is why I would view this more as App Dev than BPM.