Is it ok to call a process from a rule.
I have a rule on a Business Object that calls a process when a condition is met and it is a new instance of the Business Object. This works, as when the user selects create, they are presented with another Business Object that is required.
I also put the same rule when the Business Object was changed but this is not being called. (I originally tried just using without stating if Business Object was New or Changed but still only worked at creation stage)
1st Rule:
If CallRecord IS NEW AND CallRecord.NeedDetail='Yes' AND CallRecord.DetailGiven<>'DetailGiven' Then
CallDetail
2nd Rule
If CallRecord.CallTypeShort WAS CHANGED AND CallRecord.NeedDetail='Yes' AND CallRecord.DetailGiven<>'DetailGiven' Then
CallDetail
Call Detail is the process, this is one of 20 rules in the process all similar:
If CallRecord.CallType.CallType='Amendments' Then
DELETE CallRecord.CallDetails
ENTER NEW Amendments WITH Amendments.CallRecord=CallRecord
VIEW Amendments
VIEW CallRecord USING Main
Calling a process from a rule
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
It is OK to call a process from a rule.
If you change a reference attribute on a form, the object rules are executed immediately. If you change a non-reference attribute (like text, number, date, etc.) on a form, the object rules will be executed after the user clicks Save (Create) button on the form.
What is the type of attribute CallRecord.CallTypeShort?
Also, please use the Log Viewer to see whether the rule is actually executed. If it does, the log should show the result of evaluating condition "CallRecord.CallTypeShort WAS CHANGED".
If you change a reference attribute on a form, the object rules are executed immediately. If you change a non-reference attribute (like text, number, date, etc.) on a form, the object rules will be executed after the user clicks Save (Create) button on the form.
What is the type of attribute CallRecord.CallTypeShort?
Also, please use the Log Viewer to see whether the rule is actually executed. If it does, the log should show the result of evaluating condition "CallRecord.CallTypeShort WAS CHANGED".
Aware IM Support Team
Is the problem that the calltypeshort, needdetail and detail given are all shortcuts to another BO. CallTypeShort and NeedDetail are all based on CallType, and DetailGiven is based on objects in a Business Object Group.
If these three fields are shown on the form they all update correctly but pperhaps the problem is that the rule/process will not work with shortcut attribute values ?
If these three fields are shown on the form they all update correctly but pperhaps the problem is that the rule/process will not work with shortcut attribute values ?
-
- Posts: 595
- Joined: Sun Apr 24, 2005 2:22 am
- Contact:
The rules should inspect changes of the reference attribute - not shortcuts. The process should not go into a queue (there is no queue actually).
What do you see in the browser after you change the reference attribute?
What does the Log Viewer report following the reference attribute change?
What do you see in the browser after you change the reference attribute?
What does the Log Viewer report following the reference attribute change?
Aware IM Support Team