Core API
Before you can process a workitem, you need to provide a business process model - the workflow model.
A workflow model describes the process flow of a business process. The model consists of a set of process entities and activity entities. A process entity defines the current status inside the business process. The activity entity defines the action which can be performed by an actor. When the workflow engine completes a single process step, the status of a workitem will change to the assigned new workflow status.

The Imixs Workflow provides an eclipse based graphical editor to define workflow models. You can describe a model and synchronize your model with the Imixs Workflow engine. Read the modelling section for more details about how to create a workflow model with the Imixs Modeler.
Each entity stored in a workflow model has a unique ID. The process-id and the activity-id. Before a workitem can be processed by the workflow engine the workitem need to be bound to a process entity and assigned to a valid activity entity form the model. This can be done by setting the items '$ProcessID' and '$ActivityID':
.....
workitem.replaceItemValue("$processID",20);
workitem.replaceItemValue("$activityID",20);In this moment the workitem is called a 'process instance' as it is an instance of the process entity with the id=20.
After the workflow engine has processed the wokitem the next process entity will be automatically assigned to the workitem. In this example the workitem which is assigned to the process-id=20 and the activity-id=20 will be assigned to the process-id=30 when the process-step is completed.