Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com)
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi
Tinderbox Users >> Agent, Actions, Rules & Automation >> Upward propagation of attributes
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1217523645

Message started by Rob Forsyth on Jul 31st, 2008, 1:00pm

Title: Upward propagation of attributes
Post by Rob Forsyth on Jul 31st, 2008, 1:00pm

I'm sure this will be a near-FAQ, there are similar looking examples in various places but I can't quite get this to work. I have a large outline that is part of a project-planning process where I am trying to boil tasks down into subtasks until I have truly "actionable" items with specifiable results. If a task has subtasks and all of them have $Actionable=true then I want the parent's $Actionable to be true, recursively up the outline, but if I add a new item anywhere I want its default $Actionable to be false (until manually changed), and to thus propagate an $Actionable = false to its parent(s).

Thanks

Title: Re: Upward propagation of attributes
Post by Mark Anderson on Jul 31st, 2008, 2:18pm

How about this container Rule:
Actionable=any(child,$Actionable=true)

Title: Re: Upward propagation of attributes
Post by Rob Forsyth on Jul 31st, 2008, 4:56pm

I have this as a rule in the prototype defining all items

if (($ChildCount>0)&every(child,$Actionable=true)) {$Actionable=true}

but this doesn't seem to work (i.e. nothing propagates), can anyone see why not?

Title: Re: Upward propagation of attributes
Post by Rob Forsyth on Aug 1st, 2008, 1:03pm

OK, now have this rule working as intended:

if ($ChildCount!=0) {Actionable=every(child,$Actionable=true)}

which is clearly more elegant but as far as I can tell logically equivalent to the previous version. I would still appreciate understanding why the previous version didn't deliver. I realise its a large piece of work but one day a built-in syntax checker would be a major boon to TBX - you're never quite sure if TBX's failure to act as you hoped is due to a logical flaw or a syntax error...

Tinderbox User-to-User Forum (for formal tech support please email: info@eastgate.com) » Powered by YaBB 2.2.1!
YaBB © 2000-2008. All Rights Reserved.