• Workflow - <input> vs. <select>

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
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.
 #12058  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?
Attachments
(64.03 KiB) Downloaded 288 times
 #12073  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 ?
 #12074  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)
 #12076  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.
Attachments
(23.85 KiB) Downloaded 263 times
 #12096  by pavila
 
I would need the source of the process definition to try to reproduce the issue in my local installation.
 #12352  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.
 #12360  by ape
 
OK, let's try once again. Attached files are a direct copy of files from Eclipse workspace.
Thanks!
Attachments
(60.62 KiB) Downloaded 269 times
 #12401  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.
Attachments
Improved invoice workflow.
(61.77 KiB) Downloaded 262 times
 #12405  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.
Attachments
Screenshot with error message
Screenshot with error message
err-01.png (58.17 KiB) Viewed 6950 times
 #12418  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.
 #12422  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.
 #12435  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?
Attachments
(61.6 KiB) Downloaded 277 times
 #12436  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!
 #13090  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
Last edited by visruthcv on Sat Dec 03, 2011 11:25 am, edited 1 time in total.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.