On 9/15/06, Jon Brule <[EMAIL PROTECTED]> wrote:
Thanks for your quick response, Rahul.
My intent with the TaskRouter state is to take a generic inbound event
and automatically pass it on to a the appropriate handling state. For
example, if the event "view_employee_requests" is thrown on the way
into the PerformReportTask_OUTBOUND, then I want to automatically
transition to the ViewEmployeeRequests state.
<snip/>
You do not have to point to the composite state and go through the
initial to reach a descendant state, you can directly point to a
descendant state as the target. Given the above information, history
is probably not particularly relevant here.
-Rahul
My thought was to use
the TaskRouter state in conjunction with a condition to perform this
transition. If I cannot access the inbound event name through a
condition, can I use history in a similar role? I thought that history
would preserve the substate the PerformReportTask_OUTBOUND stat was
last in. Or can I use a history from the state that generated the
"view_employee_requests" event?
I will go review the SCXML specification regarding history...
Thanks again,
Jon
> > <state id="PerformReportTask_OUTBOUND">
> > <initial>
> > <transition target="TaskRouter"/>
> > </initial>
> > <state id="TaskRouter">
> > <transition target="ViewEmployeeRequests" cond="_eventdata.id =
> > 'view_employee_requests'"/>
>
> Suggest using eq instead of equal sign in condition for readability.
>
>
> > <transition target="GetErrorDetail" cond="_eventdata.id =
> > 'get_error_detail_report'"/>
> > </state>
> > <state id="ViewEmployeeRequests" final="true"/>
> > <state id="GetErrorDetail">
> > <transition event="error_detail_retrieved"
> > target="RenderErrorDetail"/>
> > </state>
> > <state id="RenderErrorDetail" final="true"/>
> > <transition event="PerformReportTask_OUTBOUND.done"
> > target="RenderReport"/>
> > </state>
> >
> > </scxml>
<snip/>
> No, _eventdata is just the event payload. If you find yourself wanting
> the event name, there is probably a better approach (such as
> <history>). Why do you need the event name?
<snip/>
--
Jon Brule
tricolorcat-at-gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]