I have ben doing some work on plan failure handling and have noticed
that plan failure event is generated when a candidate plan is found
for some goal on current intention stack.
It means that if I write a failure handling plan, e.g.
-!p : some_context <- some_plan
and the context is nottrue within current belief base, then whole
intention is dropped.
Same case when no relevant plan is found.
I would like to handle given plan failure only when I have means
(context) to do so. Otherwise, I would like to handle it further in
the intention stack.
I have customised agent architecture and transition system,
overloading findEventForFailure() method so it looks for applicable
plan instead of candidate plan. It seems to do the job, but I don't
have sufficient understanding of Jason's architecture to tell if it
won't spoil something else. I especially wouldn't want to change
Jason's semantics other than i said earlier.
Unfortunately it quite urgent and important matter for me, so I will
stick to changing the TS for the time being.
I'll try to limit it as much as I can though (I hope what I've done is
enough), to be ready to remove it when I can.
As for cascading down the intention stack - it is exactly what I need.
And you are right about doing it also after contingency plan fails.
I forgot to mention it earlier. It is not essential to my work, but
for me such behaviour would be more intuitive than dropping the
It would also allow to do some work after plan failure (e.g. cleaning)
and then by failing contingency plan, pass the failure further (like
throwing exception further in Java).