4. Previously, on Days of Our Lives… Intro to Rulemanager and Business Rules Advanced Business Rules (Part 1) Both presentations are available on the Rulemanager wiki: http://rulemanager.wikispaces.com
7. 1990 called and wants their pagers back Email Notifier Tone Pager Digital Pager Text Pager None Forward to my Supervisor
8. 1990 called and wants their pagers back Rulemanager uses an external app to send pages This means we can take over that method And we can do whatever we want!
10. Paging Application {paging application} -p <pager_type> -t <employees pager number> -m <message to be sent> -e <employees email address> pager_clerk.exe -p SKY_WORD -t 512-123-4567 -m “This is a message” -e “gary@dovetailsoftware.com”
11. Paging Application {paging application} -p <pager_type> -t <employees pager number> -m <message to be sent> -e <employees email address> pager types:text pager: SKY_WORD digital pager: DIGITAL tone pager: SKY_PAGER
12. My Paging Application DOS batch file Powershell script UNIX shell script Java or .NET executable cbbatch script Javascript script Ruby script
13. My Paging Application Send an SMS message Send an email to a user’s mobile device (email to SMS gateway) Make a phone (voice) call Send a direct Twitter message Send an Instant Message Send a message to a beeper (in case you’re still stuck in 1990) Third party APIs and services make this easy
15. Which Message? Tip If sending to a text pager, then the full message is used. If sending to a tone or digital pager, then the abbreviated message is used.
16. Custom Notification Methods There are a couple of examples on the rulemanager wiki http://rulemanager.wikispaces.com
21. User-Defined Business Rule Events Steps Add your event to the business rule GUI Create a business rule for your event Optional: Create an act_entry for your event Create time bomb for your event
24. Create a business rule for your event Object: Case Event: Change Priority Condition: Action: Notify someone
25. Create time bomb (ClearBasic) dim TimeBombRecord as New Record dim TimeBombSave as New BulkSave TimeBombRecord.RecordType = "time_bomb" TimeBombRecord.SetField "focus_lowid", caseRecord.GetField("objid") TimeBombRecord.SetField "focus_type", 0 TimeBombRecord.SetField "escalate_time", "1/1/1753 " TimeBombRecord.SetField "end_time", App.CurrentDate TimeBombRecord.SetField "flags", 65601538 ‘Optional field TimeBombRecord.SetField "time_period", actRecord.GetField("objid") TimeBombSave.InsertRecordTimeBombRecord TimeBombSave.RelateRecordsToIdTimeBombRecord, "employee", _ App.EmployeeObjid, "cmit_creator2employee" TimeBombSave.Save
26. Time Bomb Flags flags = (n * 65536) + 2 for our example of event id 1001: (1001 * 65536) + 2 = 65601538
27. User-Defined Events The User-Defined Business Rule Events document on the rulemanager wiki has all the gory details that I just covered. http://rulemanager.wikispaces.com
32. Adding new object types to Biz Rules Customize the Business Rules form (472) Add a new entry to the Object Type List Add your custom events to the event List Add your custom rule properties Add your custom recipient aliases Create your business rule Create your custom time bomb
33. Adding new object types to Biz Rules Refer to the Adding new Object Types to Business Rules document on the rulemanager wiki: http://rulemanager.wikispaces.com
34. Adding Event Creation Times Examples: Fire an action -30 days fromcontract expiration date Fire an action -30 days fromlicense key expiration date Fire an action 180 days froma site’s last onsite visit date
36. Adding Event Creation Times Customize the Business Rule Action Form (474), adding a new entry to the List Add a Property Name Object for this new Event Creation (@USERTIME150)
37. Adding Event Creation Times The User-Defined Business Rule Event Creation Times document on the rulemanager wiki has all the details. http://rulemanager.wikispaces.com
40. Adding Custom Calendars Edit the Business Rule Actions form (474) Add your new business calendar to the List Create a new rule property for the path to find the new business calendar entry Create a new rule property for the time zone for the calendar
41. Adding Custom Calendars The creating user-defined calendars page on the rulemanager wiki has all the details. http://rulemanager.wikispaces.com
43. What the heck is a Time Bomb? A time bomb is the mechanism used to tell Rulemanager that something happened in the system
44. What the heck is a Time Bomb? A time bomb is simply a row inserted into the time_bomb table
45. Different kinds of Time Bombs Rule Scheduling Time Bomb Indicates an end-user event, such as Case Create Rule Time Bomb Reflect the upcoming action of a business rule Message Time Bomb Internal communication to rulemanager, such as telling it to re-cache information
46. Time Bomb Flow An event happens in the system (such as case is created) A new time bomb is created Rulemanager looks at all of the business rules in the system, to see if this event matches to any business rules If a start event matches, then Rulemanager evaluates the rule conditions If all of the conditions match, then a new time bomb is created for the rule action (this may be now, or in the future) When this time bomb expires, then the business rule action is fired
47. Time Bomb Data The flags field indicates: which kind of time bomb it is What event occurred The escalate field says when this time bomb will “go off” Other data : objid of the “act_entry” for this event objid and type of focus object (case 268435457)
48. Time Bomb Data The Business Rule Time Bombs document on the rulemanager wiki has all the gory details http://rulemanager.wikispaces.com
52. Logging is your friend Clarify Rulemanager: set the Logging Level to Verbose make sure the admin email address is set Dovetail Rulemanager : set the logging level to DEBUG log warnings and errors to a separate log file send email to admin on errors
53. Rules fire, but notifications are not set Check: User’s email address User’s Notification Preferences User’s Business Hours User’s Site’s Business Hours
54. Bad Time Bomb A bad time bomb will have it’s expiration date set way in the future (1/1/2999) This allows you to diagnose it Typically caused by custom time bombs Review log file (search the logs for the time bomb’s objid) Review the data in the time_bomb record
http://bit.ly/rulemanager Twitter hashtag: #rulemanagerTweets using that hashtag will also show up in the backnoise chat
I am the VP of productsWorking in Clarify for 15 years2 years as a customer, 4 years at Clarify as a Principal Consultant, 9 years here at DovetailI love sharing my knowledge of all things ClarifyMy blog at dovetailsoftware.comI actively participate in the Clarify forum on IT Toolbox
If sending to a tone or digital pager, then the abbreviated message is used. If sending to a text pager, then the full message is used.
If sending to a tone or digital pager, then the abbreviated message is used. If sending to a text pager, then the full message is used.
If sending to a tone or digital pager, then the abbreviated message is used. If sending to a text pager, then the full message is used.
If sending to a tone or digital pager, then the abbreviated message is used. If sending to a text pager, then the full message is used.
Technically, act_entry is optional. But I think it’s a good practice.
USERxxxx, where xxxx is a number between 1000 and 4999
This is more FYI – we won’t be covering these in detail today, as they are rarely used
Customize the Business Rules form (472)Add a new entry to the Object Type List (this is new)Add your custom events to the event List (same as earlier)Add your custom rule properties (we covered this last week in Part 1)Add your custom recipient aliases (we covered this last week in Part 1)Create your business ruleCreate your custom time bomb (same as earlier)
The value in the prop_name object will tell the rulemgr how to find a date-time field relative to the focus object (e.g. Case) to use as the Event Creation time. If prop_name is a date-time field: Time bomb trigger time = this date-time value + elapsed time indicated in Business Rule action If this prop_name is an elapsed time or long integer field: Time bomb trigger time = original event time + this elapsed-time/long integer value (taken in seconds) + elapsed time as indicated in the Business Rule action
One of our customers posed an interesting problem to me this week. They have offices in different locations, in different time zones, with different business hours. The employees in these offices work on different hours from one another, meaning that while one group is working, another group is not working, and vice-versa. The issue comes in when one group dispatches a case to a queue to be worked by the other group. More specifically, the issue is when the queue members should get notified by RuleManager. If the queue members are off-hours, then they should get notified as soon as their next work day startshttp://blogs.dovetailsoftware.com/blogs/gsherman/archive/2007/11/06/firing-business-rules-based-on-the-business-hours-of-a-queue.aspx
This is an easy way to tell if your rule action fired
A bad time bomb is one that can’t be successfully evaluated by rulemanager
I will be posting these slides on my blog, so you can get them there.