advanced business rules (part2)
DESCRIPTION
TRANSCRIPT
![Page 1: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/1.jpg)
© 2010 Dovetail Software Inc.
Advanced Rulemanager &Business Rules
(Part 2)
Join the conversation: http://backnoise.com/?rulemanager
![Page 2: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/2.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
BackChannel
Join the conversation:http://backnoise.com/?rulemanager
![Page 3: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/3.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Me
Gary Sherman, Clarify
![Page 4: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/4.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
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
![Page 5: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/5.jpg)
© 2010 Dovetail Software Inc.
CUSTOM NOTIFICATION METHODS
![Page 6: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/6.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Baseline notification methods
• Email • Notifier• Tone Pager• Digital Pager• Text Pager• None• Forward to my Supervisor
![Page 7: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/7.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
1990 called and wants their pagers back
• Email • Notifier• Tone Pager• Digital Pager• Text Pager• None• Forward to my Supervisor
![Page 8: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/8.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
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!
![Page 9: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/9.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Paging Application Configuration
Clarify Rulemanager:SvcConfig.exe (Windows)Rulemansvc.env (UNIX)
Dovetail Rulemanager:<add key="NotificationConfig.PagerApplicationPath" value=“c:\mypager.bat" />
![Page 10: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/10.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
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 “[email protected]”
![Page 11: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/11.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
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_WORDdigital pager: DIGITALtone pager: SKY_PAGER
![Page 12: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/12.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
My Paging Application
• DOS batch file• Powershell script • UNIX shell script• Java or .NET executable• cbbatch script• Javascript script• Ruby script
![Page 13: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/13.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
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
![Page 14: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/14.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Additional Nicety – Modify the UI
![Page 15: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/15.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Which Message?If sending to a text pager, then the full message
is used.
Tip
If sending to a tone or digital pager, then the abbreviated message is used.
![Page 16: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/16.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Custom Notification Methods
There are a couple of examples on the rulemanager wiki
http://rulemanager.wikispaces.com
![Page 17: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/17.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Lets see this in action…
![Page 18: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/18.jpg)
© 2010 Dovetail Software Inc.
CUSTOM BUSINESS RULE EVENTS
![Page 19: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/19.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Example
Fire a business rule when the Priority of a Case is changed
![Page 20: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/20.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Custom Events
![Page 21: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/21.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
User-Defined Business Rule Events
Steps
1. Add your event to the business rule GUI2. Create a business rule for your event3. Optional: Create an act_entry for your event4. Create time bomb for your event
![Page 22: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/22.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Add your event to the business rule GUI
![Page 23: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/23.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Add your event to the business rule GUI
![Page 24: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/24.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Create a business rule for your event
Object: CaseEvent: Change PriorityCondition: Action: Notify someone
![Page 25: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/25.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Create time bomb (ClearBasic)dim TimeBombRecord as New Recorddim TimeBombSave as New BulkSave
TimeBombRecord.RecordType = "time_bomb"
TimeBombRecord.SetField "focus_lowid", caseRecord.GetField("objid")TimeBombRecord.SetField "focus_type", 0TimeBombRecord.SetField "escalate_time", "1/1/1753 "TimeBombRecord.SetField "end_time", App.CurrentDateTimeBombRecord.SetField "flags", 65601538
‘Optional fieldTimeBombRecord.SetField "time_period", actRecord.GetField("objid")
TimeBombSave.InsertRecord TimeBombRecordTimeBombSave.RelateRecordsToId TimeBombRecord, "employee", _
App.EmployeeObjid, "cmit_creator2employee"TimeBombSave.Save
![Page 26: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/26.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Time Bomb Flags
flags = (n * 65536) + 2
for our example of event id 1001:(1001 * 65536) + 2 = 65601538
![Page 27: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/27.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
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
![Page 28: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/28.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Lets see this in action…
![Page 29: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/29.jpg)
© 2010 Dovetail Software Inc.
ADDITIONAL CUSTOMIZATIONS
![Page 30: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/30.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Adding new object types to Biz Rules
For example, create business rules for your custom object, such as
• widget• license_key• build
![Page 31: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/31.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Adding new object types to Biz Rules
![Page 32: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/32.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
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
![Page 33: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/33.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
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
![Page 34: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/34.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Adding Event Creation Times
Examples:Fire an action -30 days from
contract expiration dateFire an action -30 days from
license key expiration dateFire an action 180 days from
a site’s last onsite visit date
![Page 35: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/35.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Adding Event Creation Times
![Page 36: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/36.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
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)
![Page 37: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/37.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
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
![Page 38: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/38.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Adding Custom Calendars
For example, fire a rule based on the business hours of a queue
![Page 39: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/39.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Adding Custom Calendars
![Page 40: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/40.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
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
![Page 41: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/41.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Adding Custom Calendars
The creating user-defined calendars page on the rulemanager wiki has all the details.
http://rulemanager.wikispaces.com
![Page 42: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/42.jpg)
© 2010 Dovetail Software Inc.
TIME BOMBS
![Page 43: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/43.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
What the heck is a Time Bomb?
A time bomb is the mechanism used to tell Rulemanager that something happened in the system
![Page 44: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/44.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
What the heck is a Time Bomb?
A time bomb is simply a row inserted into the time_bomb table
![Page 45: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/45.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Different kinds of Time Bombs
Rule Scheduling Time BombIndicates an end-user event, such as Case Create
Rule Time BombReflect the upcoming action of a business rule
Message Time BombInternal communication to rulemanager, such as telling it to re-cache information
![Page 46: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/46.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Time Bomb Flow
An event happens in the system (such as case is created)A new time bomb is createdRulemanager looks at all of the business rules in the system,
to see if this event matches to any business rulesIf a start event matches, then Rulemanager evaluates the rule
conditionsIf 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
![Page 47: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/47.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Time Bomb Data
The flags field indicates:• which kind of time bomb it is• What event occurredThe 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)
![Page 48: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/48.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Time Bomb Data
The Business Rule Time Bombs document onthe rulemanager wiki has all the gory details
http://rulemanager.wikispaces.com
![Page 49: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/49.jpg)
© 2010 Dovetail Software Inc.
TROUBLESHOOTING
![Page 50: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/50.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Common Issues
Rules not firing at allRules firing at wrong timeRules fire, but notifications are not setBad Time Bombs
![Page 51: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/51.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Troubleshooting
Tip
![Page 52: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/52.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Logging is your friend
Clarify Rulemanager: set the Logging Level to Verbosemake sure the admin email address is set
Dovetail Rulemanager : set the logging level to DEBUGlog warnings and errors to a separate log filesend email to admin on errors
![Page 53: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/53.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
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
![Page 54: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/54.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
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 itTypically caused by custom time bombsReview log file (search the logs for the time
bomb’s objid)Review the data in the time_bomb record
![Page 55: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/55.jpg)
© 2010 Dovetail Software Inc.
FUTURE SHOWS
![Page 56: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/56.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Future Sessions (under consideration)
• Performance Tuning of Rulemanager• Monitoring• cbbatch• Your Ideas?
![Page 57: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/57.jpg)
© 2010 Dovetail Software Inc.Join the conversation at: http://backnoise.com/rulemanager
Learn More
Wiki:http://rulemanager.wikispaces.com/
![Page 58: Advanced business rules (part2)](https://reader035.vdocuments.net/reader035/viewer/2022062303/554207815503463a298b45c7/html5/thumbnails/58.jpg)
© 2010 Dovetail Software Inc.
Questions, Comments, Queries?
http://backnoise.com/?rulemanager