DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=28481>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28481 Can't call an activity from a step within a block Summary: Can't call an activity from a step within a block Product: Commons Version: 1.0 Alpha Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Sandbox AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] If you use CallStep to invoke another activity, and the CallStep is within a block, rather than directly underneath the activity, then you get a ClassCastException when the invoked activity returns. The offending piece of code is here in BaseContext.execute(): // If there are active calls, resume the most recent one try { nextStep = (Step) calls.pop(); this.activity = (Activity) nextStep.getOwner(); } catch (EmptyStackException e) { ; // Can not happen } continue; It assumes that the owner of the next step is the original activity, whereas in fact it could be the next step in a block. I think that Step needs to have a separate findActivity() method, that will return the owning activity, searching upwards through the owner hierarchy until it finds the activity. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
