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?
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
<?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">
<!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?
<?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>
<?xml version="1.0" encoding="UTF-8"?>
<forms>
<form task="testform" form="testform.xhtml"/>
</forms>
<!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>
<?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>