0

help with workflow

asked 2010-05-21 19:07:06 +0800

fmelossi gravatar image fmelossi
93

I need an example of workflow with zk 5.0.2. without using spring

Someone please help me.

delete flag offensive retag edit

15 Replies

Sort by ยป oldest newest

answered 2010-05-25 11:36:32 +0800

iantsai gravatar image iantsai
2755 1

what kind of workflow feature you are thinking?

link publish delete flag offensive edit

answered 2010-05-25 18:53:57 +0800

fmelossi gravatar image fmelossi
93

I tried to run the following example http://www.integratedmodelling.org/software/zk/zkworkflow/zkworkflow-demo.html with zk 5.0.2 and did not work.
I just want a simple example to get started, you can help me? please

link publish delete flag offensive edit

answered 2010-05-26 02:37:19 +0800

iantsai gravatar image iantsai
2755 1

what kind of information you have while failure?

link publish delete flag offensive edit

answered 2010-05-29 20:32:38 +0800

fmelossi gravatar image fmelossi
93

throws following error:

org.zkoss.lang.SystemException: org.xml.sax.SAXParseException:
The processing instruction target matching
xX mM lL is not allowed.

file index.zul

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>

<workflow-application

xmlns:xhtml="http://www.w3.org/1999/xhtml"

xmlns="http://www.zkoss.org/2005/zul"

workflow="http://localhost:8080/ZK500App6/simple.xml" id="wapp" width="100%" border="none">

<vbox width="100%">

<groupbox width="400px" height="330px">

<caption label="Workflow interface"/>

<!--
interface components for the three possible steps. Only one of them
will be visible at one time. This can be overridden with the keepVisible
attribute. Otherwise they're simply windows.
-->

<workflow-step step="sayHello" width="100%" height="330px">

<vbox width="100%">

<div>This component handles the "sayHello" state of the
<xhtml:a href="simple.xml"> simple.xml </xhtml:a> workflow.
You are seeing it because the workflow's initial action brought you there.
There are two other possible states, each with its workflow-step
components. The workflow-application only visualizes the GUI
components assigned to the current step, unless you override this
behavior with keepVisible = true.</div>

<div>In this state, you can choose to perform two actions, one that
computes the current time, and another that computes a simple
string.</div>

<div>The buttons below are generated by simply creating two button-trigger
components and passing the respective action names to them. Alternatively,
you can create triggers as complex as you like by wrapping ZUL components
in a worflow-trigger component and calling advanceWorkflow as a
response to user events.</div>

<separator />

<!-- triggers for actions that are relevant to this step. If you don't

have the triggers, you can still advance the workflow programmatically.

-->

<hbox>

<button-trigger action="tellTime" label="Tell time" />

<button-trigger action="sayName" label="Say name" />

</hbox>

</vbox>

</workflow-step>

<workflow-step step="showTheTime" width="100%" height="330px">

<vbox width="100%">

<div>

This component handles the "showTheTime" step. The action that leads
into this step is defined to calculate the current date and set it in
the action variable "time" every time it is executed. The label below
is set to react to a state transition by looking for the value of the
"time" variable in the action that caused it, and setting it as the
label text. You should see the time when you clicked the action button
that sent you here.

</div>

<separator />

<label>

<!-- the "data" field has been set in the action by the

workflow. Note that other transitions will also invoke

this one with a null value, so you want to make sure

that it's fine to have null as a result of

getActionData.

-->

<attribute name="onTransition">

self.setValue(event.data.getVariable("time"));

</attribute>

</label>

<button-trigger action="goBack" label="Go back" />

</vbox>

</workflow-step>

<workflow-step step="showMyName" width="100%" height="330px">

<vbox width="100%">

<div>

This component handles the "showMyName" step. The action that leads
into this step defines the "name" variable. The label below
simply shows it. Variables can be set by actions, steps, or
globally in workflows. The variable resolver looks for a name
in the action, then in the current steps, then in the workflow.

</div>

<div>

Defining variables in steps with the same name is a simple way to
track changing state in workflows. The variables are evaluated
by MVEL code in the same JVM that runs your application and can
be of any Java type. You can also define variables explicitly
in event handlers.

