Calling a process from a rule

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
denisv
Posts: 253
Joined: Thu Jan 19, 2006 4:36 pm
Location: Ireland
Contact:

Calling a process from a rule

Post by denisv »

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
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

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".
Aware IM Support Team
denisv
Posts: 253
Joined: Thu Jan 19, 2006 4:36 pm
Location: Ireland
Contact:

Post by denisv »

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 ?
denisv
Posts: 253
Joined: Thu Jan 19, 2006 4:36 pm
Location: Ireland
Contact:

Post by denisv »

If I try to run this rule of the Referenced attribute changing (as you indicated that happens immediately) it places the process in a que and does not complete it.
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

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?
Aware IM Support Team
Post Reply