-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding external listener #3
Comments
I'm not sure what you are asking for, but I assume you want some network events to be injected into the State Chart. You can inject events by calling However, JSSC is meant to run on the client-side, and you can't just listen to a port with client-side JavaScript. That's not a limitation of JSSC, but of the browser environment. |
I have tried to make my query more clear. How we can listen to SCXML events on the remote server, Is it possible to visualize the whole execution of SCXML (executing on remote server) using JSCXML . thanks |
I see.
|
1.The SCXML is executing on the server (Java SCXML Apache SCXML2) thanks |
Yes, absolutely, you can do that with JSSC. Your server needs to emit those events, of course. Your spec is a little vague so I'm going to make assumptions. Please correct them. On the client-side, the SSE is an On the server-side, you can't open the SSE connection, you can only listen and react when a client tries to open one. So you can't use an invocation. The easiest solution is if you want to send all clients the same events, then you don't need to keep track of each individual client in the back-end SC. I'm going to assume that is the case, and you can extrapolate if not. I'm also going to assume you can have multiple clients for a server. I won't help you code the implementation because I don't want to so much as install a JVM on my machine, let alone edit Java code 😜 but I'll describe it. So what you need is a SSE server library in Java that you can glue into an SCXML event-type extension and that supports You can inject some events from your server-side extension to notify the SC when a client connects and disconnects, so that for example you can exit the states generating those events when no client is listening. |
It's not, and markup languages don't have "statements". The |
Hi,
How can we add SCXML execution listener which can listen to a port. please guide, how can we attain this.
thanks,
Anjali
The text was updated successfully, but these errors were encountered: