• Workflow Forms definition

  • 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.
 #9582  by luke
 
Hi everyone
I have question. I created a workflow - Eclipse generated a par file, OpenKM imported it but i don`t know where tu put this
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE workflow-forms PUBLIC "-//OpenKM//DTD Workflow Forms 1.0//EN"
                                "http://www.openkm.com/dtd/workflow-forms-1.0.dtd">
<workflow-forms>
  <workflow-form task="MyTask">
    <input label="Amount" name="amount" />
    <button label="Submit" />
  </workflow-form>
</workflow-forms>
I know that it must be an xml file but where to put it or how to import it to the workflow or OpenKM. Maybe in Eclipse there is such magic section to just paste it but I don`t know where it is. On the wiki there is no such information.
Please Help
 #9621  by luke
 
I understand but in the simple form I inserted this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<process-definition  xmlns="urn:jbpm.org:jpdl-3.2"  name="UserInput">
  <start-state name="start">
    <transition to="PlaceOrder" name="trPlaceOrder"></transition>
  </start-state>
  <task-node name="PlaceOrder">
    <task name="MyTask">
      <assignment actor-id="tazplat"></assignment>
      <controller></controller>
    </task>
    <transition to="CheckAvailability"></transition>
  </task-node>
  <decision name="CheckAvailability" expression="#{(amount>100)?'trNotAvailable':'trAvailable'}">
    <transition to="end" name="trAvailable"></transition>
    <transition to="sendMail" name="trNotAvailable"></transition>
  </decision>
  <mail-node name="sendMail" to="stock@your-domain.com">
    <subject>We need more product</subject>
    <text>There is no product, so we must to buy more units!</text>
    <transition to="end"></transition>
  </mail-node>
  <end-state name="end"></end-state>
</process-definition>
My question is where to put User Input Value.
Just paste it in the end of the workflow definition ? or I had to create another xml file. If I had to create another xml file could tell me how to do it ?
 #9939  by pavila
 
The file should be named forms.xml and be located in the same place as processdefinition.xml.
 #9999  by luke
 
Dear Pavila

I created a workflow everything is ok but when I want to insert a value and click submit I get:


couldn't evaluate expression '#{(amount>100)?'trNotAvailable':'trAvailable'}'

What I could possibly do wrong ?

I am using latest OpenKM distribution.
 #10233  by pavila
 
Can you attach the PAR archive here to test it? If can't post, try to include inside a zip
 #10837  by sgastevep
 
I am new, so I perhaps have done the same thing wrong, but using a fresh install of OpenKM 5.0.4, eclipse Helios with the required jBPM 3 downloaded components... The resulting process and forms xml files look to me just like the ones on the wiki web page, and I also get the error when hitting the submit button:

OKM-015026(setTaskInstanceValues): OKM-015026
couldn't evaluate expression
'#{(amount>100)?'trNotAvailable':'trAvailable'}'

I hope it is not a stupid user error.

Steve
Attachments
Console error messages
(1.52 KiB) Downloaded 303 times
PAR renamed ZIP for upload
(11.17 KiB) Downloaded 311 times
 #10899  by pavila
 
As I can see in the log, this is the error:
Code: Select all
Attempt to coerce a value of type "com.openkm.bean.form.Input" to type "java.lang.Long"
The "amount" object is an instance of "com.openkm.bean.form.Input" and should be converted to a more basic type. Try with:
Code: Select all
'#{(amount.value>100)?'trNotAvailable':'trAvailable'}'

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.