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 >> Agent for GTD-use possible?
http://www.eastgate.com/Tinderbox/forum//YaBB.cgi?num=1199266205

Message started by AndreasE on Jan 2nd, 2008, 4:30am

Title: Agent for GTD-use possible?
Post by AndreasE on Jan 2nd, 2008, 4:30am

I have created a long outline of projects, each broken down into steps and finally into some actions. Actions that can start immediately get the badge "next".

I would now like to have an agent that lists all projects that do not have at least one action with Badge=next below them. Is that possible, and if yes, how would the condition look like?

This is for GTD-like purposes, of course: These are the projects I have to think about more thoroughly how to attack them.

I have to add I am quite new to Tinderbox. So, any hints are very welcome!

Title: Re: Agent for GTD-use possible?
Post by Mark Bernstein on Jan 2nd, 2008, 11:15am

My strategy for this task would be to break up the work into three parts.

First, we'll define a new boolean attribute, HasNextTask.  It's true if the project has a next task.

Next, we'll add a rule to the prototype for projects, that automatically sets the new attribute.

     HasNextTask=any(child,HasNextTask)

Tasks use the same boolean attribute, and the rule

    if(Badge="next"){HasNextTask=true} else {HasNextTask=false;}

Finally, an agent can gather all the projects that have no next task:

    Query:  Prototype=protoProject & HasNextTask

All this is typed by hand; there may be typos and errors.  I haven't tested it.  And I bet there's a simpler solution (and a better name for the user attribute!)

Title: Re: Agent for GTD-use possible?
Post by Amber Vaesca on Feb 26th, 2008, 11:44am

Note, this is using a deprecated feature, but it still works for now.

Simply create an agent with the following AgentQuery (which assumes you have projects assigned to a prototype called "Project" feel free to remove or modify that part of the query):


Code:
Prototype=Project & !^any(child, Badge, next)


And that's it. ^any() returns true if there are any children with the Badge attribute set to 'next', and the exclamation point prefixed means to check for only false returns.

I tried to get the following form to work:


Code:
Prototype=Project & !any(child, Badge, next)


But that isn't working, neither does ..., Badge=next... or ..., $Badge=next... What is the preferring way to do this, now that template code is deprecated?

Title: Re: Agent for GTD-use possible?
Post by Mark Bernstein on Feb 26th, 2008, 3:25pm

any(child,"Badge=next") will work in actions or rules.  It can't be used in queries, though, because paranetheses in queries mean "regular expression".

A good approach might be to have a rule set a boolean user attribute HasNextAction


    HasNextAction=any(child,"Badge=next")

Now, all you have to do is look for containers where HasNextAction is false.

Title: Re: Agent for GTD-use possible?
Post by Amber Vaesca on Feb 26th, 2008, 4:07pm


Mark Bernstein wrote:
any(child,"Badge=next") will work in actions or rules.  It can't be used in queries, though, because paranetheses in queries mean "regular expression".


That makes sense. I like to try and avoid attribute proliferation for state checking like this, but it looks like in this particular scenario it is unavoidable,  and with only one rule and one agent; pretty efficient.

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.