</div>

<separator />

<label>

<!-- name is another workflow-computed variable defined for the

action that brings us here. -->

<attribute name="onTransition">

self.setValue(event.data.getVariable("name"));

</attribute>

</label>

<button-trigger action="goBack" label="Go back" />

</vbox>

</workflow-step>

</groupbox>

<!-- will display status message when an action that has it starts, and

resets it when it ends. Useful for long-running actions, e.g. those that

call another workflow or perform complex calculations.

-->

<label width="100%" value="Status here" id="status"

onStatusMessage="status.setValue(event.data)"/>

</vbox>

</workflow-application>

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
file simple.xml

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE workflow PUBLIC "-//OpenSymphony Group//DTD OSWorkflow 2.8//EN" "http://www.opensymphony.com/osworkflow/workflow_2_8.dtd">

<workflow>

<meta name="lastModified">Thu Mar 13 14:15:45 EDT 2008</meta>

<meta name="created">Thu Mar 13 14:11:13 EDT 2008</meta>

<meta name="generator">OSWorkflow Designer</meta>

<initial-actions>

<action id="0" name="Start Workflow">

<results>

<unconditional-result id="4" old-status="Finished" status="Queued" step="1"/>

</results>

</action>

</initial-actions>

<steps>

<step id="1" name="sayHello">

<actions>

<action id="5" name="tellTime" view="sayHello">

<meta name="status.message">Setting current time</meta>

<meta name="set.time">new java.util.Date().toString()</meta>

<results>

<unconditional-result id="6" old-status="Finished" status="Queued" step="2"/>

</results>

</action>

<action id="7" name="sayName" view="sayName">

<meta name="status.message">Setting name to Jack</meta>

<meta name="set.name"><![CDATA["my name is Jack"]]></meta>

<results>

<unconditional-result id="8" old-status="Finished" status="Queued" step="3" display-name="tellName">

</unconditional-result>

</results>

</action>

</actions>

</step>

<step id="2" name="showTheTime">

<actions>

<action id="11" name="goBack" view="goBack">

<results>

<unconditional-result id="12" old-status="Finished" status="Queued" step="1">

</unconditional-result>

</results>

</action>

</actions>

</step>

<step id="3" name="showMyName">

<actions>

<action id="9" name="goBack" view="goBack">

<results>

<unconditional-result id="10" old-status="Finished" status="Queued" step="1">

</unconditional-result>

</results>

</action>

</actions>

</step>

</steps>

</workflow>

link publish delete flag offensive edit

answered 2010-05-31 11:49:23 +0800

iantsai gravatar image iantsai
2755 1

I don't think you can merge it like this, in Zul, every XML-Tag must has destination Device to handle it, and ZK already implemented zul, zk, xhtml and etc. the others should be treated as native namespace and directly out put as text.
could you examine what you want to do and maybe we can give you better surggestion.

link publish delete flag offensive edit

answered 2010-05-31 14:41:20 +0800

fmelossi gravatar image fmelossi
93

I just try to reproduce the example http://www.integratedmodelling.org/software/zk/zkworkflow/zkworkflow-demo.html.
I'm on the right track to work on zk workflow?

link publish delete flag offensive edit

answered 2010-05-31 22:02:01 +0800

iantsai gravatar image iantsai
2755 1

Hmm... I never use this before, need some check.

link publish delete flag offensive edit

answered 2010-06-04 19:44:12 +0800

fmelossi gravatar image fmelossi
93

can anyone help?, I need to use workflow

link publish delete flag offensive edit

answered 2010-06-10 14:31:31 +0800

fmelossi gravatar image fmelossi
93

can anyone help?, I need to use workflow with zk

link publish delete flag offensive edit

answered 2010-06-15 06:38:16 +0800

iantsai gravatar image iantsai
2755 1

I found this:
http://docs.zkoss.org/wiki/Integrating_ZK_and_Spring_Web_Flow

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-05-21 19:07:06 +0800

Seen: 752 times

Last updated: Jun 22 '10

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