Advanced Rulemanager &Business Rules(Part 2)<br />Join the conversation:http://backnoise.com/?rulemanager<br />
BackChannel<br />Join the conversation:<br />http://backnoise.com/?rulemanager<br />
Me<br />Gary Sherman, Clarify<br />
Previously, on Days of Our Lives…<br />Intro to Rulemanager and Business Rules<br />Advanced Business Rules (Part 1)<br />...
Custom Notification methodS<br />
Baseline notification methods<br />Email <br />Notifier<br />Tone Pager<br />Digital Pager<br />Text Pager<br />None<br />...
1990 called and wants their pagers back<br />Email <br />Notifier<br />Tone Pager<br />Digital Pager<br />Text Pager<br />...
1990 called and wants their pagers back<br />Rulemanager uses an external app to send pages<br />This means we can take ov...
Paging Application Configuration<br />Clarify Rulemanager:<br />	SvcConfig.exe (Windows)<br />	Rulemansvc.env (UNIX)<br />...
Paging Application<br />{paging application} <br />	-p <pager_type> <br />	-t <employees pager number> <br />	-m <message ...
Paging Application<br />{paging application} <br />	-p <pager_type> <br />	-t <employees pager number> <br />	-m <message ...
My Paging Application<br />DOS batch file<br />Powershell script <br />UNIX shell script<br />Java or .NET executable<br /...
My Paging Application<br />Send an SMS message <br />Send an email to a user’s mobile device (email to SMS gateway)<br />M...
Additional Nicety – Modify the UI<br />
Which Message?<br />Tip<br />If sending to a text pager, then the full message is used.<br />If sending to a tone or digit...
Custom Notification Methods<br />There are a couple of examples on the rulemanager wiki<br />http://rulemanager.wikispaces...
	Lets see this in action…<br />
CUSTOM BUSINESS Rule EVENTS<br />
Example<br />Fire a business rule when the Priority of a Case is changed <br />
Custom Events<br />
User-Defined Business Rule Events<br />Steps<br />Add your event to the business rule GUI<br />Create a business rule for ...
Add your event to the business rule GUI<br />
Add your event to the business rule GUI<br />
Create a business rule for your event<br />Object: 	Case<br />Event: Change Priority<br />Condition: <br />Action: 	Notify...
Create time bomb (ClearBasic)<br />dim TimeBombRecord     	as New Record<br />dim TimeBombSave       	as New BulkSave<br /...
Time Bomb Flags<br />flags = (n * 65536) + 2<br />for our example of event id 1001:<br />(1001 * 65536) + 2 = 65601538<br />
User-Defined Events<br />The User-Defined Business Rule Events document on the rulemanager wiki has all the gory details t...
	Lets see this in action…<br />
