0

zk web flow: read flow definition from servlet

asked 2010-01-13 21:04:27 +0800

lendle gravatar image lendle
213 3

updated 2010-01-13 21:04:44 +0800

Hello,
in a special circumstance, I have to read flow definition from a Servlet.
That is, I have to do something like this:

<?init class="org.zkoss.zwf.FlowHandler" arg0="http://localhost:8080/RhemaRuntime/WebFlowDefinitionServlet?xml=/flow/functions/function1/index.xml"?>

However, this results in the following exception:

java.lang.IllegalArgumentException: Illegal path: http://localhost:8080/RhemaRuntime/WebFlowDefinitionServlet?xml=/flow/functions/function1/index.xml

Is there any workaround to this?
I guess I have to derive from org.zkoss.zwf.FlowHandler, but I don't know where to start.
Appreciate for any suggestions, thanks!

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2010-01-16 00:27:27 +0800

lendle gravatar image lendle
213 3

hello, is this possible?
still looking forward for suggestions,
thanks!

link publish delete flag offensive edit

answered 2010-01-18 05:05:47 +0800

samchuang gravatar image samchuang
4084 4

Hi ~~

From the exception, I am guessing, is't a wrong URL, could you connect to "http://localhost:8080/RhemaRuntime/WebFlowDefinitionServlet?xml=/flow/functions/function1/index.xml" by browser and get file back

In the other hand, I saw a this Web Flowm and did't see a example use Servlet to get source, if you could connect to the URL, but still has exception, I am thinking, maybe you have to figure out another way to do it.

link publish delete flag offensive edit

answered 2010-01-18 07:53:00 +0800

lendle gravatar image lendle
213 3

updated 2010-01-18 07:54:39 +0800

Hello, samchuang:
Thanks.
Yes, it is a valid URL and I can connect to it through browser.
It appears that zk web flow does not interpret it as "URL", and instead, it always try to
interpret given arguments as "file path".

However, it should not be difficult to modify this behavior. Furthermore, since URL is more generic,
I believe that (IMHO) based on URL is better than based on file paths.

Although we can still find some non-trivial solutions to achieve the same behavior,
scalability can be a problem since we have to "fool" zk web flow implementation with a temporary
file path.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-01-13 21:04:27 +0800

Seen: 434 times

Last updated: Jan 18 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More