Workflow Course: Lesson 5

From OpenKM Documentation
Jump to: navigation, search

Contents

Definition

Workflow process instances objects, are objects presents during all workflow life cycle. During the execution of the workflow when user sends information are created objects ( process instance objects ) which can be used in all workflow life cycle. These objects stores in memory the user data. These user data can be used in each workflow node or action.

Types

Basically are 2 process instance objects that can be used in OpenKM:

  • Automatically created by form submit, when user submits some form in OpenKM.
  • Created by workflow logic in actions to store some data that can be used in future workflow process.

When user submits OpenKM workflow form, the object always are FormElements type. Basically any form submited by user will store in memory FormElements type. OpenKM workflows are thinked to use FormElements to initialize data values.

For example if you get a form with some form element like this:

<input name="var_1" label="Input"/>

When user submits form, automatically will be stored on memory a object called "var_1" available to all future workflow nodes.

For example if you want to initialize some form value with some value collected during other node, then you should write something like this:

<input name="var_2" label="Input" data="var_1"/>

Note: Each time a form is submited, all form elements are stored to memory indexed by his name. If it was some older object with same name, that it's replaced by newer ( that's something to take in mind ).

OpenKM forms are prepared to use FormElement data type, that's so simply if you're using objects created in previous task form nodes. If in some action you want to create a object that can be used by workflow form elements this should be FormElement type.

Take a look here for available form elements http://wiki.openkm.com/index.php/Form_Element_description

Take a look here for package com.openkm.bean.form.FormElement.


The media player is loading...