Additional Customizations	<br />
Adding new object types to Biz Rules<br />For example, create business rules for your custom object, such as<br />widget<b...
Adding new object types to Biz Rules<br />
Adding new object types to Biz Rules<br />Customize the Business Rules form (472)<br />Add a new entry to the Object Type ...
Adding new object types to Biz Rules<br />Refer to the Adding new Object Types to Business Rules document on the rulemanag...
Adding Event Creation Times<br />Examples:<br />Fire an action -30 days fromcontract expiration date<br />Fire an action -...
Adding Event Creation Times<br />
Adding Event Creation Times<br />Customize the Business Rule Action Form (474), adding a new entry to the List<br />Add a ...
Adding Event Creation Times<br />The User-Defined Business Rule Event Creation Times document on the rulemanager wiki has ...
Adding Custom Calendars<br />For example, fire a rule based on the business hours of a queue<br />
Adding Custom Calendars<br />
Adding Custom Calendars<br />Edit the Business Rule Actions form (474)<br />Add your new business calendar to the List<br ...
Adding Custom Calendars<br />The creating user-defined calendars page on the rulemanager wiki has all the details.<br />ht...
Time Bombs<br />
What the heck is a Time Bomb?<br />A time bomb is the mechanism used to tell Rulemanager that something happened in the sy...
What the heck is a Time Bomb?<br />A time bomb is simply a row inserted into the time_bomb table<br />
Different kinds of Time Bombs<br />Rule Scheduling Time Bomb<br />Indicates an end-user event, such as Case Create<br />Ru...
Time Bomb Flow<br />An event happens in the system (such as case is created)<br />A new time bomb is created<br />Rulemana...
Time Bomb Data<br />The flags field indicates:<br />which kind of time bomb it is<br />What event occurred<br />The escala...
Time Bomb Data<br />The Business Rule Time Bombs document on<br />the rulemanager wiki has all the gory details<br />http:...
troubleshooting<br />
Common Issues<br />Rules not firing at all<br />Rules firing at wrong time<br />Rules fire, but notifications are not set<...
Troubleshooting<br />Tip<br />
Logging is your friend<br />Clarify Rulemanager: <br />	set the Logging Level to Verbose<br />	make sure the admin email a...
Rules fire, but notifications are not set<br />Check:<br />User’s email address<br />User’s Notification Preferences<br />...
Bad Time Bomb<br />A bad time bomb will have it’s expiration date set way in the future (1/1/2999)<br />This allows you to...
Future shows<br />
Future Sessions (under consideration)<br />Performance Tuning of Rulemanager<br />Monitoring<br />cbbatch<br />Your Ideas?...
Learn More<br />Wiki:http://rulemanager.wikispaces.com/<br />
Questions, Comments, Queries?<br />http://backnoise.com/?rulemanager<br />
Upcoming SlideShare
Loading in …5
×

Advanced business rules (part2)

