Workflow Forms definition
From OpenKM Documentation
Revision as of 09:15, 12 April 2010 by Pavila (talk | contribs) (Created page with 'When you want to retrieve data from an user in the workflow, you have to define a way to do so. OpenKM uses the forms.xml file to draw the components in the form. See this sample…')
When you want to retrieve data from an user in the workflow, you have to define a way to do so. OpenKM uses the forms.xml file to draw the components in the form. See this sample:
<?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>
Here we can see an XML which describes the components related to a task called "MyTask". This means that when when workflow is executing the "MyTask" task, it need the user who is assigned this task to enter some information to continue. In the description, we can see an INPUT where the user should type an amount.
As you can see in the XML DOCTYPE, there is a formal definition at http://www.openkm.com/dtd/workflow-forms-1.0.dtd. But let's see which components it can handle:
Input
- label: The text which describes the component. Required.
- name: This value is used to access the value typed by the user. Required.
- value: Here you can specify a default value for this component.
- width: The width of the component. Defaults to browser default input width.
- height: The height of the component. Defaults to browser default input height.
TextArea
Similar to Input but for bigger text:
- label: The text which describes the component. Required.
- name: This value is used to access the value typed by the user. Required.
- value: Here you can specify a default value for this component.
- width: The width of the component. Defaults to 300px.
- height: The height of the component. Defaults to 100px.