commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J J <>
Subject Re: [scxml] Problem raising event in scxml
Date Tue, 31 May 2011 10:21:00 GMT
Thanks Rahul, 
I've changed the in the way you told me and the warning disappeared, but it 
didn't work in the way I needed, so I've changed the implementation to do it in 
a custom action in the onentry tag. The custom Action does the work fine, but at 
the end I need to raise a "next event" to the queue but it's not working. I try 
to raise the event with eventDispatcher.send method but it's not lauching that 
event. I know it's not launchiung because I have a SCXMLListener with a onentry 
method wich is executed after the custom action and I can see in debug mode the 
states where the the flow goes.

Here is the code I'm using. I've tried also to set target and type to null, but 
it happens the same.

any idea? 


public class Skip extends Action {

    public void execute(EventDispatcher eventDispatcher, ErrorReporter 
            SCInstance scInstance, Log log, Collection derivedEvents) throws 
            SCXMLExpressionException {
            //some checks and if I want to skip this state I add in the String 
            //variable the name of the event
            if(event != null){
                //I want to raise the event
                String sendId = null;
                String target = "#_internal";
                String type = "scxml";
                Map params = null;
                Object hints = null;
                long delay = 0;
                List externalNodes = null;
                eventDispatcher.send(sendId , target, type, event, params, 
hints, delay, externalNodes);

De: Rahul Akolkar <>
Para: Commons Users List <>
Enviado: jue,26 mayo, 2011 15:31
Asunto: Re: [scxml] Problem raising event in scxml

On Thu, May 26, 2011 at 7:55 AM, J J <> wrote:
> Hello,
> I'm having an issue with the <raise> tag inside an <if> element in the 
> content.
> The problem is explained more in this Stackoverflow question:
> Can anyone tell me what may be the problem?

As the warning message indicates, <raise> is not implemented yet,
neither is _event (previously, a subset was _eventdata, which is
implemented). You can use <send> with no target or type to achieve the
same (basically change the element name in that snippet to be send).

You may open enhancement requests for anything that isn't implemented
yet from the latest draft [1].



To unsubscribe, e-mail:
For additional commands, e-mail:
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message