Author: rahul
Date: Thu Dec  1 16:12:22 2005
New Revision: 351532

URL: http://svn.apache.org/viewcvs?rev=351532&view=rev
Log:
Treat a NFE as an "immediate" send.

Modified:
    
jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java

Modified: 
jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java?rev=351532&r1=351531&r2=351532&view=diff
==============================================================================
--- 
jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java
 (original)
+++ 
jakarta/commons/sandbox/scxml/trunk/src/main/java/org/apache/commons/scxml/semantics/SCXMLSemanticsImpl.java
 Thu Dec  1 16:12:22 2005
@@ -249,9 +249,19 @@
                         params.put(varName, varObj);
                     }
                 }
+                String delay = snd.getDelay();
+                long wait = 0L;
+                if (delay != null && delay.length() > 0) {
+                    try {
+                        wait = Long.parseLong(delay.trim());
+                    } catch (NumberFormatException nfe) {
+                        APP_LOG.warn("Could not parse delay for <send>, "
+                            + "it will be treated as immediate", nfe);
+                    }
+                }
                 evtDispatcher.send(snd.getSendid(),
                         snd.getTarget(), snd.getTargettype(), snd.getEvent(),
-                        params, hints, Long.parseLong(snd.getDelay()));
+                        params, hints, wait);
             } else if (a instanceof Var) {
                 Var vr = (Var) a;
                 String varName = vr.getName();



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to