Rule query

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
geoff
Posts: 78
Joined: Fri Dec 14, 2007 2:05 am
Location: Brisbane

Rule query

Post by geoff »

I have a BO called Main and attributes InvoiceAddress (plain text) and SendInvoiceTo (plain text, choices = owner, insurance).
Another BO is Subcontractor which has attributes Specialty (plain text, choice = insurance, etc) and Address (plain text).
If user selects Main.SendInvoiceTo = 'Insurance' then I want Main.Invoice Address to be Subcontractor.address for that Specialty.

My rule Invoice Address: IF Main.SendInvoiceTo='Insurance THEN Main.InvoiceAddress=Subcontractors.Address

I get an error "Possible wrong object identifier Subcontractors is used in path Subcontractors.Address in rule Invoice Address."

This is obviously not the way to do it. Can someone tell me in detail how to do this please?
christopherb
Posts: 304
Joined: Fri Jun 22, 2007 8:26 pm

Post by christopherb »

geoff,
There are instances you will receive that message. Continue and save. Test your app and it should work.

Don't know if it is bug but typically happens when updating an OB not associated with the rule, as you are doing.


Maybe Support can clarify that....

Christopher
geoff
Posts: 78
Joined: Fri Dec 14, 2007 2:05 am
Location: Brisbane

Post by geoff »

Thanks Christopherb, unfortunately it does not work. I think there is some little trick here I am missing...Support, can you help?
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

When you attach a rule to a business object it is usually expected that all attributes are referenced from this object. If they are not, you get this warning (if you ignore the warning Aware IM will assume that the object is in the Context - see the User Guide for the explanation).

In your particular case the object that the rule is attached to is "Main". The rule has "Subcontractors.Address" which is not referenced from the Main object. My guess is that the Main object should have reference to the Subcontractors object, so that you can refer to the Subcontractor from the Main object.

By the way, naming an object in plural is not a good idea - you should name it Subcontractor. Should Main refer to one Subcontractor or multiple Subcontractors? If one, then the rule should say Main.Subcontractor.Address. If multiple, you need to decide which of the related subcontractors the rule should refer to, then find the particular subcontractor from the list of subcontractors referenced by the Main object and then assign the value.
Aware IM Support Team
geoff
Posts: 78
Joined: Fri Dec 14, 2007 2:05 am
Location: Brisbane

Post by geoff »

Thanks support. I have now changed my BOs to the singular as you recommended.
To reference my Main object to the Subcontractor object, do I do this by creating attribute Main.Subcontractors of type Subcontractor - is this how it's done?
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Post by aware_support »

Yes.
Aware IM Support Team
Post Reply