[RavenclawDev 192] Re: problems with resetting an agent

Svetlana Stenchikova svetastenchikova at gmail.com
Sat Nov 11 23:27:10 EST 2006


Hi, this is regarding the same issue.

Could someone please elaborate on how the looping (as in main loop
AskAnythingElse) is achieved?

I assumed that RESET_AGENT is the macro that does it, but I am failing to
achieve this so far. Please see more description on what I did in the
previous message.

I am also tried REOPEN_AGENT and reopening all children of the agent. Also
tried reopening concepts (although I think that concepts should not have
anything to do with looping, right?)

Thank you, I appreciate all of your help.

Svetlana



On 10/28/06, Svetlana Stenchikova < svetastenchikova at gmail.com> wrote:
>
> Hi,
>
> I am trying to createan agent (CIdSingleFilter defined below) which
> identifies a single event in a database.
> It asks user to specify the type, date, time criterion until only one
> event matches.
>
> eventlistresult is an array concept which is declared in an agency above
> and gets filled in by the GetEvents
>
> NoMatch, RequestClarify, AskWhich are the inform agents which get
> activated depending on the content of eventlistresult
>
> In order to simulate a loop I call ResetThisAgent, which calls RESET_AGENT
> on IdSingleFilter.
>
> If SIZE(eventlistresult)== 1, the agency successfully completes.
>
> I would expect that if SIZE(eventlistresult)!= 1, then ResetThisAgent,
> would place all of the subagents of IdSingleFilter back on stack and
> continue the loop.Instead I get an exception:
>
>
> ***************************************************************************
> [COR at 00:52:53.563] Executing dialog agent
> /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter ...
> [WAR at 00:52:53.566] Failure information for Agency
> /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter
> Agent /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter/NoMatch has not
> completed, does not have preconditions satisfied, and is not blocked.
> Agent /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter/RequestClarify
> has completed, does have preconditions satisfied, and is not blocked.
> Agent /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter/AskWhich has not
> completed, does not have preconditions satisfied, and is not blocked.
> Agent /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter/QueryFilter has
> completed, does have preconditions satisfied, and is not blocked.
> Agent /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter/DBGetEvents has
> completed, does have preconditions satisfied, and is not blocked.
> Agent /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter/ResetThisAgent
> has completed, does have preconditions satisfied, and is not blocked.
>  <file c:\documents and settings\sveta\my
> documents\work\calendar\ravencalendar\libraries\ravenclaw\dmcore\agents\dialogagents\basicagents\dialogagency.cpp,
> line 183>.
> [FATAL_ERROR at 00:52:53.566] Agency
> /RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter failed to complete.
> <file c:\documents and settings\sveta\my
> documents\work\calendar\ravencalendar\libraries\ravenclaw\dmcore\agents\dialogagents\basicagents\dialogagency.cpp,
> line 149>.
>
> ***************************************************************************
>
>
>
> Can you tell if something is wrong with my logic?
>
> thank you
>
>
>
> //-----------------------------------------------------------------------------
> // /RavenCalendar/Task/IdSingleFilter
>
> //-----------------------------------------------------------------------------
> DEFINE_AGENCY( CIdSingleFilter,
>     IS_MAIN_TOPIC()
>
>
>     //    BOOL_SYSTEM_CONCEPT(backend_error))
>     DEFINE_SUBAGENTS(
>         SUBAGENT(NoMatch, CNoMatch, "")
>         SUBAGENT(RequestClarify, CRequestClarify, "")
>         SUBAGENT(AskWhich, CAskWhich, "") //undefined num
>         SUBAGENT(QueryFilter, CQueryFilter, "") //agency getting concepts
>         SUBAGENT(DBGetEvents, CDBGetEvents, "") // get the list
>         SUBAGENT(ResetThisAgent, CResetThisAgent, "")
>         )
>
>     SUCCEEDS_WHEN(AVAILABLE(eventlistresult) && SIZE(eventlistresult)==1)
>
>                   )
>
>
>
> //---------------------------------------------------------------------------
> //
> //--------------------------------------------------------------------
> DEFINE_EXECUTE_AGENT( CResetThisAgent,
>            RESET_AGENT(..)
>     )
>
>
> also tried
>
> //---------------------------------------------------------------------------
> //
> //--------------------------------------------------------------------
> DEFINE_EXECUTE_AGENT( CResetThisAgent,
>
> RESET_AGENT(/RavenCalendar/Task/TaskRemoveEvents/IdSingleFilter)
>     )
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.srv.cs.cmu.edu/pipermail/ravenclaw-developers/attachments/20061111/7fe5e5a3/attachment.html


More information about the Ravenclaw-developers mailing list