Page 1 of 2

Workflow - <input> vs. <select>

PostPosted:Mon Sep 05, 2011 9:38 pm
by ape
Hi,

I have some stupid error.
Code: Select all
OKM-015026(setTaskInstanceValues): OKM-015026

decision cannot select transition: Decision(decision)
I have decision node:
Code: Select all
<decision name="decision">
	<transition to='001'><condition expression='#{project=="001"}'></condition></transition>
	<transition to='002'><condition expression='#{project=="002"}'></condition></transition>
	<transition to='003'><condition expression='#{project=="003"}'></condition></transition>
	<transition to='101'><condition expression='#{project=="101"}'></condition></transition>
	<transition to='201'><condition expression='#{project=="201"}'></condition></transition>
	<transition to='202'><condition expression='#{project=="202"}'></condition></transition>
	<transition to='205'><condition expression='#{project=="205"}'></condition></transition>
	<transition to='301'><condition expression='#{project=="301"}'></condition></transition>
	<transition to='304'><condition expression='#{project=="304"}'></condition></transition>
	<transition to='325'><condition expression='#{project=="325"}'></condition></transition>
	<transition to='401'><condition expression='#{project=="401"}'></condition></transition>
	<transition to='402'><condition expression='#{project=="402"}'></condition></transition>
	<transition to='403'><condition expression='#{project=="403"}'></condition></transition>
	<transition to='404'><condition expression='#{project=="404"}'></condition></transition>
	<transition to='405'><condition expression='#{project=="405"}'></condition></transition>
	<transition to='000'><condition expression='#{project=="000"}'></condition></transition>
</decision>
Where forms.xml looks as follows:
Code: Select all
<workflow-form task="Assign document to project">
    <input label="Amount" name="amount" data="amount" readonly="true" />
    <input label="Invoice date" name="idate" data="idate" readonly="true" />
    <input label="Payment date" name="pdate" data="pdate" readonly="true" />
    <textarea label="Description" name="description" data="description" readonly="true" />
    <select label="Project" name="project">
        <option label="001" value='001' />
    	<option label="002" value='002' />
    	<option label="003" value='003' />
    	<option label="101" value='101' />
    	<option label="201" value='201' />
    	<option label="202" value='202' />
    	<option label="205" value='205' />
    	<option label="301" value='301' />
    	<option label="304" value='304' />
    	<option label="325" value='325' />
    	<option label="401" value='401' />
    	<option label="402" value='402' />
    	<option label="403" value='403' />
    	<option label="404" value='404' />
    	<option label="405" value='405' />
    	<option label="Missing data" value='000' />
    </select>
    <button name="submit" label="Submit" />
  </workflow-form>
The issue is something with <select> statement. When I remove whole <select> clause, use there single <input> instead and type number manually in the form everything works. The problem is only when I try to use <select>.

Any ideas, please?

Re: Workflow - <input> vs. <select>

PostPosted:Tue Sep 06, 2011 9:12 pm
by jllort
1- try changing <option label="001" value='001' /> to <option label="001" value="001" /> the character ' to "
2- could you try adding on new node between actual and decision, and show there the value of project ? to see if goes fine

Which openkm version are you using ?

Re: Workflow - <input> vs. <select>

PostPosted:Wed Sep 07, 2011 8:19 am
by jllort
par file is not correct send a correct par file ... files can be into folder are directly at root node and now are into a folder called Invoice if you try registering this par file you'll get error
Code: Select all
org.jbpm.jpdl.JpdlException: [[ERROR] no processdefinition.xml inside process archive]
	at org.jbpm.jpdl.par.JpdlArchiveParser.readFromArchive(JpdlArchiveParser.java:43)
	at org.jbpm.jpdl.par.ProcessArchive.parseProcessDefinition(ProcessArchive.java:87)
	at org.jbpm.graph.def.ProcessDefinition.parseParZipInputStream(ProcessDefinition.java:191)

Re: Workflow - <input> vs. <select>

PostPosted:Wed Sep 07, 2011 12:09 pm
by ape
I have changed characters ' to " but no effect :(
I have added additional step to verify if value is present and it is.
I have version: 5.1.8-SNAPSHOT (build: 8187)
Please find attached correct par file.

Re: Workflow - <input> vs. <select>

PostPosted:Fri Sep 09, 2011 2:07 pm
by pavila
I would need the source of the process definition to try to reproduce the issue in my local installation.

Re: Workflow - <input> vs. <select>

PostPosted:Tue Sep 20, 2011 9:59 pm
by ape
Please find attached forms.xml and processdefinition.xml. Is this enough?

Re: Workflow - <input> vs. <select>

PostPosted:Tue Sep 27, 2011 5:06 pm
by pavila
The file forms.xml does not contain the right XML. Seems a duplicated of processdefinition.xml I need also the gpd.xml or an screenshot of the workflow design.

