Core API
In a business application you typically manage information which need to be distributed in a predefined way. Users edit data, which need to be made available for various actors.
The data which is processed by a workflow management system is stored in a workitem. A workitem holds the data, which is usually edited by a user into a form. This data is called the business data. When a workflow management system processes a workitem, also workflow data will be generated and added into a workitem. So a workitem holds business data, entered by a user, and also processing information generated by the workflow system.

To manage the data of a workitem, the Imixs Workflow project provides the java class ItemCollection. The ItemCollection is a generic data object, which can contain any data types. There are no restrictions in the amount or size of the data stored into an ItemCollection. This is a example how to use the ItemCollection object:
import org.imixs.workflow.ItemCollection;
.....
ItemCollection workitem=new ItemCollection();
workitem.replaceItemValue("name","Ralph");
workitem.replaceItemValue("age",new Integer(40));Each value stored into a ItemCollection has a item-name and a item-value. The item-name identifies a specific part of data contained in a ItemCollection. You can access a item-value by its name:
....
String name=workitem.getItemValueString("name");
int age=workitem.getItemValueInteger("age");
....As explained before, a workitem can not only contain business data, but also workflow information, generated by the workflow system. For example, a workitem processed by the Imixs Workflow, contains data like the creation date or the processing status. This is an example how to access this kind of data:
String uniqueID=workitem.getItemValueInteger("$UniqueID");
int processID=workitem.getItemValueInteger("$ProcessID");
Date created=workitem.getItemValueDate("$created");
Date modified=workitem.getItemValueDate("$modified");
String status=workitem.getItemValueString("txtWorkflowStatus");
Vector history=workitem.getItemValue("txtWorkflowHistory");The following table provides an overview about the properties provided by the Imixs Workflow Engine. The column 'read/write' indicates if the property can be controlled by an application:
| Core Properties | Type | read/ write | Description |
|---|---|---|---|
| $ModelVersion | String | yes | The Version of the model the workitem belongs to |
| $ProcessID | Integer | yes | The current ProcessID of the workItem |
| $ActivityID | Integer | yes | The next activity to be processed by the workflow engine |
| $Created | Date | no | Date of creation |
| $Modified | Date | no | Date of last modification |
| $IsAuthor | Boolean | no | Indicates if the current user has write access |
| $ReadAccess | List | no | String list of User/Roles with read access |
| $WriteAccess | List | no | String list of User/Roles with write access |
| $uniqueId | String | no | The unique ID of this workItem |
| $uniqueIdRef | String | yes | A reference to a connected workItem (child process) |
| $workitemid | String | no | The process instance id of this workitem |
| Status Information | |||
| namcreator | String | no | The user who created the workItem. |
| namCurrentEditor | String | no | The user who invoked the processWorkitem() method. |
| namOwner | List | no | String list of User/Roles, that are owners of that WorkItem. |
| txtworkflowgroup | String | no | The name of the current process group |
| txtworkflowstatus | String | no | The name of the current workflow status |
| txtworkflowsummary | String | no | A short description of the current status |
| txtworkflowabstract | String | no | A long description of the current status |
| txtworkflowimageurl | String | no | A link to an image which displays the current status |
| txtworkflowhistorylog | List | no | History of all processed activities |
| txtworkflowresultmessage | String | no | The result message of last process step |
| Logging Information | |||
| txtworkflowactivitylog | List | no | Log of processed workflow activities |
| txtworkflowpluginlog | List | no | The plugin execution log |
| timworkflowlastaccess | Date | no | The timestamp of the last processing action |
| numlastactivityid | Integer | no | The last processed workflow activity ID |
| namlasteditor | String | no | The last user, that invoked the process method |