2,069
-1

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,069
On Slideshare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • 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.
  • Skype, clickatell, twitter, twilio, office communicator, jabber, Google, GChat
  • Simple – just a little UI editing
  • 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.
  • Advanced business rules (part2)

    1. 1. Advanced Rulemanager &Business Rules(Part 2)<br />Join the conversation:http://backnoise.com/?rulemanager<br />
    2. 2. BackChannel<br />Join the conversation:<br />http://backnoise.com/?rulemanager<br />
    3. 3. Me<br />Gary Sherman, Clarify<br />
    4. 4. Previously, on Days of Our Lives…<br />Intro to Rulemanager and Business Rules<br />Advanced Business Rules (Part 1)<br />Both presentations are available on the Rulemanager wiki: http://rulemanager.wikispaces.com<br />
    5. 5. Custom Notification methodS<br />
    6. 6. Baseline notification methods<br />Email <br />Notifier<br />Tone Pager<br />Digital Pager<br />Text Pager<br />None<br />Forward to my Supervisor<br />
    7. 7. 1990 called and wants their pagers back<br />Email <br />Notifier<br />Tone Pager<br />Digital Pager<br />Text Pager<br />None<br />Forward to my Supervisor<br />
    8. 8. 1990 called and wants their pagers back<br />Rulemanager uses an external app to send pages<br />This means we can take over that method<br />And we can do whatever we want!<br />
    9. 9. Paging Application Configuration<br />Clarify Rulemanager:<br /> SvcConfig.exe (Windows)<br /> Rulemansvc.env (UNIX)<br />Dovetail Rulemanager:<br /> <add key="NotificationConfig.PagerApplicationPath" value=“c:mypager.bat" /><br />
    10. 10. Paging Application<br />{paging application} <br /> -p <pager_type> <br /> -t <employees pager number> <br /> -m <message to be sent> <br /> -e <employees email address><br />pager_clerk.exe -p SKY_WORD -t 512-123-4567 -m “This is a message” -e “gary@dovetailsoftware.com”<br />
    11. 11. Paging Application<br />{paging application} <br /> -p <pager_type> <br /> -t <employees pager number> <br /> -m <message to be sent> <br /> -e <employees email address><br />pager types:text pager: SKY_WORD<br /> digital pager: DIGITAL<br /> tone pager: SKY_PAGER<br />
    12. 12. My Paging Application<br />DOS batch file<br />Powershell script <br />UNIX shell script<br />Java or .NET executable<br />cbbatch script<br />Javascript script<br />Ruby script<br />
    13. 13. My Paging Application<br />Send an SMS message <br />Send an email to a user’s mobile device (email to SMS gateway)<br />Make a phone (voice) call<br />Send a direct Twitter message<br />Send an Instant Message<br />Send a message to a beeper (in case you’re still stuck in 1990) <br />Third party APIs and services make this easy<br />
    14. 14. Additional Nicety – Modify the UI<br />
    15. 15. Which Message?<br />Tip<br />If sending to a text pager, then the full message is used.<br />If sending to a tone or digital pager, then the abbreviated message is used. <br />
    16. 16. Custom Notification Methods<br />There are a couple of examples on the rulemanager wiki<br />http://rulemanager.wikispaces.com<br />
    17. 17. Lets see this in action…<br />
    18. 18. CUSTOM BUSINESS Rule EVENTS<br />
    19. 19. Example<br />Fire a business rule when the Priority of a Case is changed <br />
    20. 20. Custom Events<br />
    21. 21. User-Defined Business Rule Events<br />Steps<br />Add your event to the business rule GUI<br />Create a business rule for your event<br />Optional: Create an act_entry for your event<br />Create time bomb for your event<br />
    22. 22. Add your event to the business rule GUI<br />
    23. 23. Add your event to the business rule GUI<br />
    24. 24. Create a business rule for your event<br />Object: Case<br />Event: Change Priority<br />Condition: <br />Action: Notify someone<br />
    25. 25. Create time bomb (ClearBasic)<br />dim TimeBombRecord as New Record<br />dim TimeBombSave as New BulkSave<br />TimeBombRecord.RecordType = "time_bomb"<br />TimeBombRecord.SetField "focus_lowid", caseRecord.GetField("objid")<br />TimeBombRecord.SetField "focus_type", 0<br />TimeBombRecord.SetField "escalate_time", "1/1/1753 "<br />TimeBombRecord.SetField "end_time", App.CurrentDate<br />TimeBombRecord.SetField "flags", 65601538<br />‘Optional field<br />TimeBombRecord.SetField "time_period", actRecord.GetField("objid")<br />TimeBombSave.InsertRecordTimeBombRecord<br />TimeBombSave.RelateRecordsToIdTimeBombRecord, "employee", _ App.EmployeeObjid, "cmit_creator2employee"<br />TimeBombSave.Save<br />
    26. 26. Time Bomb Flags<br />flags = (n * 65536) + 2<br />for our example of event id 1001:<br />(1001 * 65536) + 2 = 65601538<br />
    27. 27. User-Defined Events<br />The User-Defined Business Rule Events document on the rulemanager wiki has all the gory details that I just covered.<br />http://rulemanager.wikispaces.com<br />
    28. 28. Lets see this in action…<br />
    29. 29. Additional Customizations <br />
    30. 30. Adding new object types to Biz Rules<br />For example, create business rules for your custom object, such as<br />widget<br />license_key<br />build<br />
    31. 31. Adding new object types to Biz Rules<br />
    32. 32. Adding new object types to Biz Rules<br />Customize the Business Rules form (472)<br />Add a new entry to the Object Type List<br />Add your custom events to the event List<br />Add your custom rule properties <br />Add your custom recipient aliases<br />Create your business rule<br />Create your custom time bomb<br />
    33. 33. Adding new object types to Biz Rules<br />Refer to the Adding new Object Types to Business Rules document on the rulemanager wiki: http://rulemanager.wikispaces.com<br />
    34. 34. Adding Event Creation Times<br />Examples:<br />Fire an action -30 days fromcontract expiration date<br />Fire an action -30 days fromlicense key expiration date<br />Fire an action 180 days froma site’s last onsite visit date<br />
    35. 35. Adding Event Creation Times<br />
    36. 36. Adding Event Creation Times<br />Customize the Business Rule Action Form (474), adding a new entry to the List<br />Add a Property Name Object for this new Event Creation (@USERTIME150)<br />
    37. 37. Adding Event Creation Times<br />The User-Defined Business Rule Event Creation Times document on the rulemanager wiki has all the details.<br />http://rulemanager.wikispaces.com<br />
    38. 38. Adding Custom Calendars<br />For example, fire a rule based on the business hours of a queue<br />
    39. 39. Adding Custom Calendars<br />
    40. 40. Adding Custom Calendars<br />Edit the Business Rule Actions form (474)<br />Add your new business calendar to the List<br />Create a new rule property for the path to find the new business calendar entry<br />Create a new rule property for the time zone for the calendar<br />
    41. 41. Adding Custom Calendars<br />The creating user-defined calendars page on the rulemanager wiki has all the details.<br />http://rulemanager.wikispaces.com<br />
    42. 42. Time Bombs<br />
    43. 43. What the heck is a Time Bomb?<br />A time bomb is the mechanism used to tell Rulemanager that something happened in the system<br />
    44. 44. What the heck is a Time Bomb?<br />A time bomb is simply a row inserted into the time_bomb table<br />
    45. 45. Different kinds of Time Bombs<br />Rule Scheduling Time Bomb<br />Indicates an end-user event, such as Case Create<br />Rule Time Bomb<br /> Reflect the upcoming action of a business rule<br />Message Time Bomb<br />Internal communication to rulemanager, such as telling it to re-cache information<br />
    46. 46. Time Bomb Flow<br />An event happens in the system (such as case is created)<br />A new time bomb is created<br />Rulemanager looks at all of the business rules in the system, to see if this event matches to any business rules<br />If a start event matches, then Rulemanager evaluates the rule conditions<br />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)<br />When this time bomb expires, then the business rule action is fired<br />
    47. 47. Time Bomb Data<br />The flags field indicates:<br />which kind of time bomb it is<br />What event occurred<br />The escalate field says when this time bomb will “go off”<br />Other data :<br />objid of the “act_entry” for this event<br />objid and type of focus object (case 268435457)<br />
    48. 48. Time Bomb Data<br />The Business Rule Time Bombs document on<br />the rulemanager wiki has all the gory details<br />http://rulemanager.wikispaces.com<br />
    49. 49. troubleshooting<br />
    50. 50. Common Issues<br />Rules not firing at all<br />Rules firing at wrong time<br />Rules fire, but notifications are not set<br />Bad Time Bombs<br />
    51. 51. Troubleshooting<br />Tip<br />
    52. 52. Logging is your friend<br />Clarify Rulemanager: <br /> set the Logging Level to Verbose<br /> make sure the admin email address is set<br />Dovetail Rulemanager : <br /> set the logging level to DEBUG<br /> log warnings and errors to a separate log file<br /> send email to admin on errors <br />
    53. 53. Rules fire, but notifications are not set<br />Check:<br />User’s email address<br />User’s Notification Preferences<br />User’s Business Hours<br />User’s Site’s Business Hours<br />
    54. 54. Bad Time Bomb<br />A bad time bomb will have it’s expiration date set way in the future (1/1/2999)<br />This allows you to diagnose it<br />Typically caused by custom time bombs<br />Review log file (search the logs for the time bomb’s objid)<br />Review the data in the time_bomb record<br />
    55. 55. Future shows<br />
    56. 56. Future Sessions (under consideration)<br />Performance Tuning of Rulemanager<br />Monitoring<br />cbbatch<br />Your Ideas?<br />
    57. 57. Learn More<br />Wiki:http://rulemanager.wikispaces.com/<br />
    58. 58. Questions, Comments, Queries?<br />http://backnoise.com/?rulemanager<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×