• form must be declared

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
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.
 #7568  by Rik van der Vaart
 
After building a form with jBPM and having it added to the forms.xml file, OpenKM throws an error message "OKM-015019(getProcessDefinitionForms) Element 'form' must be declared". How can I solve this problem?
 #7587  by jllort
 
writing the forms.xml file ? do you have it into .par file ?
 #7615  by Rik van der Vaart
 
I load all files directly to server from Eclipse so I do not save it in a local archive *.par file. Do you want me to save it locally and send it to you so you can view it?
 #7626  by jllort
 
There's some bug in 5.0 stable doing it ( deploying directly from eclipse ), create the .par file and upload to OpenKM via browser. The bug is solved in svn ( we found later we released 5.0 stable )
 #7711  by surajaya
 
Rik van der Vaart wrote:Eclipse/jBPM automatically adds the link to the .xhtml file to the forms.xml form. What is the ".par" file? What must I do to this file?
.par file is basically just a zip file. You can simply zip your files and rename it to .par

I'm currently trying workflow in openkm 5.0 too, but openkm seem can't parse forms produced by eclipse (i'm using eclipse galileo). I always got this error : "Document is invalid: no grammar found." whenever I tried to deploy workflow with forms.xml designed in eclipse. However I successfully deploy workflow (with form) which comply with the syntax in the wiki. Unfortunately, I have to do it by hand to do so :(
 #7717  by jllort
 
Pay attention that workflow generated here must contains something like:
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">
Depending OpenKM version http://www.openkm.com/dtd/workflow-forms-1.0.dtd can change to upper version http://www.openkm.com/dtd/workflow-forms-1.1.dtd etc..
 #7973  by Rik van der Vaart
 
Ifan xhtml form is made, the protocol of the
<!DOCTYPE workflow-forms PUBLIC "-//OpenKM//DTD Workflow Forms 1.0//EN" "http://www.openkm.com/dtd/workflow-forms-1.0.dtd">
is not used anymore,isn't it?
I upload the set of files manually as explained through a .par file. But browser just goes blank when I do this. I have tried a very simple workflow to try and see what the problem is but to no avail. What am I missing?

this is the source of the workflow FormTest:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>

<process-definition  xmlns="urn:jbpm.org:jpdl-3.2"  name="FormTest">


	<start-state name="start-state1">
		<transition to="Test"></transition>
	</start-state>

	<task-node name="Test">
		<task name="testform"></task>
		<transition to="end-state1" name="toend"></transition>
	</task-node>

	<end-state name="end-state1"></end-state>

</process-definition>
This is the source of the forms.xml:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>

<forms>
  <form task="testform" form="testform.xhtml"/>
</forms>
and this is the source of the testform.xhtml:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >

<!-- the DOCTYPE means we are required to use html for a root element -->
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:c="http://java.sun.com/jstl/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:tf="http://jbpm.org/jsf/tf"
      xmlns:jbpm="http://jbpm.org/jsf">

  <ui:component>

    <jbpm:dataform>
  	
      <f:facet name="header">
        <h:outputText value="#{taskName}"/>
      </f:facet>
        
      <!-- TASKFORM ROWS -->
    	    	    
      <jbpm:datacell>
        <f:facet name="header">
          <h:outputText value="Actions"/>
        </f:facet>
        <!-- TASKFORM BUTTONS -->
      <tf:saveButton value="Save"/>
      <tf:cancelButton value="Cancel"/>
      <tf:transitionButton transition="toend" value="toend"/>
      </jbpm:datacell>
	    
    </jbpm:dataform>	
    
  </ui:component>

</html>
OpenKM 5.0 RC-1
 #7985  by jllort
 
1- About processdefinition.xml: call initial start node "start" and end node "end" ( nothing else ).
2- About form.xml put there you're form description as :
Take a look here http://wiki.openkm.com/index.php/Workfl ... definition
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>
That's really so different you've been writing your form.xml file
 #7999  by Rik van der Vaart
 
I have no problems with the form.xml. That works nicely.

However, I am trying to work with the .xhtml definitions made with jboss in eclipse, which you stated did not deploy into OpenKM yet. That is what I am uploading manually but getting a blank screen after uploading. I possibly am doing something wrong. That is why I posted the simple example. Hope I am being more clear.

Thanks in advance for your attention.

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.