Re: Workflow - <input> vs. <select>

PostPosted:Tue Sep 27, 2011 9:35 pm
by ape
OK, let's try once again. Attached files are a direct copy of files from Eclipse workspace.
Thanks!

Re: Workflow - <input> vs. <select>

PostPosted:Fri Sep 30, 2011 12:14 pm
by pavila
I have made changes to the workflow and form definition. Note that I have changed the type of the input related to dates to type="date". This way you can select the desired date from a calendar. Also I have set the "Invoice Date" to required, and the form will validate it. The best is to deploy this improved workflow and you will see the changes.

Also modified the condition expression and now is easier to check for a selected option value. To make use of this improvement you need to install the OpenKM 5.1.8-SNAPSHOT from http://integration.openkm.com/5.1.x/. This WAR is build every night so you should no download the updated until tomorrow.

Regards.

PD: I have to update the wiki to include these changes, so be patient. I know the workflow part of the wiki should be better documented. I expect to improve this wiki article next week.

Re: Workflow - <input> vs. <select>

PostPosted:Sat Oct 01, 2011 8:34 am
by ape
Well... thanks a lot but unfortunately it returns an error on my installation.
On the very beginning I was trying to do it with "project.value" but it didn't work :(

Please find attached screenshot.

Re: Workflow - <input> vs. <select>

PostPosted:Sun Oct 02, 2011 5:27 pm
by pavila
pavila wrote:Also modified the condition expression and now is easier to check for a selected option value. To make use of this improvement you need to install the OpenKM 5.1.8-SNAPSHOT from http://integration.openkm.com/5.1.x/. This WAR is build every night so you should no download the updated until tomorrow.
Did you read the previous post? The value attribute for select in implemented in developer branch, so need to update your OpenKM.war with the nighbuild.

Re: Workflow - <input> vs. <select>

PostPosted:Sun Oct 02, 2011 7:33 pm
by ape
Yes, I read.
Below code
Code: Select all
<condition expression="#{price.value <= 500}"></condition>
was in the documentation far before this last night built was created. This is taken from example 'Purchase'.
Furthermore, when I download Purchase.par example from wiki it works like a charm. It doesn't work just in this invoice workflow. Code looks pretty the same and I don't see any difference between these two - that was my concern.

Re: Workflow - <input> vs. <select>

PostPosted:Mon Oct 03, 2011 5:17 pm
by pavila
In the Purchase.par workflow, the "Purchase price" is a INPUT. The note for download the last nighbuild was related to a improvement in the SELECT form element.

Can you try the attached invoice workflow?

Re: Workflow - <input> vs. <select>

PostPosted:Mon Oct 03, 2011 6:36 pm
by ape
Ok, that's clear. Thank you for explanation.

I have tried attached file but it generates the same error.

I'm going to update my installation and then give it a try.

Thanks again!

Re: Workflow - <input> vs. <select>

PostPosted:Thu Dec 01, 2011 10:55 am
by visruthcv
Hello dears,
I'm having this same problem even after making those (all) changes mentioned above (i.e. changed <select> to <input>, type="numeric" and also to "text"). But no use..!!! :(
While uploading the *.par file to open km (after making <select> to <input>), I'm getting the below errors :-
Code: Select all
Application error
Class: 	com.openkm.core.ParseException
Message: 	The content of element type "input" must match "(validator)*".
Date: 	Thu Dec 01 16:02:20 IST 2011
forms.xml :-
Code: Select all
<select name="project" label="Options" type="text">
      <option label="Right" value="Administrative-Assistant"/>
      <option label="Two Silver" value="toend"/>
      <option label="Three" value="three"/>
</select> 
filetrack.jpdl.xml:-
Code: Select all
<decision name="decision1" expression="#{ "I want the value here" }">
		<transition to="Administrative-Assistant" name="toAdminAssist"></transition>
		<transition to="end-state1" name="toend"></transition>
</decision>
Can anybody tell me how we can get the value of 'project' in the forms.xml to expression in the filetrack.jpdl.xml. If possible, mail me to visruthvsrd@gmail.com.

As an additional information :-
1. The elements and their structure are already declared in an external file called workflow-forms-1.1.dtd (the link to the file is http://www.openkm.com/dtd/workflow-forms-1.1.dtd ). Is there any way to get out of this problem if we make any changes to this file after downloading.
(I don't think so, because I think we should know in which format (eg:- project.value) the OpenKM accepts values.)
2. If it was successful we could add additional components(elements) in the work-flow.

If this problem can not be rectified at all, suggest any other methods(using any other components/elements) to do this scenario.
Thanks and regards,
Visruth
visruthvsrd@gmail.com