Workflow - <input> vs. <select>

We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
ape
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: Thu Mar 10, 2011 8:05 pm

Workflow - <input> vs. <select>

Post by ape » Mon Sep 05, 2011 9:38 pm

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?
Attachments
Invoice.par.zip
(64.03 KiB) Downloaded 127 times

jllort
Moderator
Moderator
Posts: 10501
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

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

Post by jllort » Tue Sep 06, 2011 9:12 pm

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 ?

jllort
Moderator
Moderator
Posts: 10501
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

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

Post by jllort » Wed Sep 07, 2011 8:19 am

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)

ape
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: Thu Mar 10, 2011 8:05 pm

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

Post by ape » Wed Sep 07, 2011 12:09 pm

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.
Attachments
invoice_par.zip
(23.85 KiB) Downloaded 99 times

pavila
Moderator
Moderator
Posts: 3054
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

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

Post by pavila » Fri Sep 09, 2011 2:07 pm

I would need the source of the process definition to try to reproduce the issue in my local installation.

ape
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: Thu Mar 10, 2011 8:05 pm

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

Post by ape » Tue Sep 20, 2011 9:59 pm

Please find attached forms.xml and processdefinition.xml. Is this enough?
Attachments
Workflow.zip
(2.08 KiB) Downloaded 111 times

pavila
Moderator
Moderator
Posts: 3054
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

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

Post by pavila » Tue Sep 27, 2011 5:06 pm

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.

ape
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: Thu Mar 10, 2011 8:05 pm

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

Post by ape » Tue Sep 27, 2011 9:35 pm

OK, let's try once again. Attached files are a direct copy of files from Eclipse workspace.
Thanks!
Attachments
Invoice.zip
(60.62 KiB) Downloaded 115 times

pavila
Moderator
Moderator
Posts: 3054
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

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

Post by pavila » Fri Sep 30, 2011 12:14 pm

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.
Attachments
invoice.zip
Improved invoice workflow.
(61.77 KiB) Downloaded 108 times

ape
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: Thu Mar 10, 2011 8:05 pm

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

Post by ape » Sat Oct 01, 2011 8:34 am

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.
Attachments
err-01.png
Screenshot with error message

pavila
Moderator
Moderator
Posts: 3054
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

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

Post by pavila » Sun Oct 02, 2011 5:27 pm

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.

ape
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: Thu Mar 10, 2011 8:05 pm

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

Post by ape » Sun Oct 02, 2011 7:33 pm

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.

pavila
Moderator
Moderator
Posts: 3054
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

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

Post by pavila » Mon Oct 03, 2011 5:17 pm

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?
Attachments
invoice.zip
(61.6 KiB) Downloaded 117 times

ape
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: Thu Mar 10, 2011 8:05 pm

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

Post by ape » Mon Oct 03, 2011 6:36 pm

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!

visruthcv
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Thu Dec 01, 2011 10:18 am

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

Post by visruthcv » Thu Dec 01, 2011 10:55 am

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
Last edited by visruthcv on Sat Dec 03, 2011 11:25 am, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest