Foros de discusión
Kaleo middle state
Rajmund Bocsi, modificado hace 11 años.
Kaleo middle state
New Member Mensajes: 3 Fecha de incorporación: 29/06/11 Mensajes recientes
Hello,
I try to create a simple workflow with Kaleo Forms for Java (in the Liferay Developer Studio). I use Liferay 6.1 EE GA2.
Here's the image:
http://s4.postimage.org/d7pf3se19/fork3.png
and the xml:
When I try to upload the xml to the liferay, the portal says: "An error occured in the workflow engine" with no further explanations in the console log. However, If I remove the reject1 and reject2 state nodes, the uploads is successful. I read somewhere, that kaleo no longer support multiple termination states, but it seems kaleo no longer supports more than two states (initial and termination) either. Is that true?
I try to create a simple workflow with Kaleo Forms for Java (in the Liferay Developer Studio). I use Liferay 6.1 EE GA2.
Here's the image:
http://s4.postimage.org/d7pf3se19/fork3.png
and the xml:
<!--?xml version="1.0" encoding="UTF-8"?-->
<workflow-definition xmlns="urn:liferay.com:liferay-workflow_6.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="urn:liferay.com:liferay-workflow_6.1.0 http://www.liferay.com/dtd/liferay-workflow-definition_6_1_0.xsd">
<name>thefork</name>
<version>1</version>
<state>
<name>created</name>
<metadata>{"transitions":{"fork":{"bendpoints":[]}},"xy":[36,51]}</metadata>
<actions>
<action>
<name>createAction</name>
<script><![CDATA[/* specify action script */
workflowContext.put("reject",false);]]></script>
<script-language>groovy</script-language>
<execution-type>onEntry</execution-type>
</action>
</actions>
<initial>true</initial>
<transitions>
<transition>
<name>fork</name>
<target>fork</target>
</transition>
</transitions>
</state>
<state>
<name>approved</name>
<metadata>{"terminal":true,"xy":[760,90]}</metadata>
<actions>
<action>
<name>approve</name>
<script><![CDATA[Packages.com.liferay.portal.kernel.workflow.WorkflowStatusManagerUtil.updateStatus(Packages.com.liferay.portal.kernel.workflow.WorkflowConstants.toStatus("approved"), workflowContext);]]></script>
<script-language>javascript</script-language>
<execution-type>onEntry</execution-type>
</action>
</actions>
</state>
<task>
<name>approve1</name>
<metadata>{"transitions":{"approve":{"bendpoints":[]},"fork Join":{"bendpoints":[]},"reject":{"bendpoints":[]},"reject1":{"bendpoints":[]}},"xy":[340,220]}</metadata>
<assignments>
<roles>
<role>
<role-type>regular</role-type>
<name>Approver</name>
<auto-create>true</auto-create>
</role>
</roles>
</assignments>
<transitions>
<transition>
<name>approve</name>
<target>fork Join</target>
</transition>
<transition>
<name>reject</name>
<target>reject1</target>
</transition>
</transitions>
</task>
<task>
<name>approve2</name>
<metadata>{"transitions":{"approve":{"bendpoints":[]},"fork Join":{"bendpoints":[]},"reject":{"bendpoints":[]}},"xy":[400,21]}</metadata>
<assignments>
<roles>
<role>
<role-type>regular</role-type>
<name>Approver</name>
<auto-create>true</auto-create>
</role>
</roles>
</assignments>
<transitions>
<transition>
<name>approve</name>
<target>fork Join</target>
</transition>
<transition>
<name>reject</name>
<target>reject2</target>
</transition>
</transitions>
</task>
<fork>
<name>fork</name>
<metadata>{"transitions":{"approve1":{"bendpoints":[]},"approve2":{"bendpoints":[]}},"xy":[140,40]}</metadata>
<transitions>
<transition>
<name>approve2</name>
<target>approve2</target>
</transition>
<transition>
<name>approve1</name>
<target>approve1</target>
</transition>
</transitions>
</fork>
<join>
<name>fork Join</name>
<metadata>{"transitions":{"approved":{"bendpoints":[]},"direction":{"bendpoints":[]}},"xy":[650,136]}</metadata>
<transitions>
<transition>
<name>direction</name>
<target>direction</target>
</transition>
</transitions>
</join>
<task>
<name>update</name>
<metadata>{"transitions":{"republish":{"bendpoints":[]},"fork":{"bendpoints":[]}},"xy":[26,270]}</metadata>
<assignments>
<user></user>
</assignments>
<transitions>
<transition>
<name>republish</name>
<target>fork</target>
</transition>
</transitions>
</task>
<condition>
<name>direction</name>
<metadata>{"transitions":{"update":{"bendpoints":[]},"approved":{"bendpoints":[]}},"xy":[683,302]}</metadata>
<script><![CDATA[/* specify action script */
Boolean reject = (Boolean) workflowContext.get("reject");
if (reject)
returnValue = "update";
else
returnValue = "approved";
]]></script>
<script-language>groovy</script-language>
<transitions>
<transition>
<name>approved</name>
<target>approved</target>
</transition>
<transition>
<name>update</name>
<target>update</target>
</transition>
</transitions>
</condition>
<state>
<name>reject2</name>
<metadata>{"transitions":{"fork Join":{"bendpoints":[]}},"xy":[520,152]}</metadata>
<actions>
<action>
<name>rejectAction1</name>
<script><![CDATA[/* specify action script */
workflowContext.put("reject",true);
]]></script>
<script-language>groovy</script-language>
<execution-type>onEntry</execution-type>
</action>
</actions>
<transitions>
<transition>
<name>fork Join</name>
<target>fork Join</target>
</transition>
</transitions>
</state>
<state>
<name>reject1</name>
<metadata>{"transitions":{"fork Join":{"bendpoints":[]}},"xy":[519,264]}</metadata>
<actions>
<action>
<name>rejectAction2</name>
<script><![CDATA[/* specify action script */
workflowContext.put("reject",true);
]]></script>
<script-language>groovy</script-language>
<execution-type>onEntry</execution-type>
</action>
</actions>
<transitions>
<transition>
<name>fork Join</name>
<target>fork Join</target>
</transition>
</transitions>
</state>
</workflow-definition>
When I try to upload the xml to the liferay, the portal says: "An error occured in the workflow engine" with no further explanations in the console log. However, If I remove the reject1 and reject2 state nodes, the uploads is successful. I read somewhere, that kaleo no longer support multiple termination states, but it seems kaleo no longer supports more than two states (initial and termination) either. Is that true?
zack zhang, modificado hace 10 años.
RE: Kaleo middle state
New Member Mensaje: 1 Fecha de incorporación: 27/03/13 Mensajes recientes
I face the same problem.How to slove this problem?
Rajmund Bocsi, modificado hace 10 años.
RE: Kaleo middle state
New Member Mensajes: 3 Fecha de incorporación: 29/06/11 Mensajes recientes
I don't. We decided to doing the project without workflow engine. Sorry.
Norbert Kocsis, modificado hace 10 años.
RE: Kaleo middle state
New Member Mensaje: 1 Fecha de incorporación: 15/06/12 Mensajes recientes
Hi,
The terminal state of the workflow should be the last state in the xml. Otherwise the parsing will fail.
Br,
Norbert
The terminal state of the workflow should be the last state in the xml. Otherwise the parsing will fail.
Br,
Norbert