Page 1 of 1

form must be declared

PostPosted:Thu Dec 16, 2010 2:48 pm
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?

Re: form must be declared

PostPosted:Fri Dec 17, 2010 11:05 am
by jllort
writing the forms.xml file ? do you have it into .par file ?

Re: form must be declared

PostPosted:Fri Dec 17, 2010 12:53 pm
by Rik van der Vaart
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?

Re: form must be declared

PostPosted:Fri Dec 17, 2010 7:53 pm
by jllort
As it's explained here http://wiki.openkm.com/index.php/Eclipse_plugin:_Usage you can generate in some window view the .par file ( look for Save Process Archive Locally )

Re: form must be declared

PostPosted:Fri Dec 17, 2010 9:51 pm
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?

Re: form must be declared

PostPosted:Sun Dec 19, 2010 6:50 pm
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 )

Re: form must be declared

PostPosted:Thu Dec 23, 2010 3:24 am
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 :(

Re: form must be declared

PostPosted:Thu Dec 23, 2010 7:04 am
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..

Re: form must be declared

PostPosted:Thu Jan 13, 2011 9:57 pm
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

Re: form must be declared

PostPosted:Fri Jan 14, 2011 4:40 pm
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

Re: form must be declared

PostPosted:Sat Jan 15, 2011 7:21 pm
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.

Re: form must be declared

PostPosted:Thu Jan 20, 2011 9:34 pm
by pavila
OpenKM has implemented its own forms because those provided by Eclipse plugin are too simple for our requirements. If you want to write a form.xml definition, follow instructions at http://wiki.openkm.com/index.php/Workfl ... definition.