|
From: Fry, C. R. {C. (ARC-TI)[S. INC] <chu...@na...> - 2014-07-03 21:00:02
|
Hi Chris. I agree that this behavior seems unintuitive, but by default a node's invariants (which determine failure) are dependent solely on its ancestors, not its children. You can argue that this dependency should go both ways for LibraryCall nodes.
Off the top of my head, you could add to the call node an invariant condition of GraspPreconditions.OUTCOME != FAILURE. That should give the behavior you're looking for.
-- Chuck
On Jul 3, 2014, at 1:23 PM, Chris LANGLEY <Chr...@md...<mailto:Chr...@md...>> wrote:
Dear PLEXIL support,
Is there a way to make a LibraryCall node fail when the action it calls fails?
For example, I have:
// Declaration of library action
LibraryAction GraspPreconditions(In Integer theEndEffectorID, In Integer theGrappleID, In Boolean theCmdState);
// Some other declarations etc. here
// Then:
GraspPrecondCallNode: LibraryCall GraspPreconditions(theEndEffectorID = 5, theGrappleID = 9, theCmdState = true);
When I execute this in such a way that I know GraspPreconditions(…) will fail, I get the following output:
[Node:outcome]Outcome of 'GraspPreconditions' is FAILURE
[Node:outcome]Outcome of 'GraspPrecondCallNode' is SUCCESS
Does this mean that the “call” was a success, even though the actual action was a failure? Intuitively I would expect that if the latter failed, then so should the library call, so the result of (for example)
PostCondition GraspPrecondCallNode.outcome == SUCCESS;
did not behave as I expected. My idea is to work around this by introducing an InOut parameter to GraspPreconditions which acts as the return value, but is there a cleaner way to achieve the desired behavior?
Thanks and regards,
Chris
Chris Langley
MDA
9445 Airport Road
Brampton, ON
L6S 4J3
(905) 790-2800 x4199
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft_______________________________________________
plexil-support mailing list
ple...@li...<mailto:ple...@li...>
https://lists.sourceforge.net/lists/listinfo/plexil-support
Chuck Fry | QTS Inc.
Office: 650 604 1882 Mobile: 408 230 2715
M/S 269-1, Building N269/260-7
NASA Ames Research Center
Moffett Field, CA 94035-1000
I do not speak for QTS Inc., SGT, Code TI, or NASA, nor do they speak for me.
|