HOME | SOLUTIONS | INDUSTRIES | SERVICES | ABOUT US | NEWS & EVENTS | SUPPORT CENTER | CONTACT

 
Product Documentation
Dovetail SelfService
Knowledge Base
Support Forums
Employee Blogs
Contact Us

How to create business rules for custom objects (Article # 234)

View products that this article applies to.

Problem:

How to create business rules for custom objects

Resolution:

Assumptions:
The custom object already exists in your database.

1. Add a custom object type for business rule properties:
Modify $DovetailAdmin\pages\rule_prop\inc_lists.asp
Locate the function DdlObjectType()
Add your custom option, for example:
out += '<option value="4628" object="fc_build"  >Product Build</option>' ;
It's important that the value is the id of the custom table.

2. Setup conditions and recipient aliases
Once the orevious step is complete, the Business Rule Properties GUI in Dovetail Admin can be used to create properties for conditions and for recipient aliases.

3. Add a custom object type for business rules:
Modify $DovetailAdmin\pages\biz_rule\inc_lists.asp
Locate the function DdlObjectType()
Add your custom option, for example:
out += '<option value="fc_build" object="FC_BUILD">Product Build</option>' ;

4. Adding Events for custom objects:
Events are loaded from the SEL_EVENT control on form 472. Use UI editor to add custom events per the Clarify documentation. This allows existing custom events to be automatically loaded by Dovetail Admin.
OR
Modify $DovetailAdmin\pages\biz_rule\inc_lists.asp
Locate the function DdlEvents()
Add your custom event option, for example:

  out += '<option ';
  out += 'value="USER1001" ';
  out += 'object="FC_BUILD"';
  out += '>Create Build</option>' ;

5. Create business rule(s)
Use the Business Rule GUI within Dovetail Admin to create business rules for your custom objects.

6. Create Time Bombs that Trigger Your User-Defined Events.
You will need to add custom code for creating time bombs that trigger your custom events.
The default Dovetail applications will not create any time bombs that correspond to your user-defined events.  You create events through the creation of time_bomb objects that contain your new user-defined event.  Time bombs contain a variety of information, including a specification of the event id.  The ‘flags’ field of the time_bomb object should contain the following information:
1)      The event id, in the high order 16 bits.
2)      A value of 2 in the lower order 16 bits.

The event id is the numeric portion of the user-defined event name you specified in step 4.  Thus, the event id of the user-defined event ‘USER1001’ is 1001.  Therefore, the value of the ‘flags’ field of the time_bomb object that generates the event n should be ‘(n * 65536) + 2’ (or  ‘1001 * 65536) + 2 = 65601538’ for our example of event id 1001). Once a time bomb with this flags value has been saved to the database, the rulemgr should treat it as an event that corresponds to your user-defined event id.



Applies To:

Copyright © 2008 Dovetail Software, Inc. All rights reserved.

 

support center | blogs | terms & conditions | contact