Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoika committed Jun 8, 2018
1 parent 59df8b8 commit b131ca7
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 43 deletions.
6 changes: 3 additions & 3 deletions src/site/markdown/core/itemcollection.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ The ItemCollection provides convenience methods to access typical attributes of
|Method | Return |
|-------------------|---------------------------------------------------|
|getType() | returns the type attribute of a workitem |
|getProcessID() | returns the $processID attribute of a workitem |
|getActivityID() | returns the $activityID attribute of an workitem |
|setActivityID(id) | set the $activityID attribute of a workitem |
|getTaskID() | returns the $taskID attribute of a workitem |
|getEventID() | returns the $eventID attribute of an workitem |
|setEventID(id) | set the $eventID attribute of a workitem |
|getModelVersion() | returns the $modelversion attribute of a workitem |
|getUniqueID() | returns the $uniqueid attribute of a workitem |

Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/core/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ An 'Event Element' is assigned to a 'Task'. The ID of each 'Event' must be uniqu


### The Process Flow
When a Workitem is processed by the Imixs-Workflow engine, the properties '$modelVersion', '$ProcessID' and '$ActivityID' are verified against the current workflow model. Depending on the information of the assigned 'Event' the _WorkflowKernel_ updates the status of the Workitem ('$ProcessID') after a Workitem was processed successful.
When a Workitem is processed by the Imixs-Workflow engine, the properties '$modelVersion', '$TaskID' and '$EventID' are verified against the current workflow model. Depending on the information of the assigned 'Event' the _WorkflowKernel_ updates the status of the Workitem ('$taskID') after a Workitem was processed successful.

##The Model Interface
The Interface '_org.imixs.workflow.Model_' defines the following methods:
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/core/workflowkernel.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The _WorkflowKernel_ controls the following attributes of a process instance:
|$UniqueID | A unique key to access the process instance |
|$WorkitemID | A unique process instance id of this workitem |
|$ModelVersion | The Version of the model the workitem belongs to |
|$ProcessID | The current BPMN Task ID of the workItem |
|$TaskID | The current BPMN Task ID of the workItem |
|$lastEvent | The last processed BPMN Event element |
|$lastTask | The last assigned BPMN Task element |

Expand Down
4 changes: 2 additions & 2 deletions src/site/markdown/core/workflowmanager.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ The method 'processWorkItem()' is used to create or update a Workitem. The Workf
....
}

The WorkflowKernel can throw a ProcessingErrorException if the Workitem did not match the model status. Therefore the WorkflowManager implementation have to verify if the Workitem provides valid values for the properties '$processID' and '$ActivityID'.
The WorkflowKernel can throw a ProcessingErrorException if the Workitem did not match the model status. Therefore the WorkflowManager implementation have to verify if the Workitem provides valid values for the properties '$taskID' and '$eventID'.

##Find Workitems
## Find Workitems

The property "$uniqueid" identifies the workitem controlled by the workflowManager. This ID can be used to load a workitem from the WorkflowManager:

Expand Down
6 changes: 3 additions & 3 deletions src/site/markdown/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ The next example shows how to post a new Workitem in JSON Format. The request po
'{"item":[ \
{"name":"type","value":{"@type":"xs:string","$":"workitem"}}, \
{"name":"$modelversion","value":{"@type":"xs:string","$":"1.0.0"}}, \
{"name":"txtworkflowgroup","value":{"@type":"xs:string","$":"Ticket"}}, \
{"name":"$processid","value":{"@type":"xs:int","$":"1000"}}, \
{"name":"$activityid","value":{"@type":"xs:int","$":"10"}}, \
{"name":"$workflowgroup","value":{"@type":"xs:string","$":"Ticket"}}, \
{"name":"$taskid","value":{"@type":"xs:int","$":"1000"}}, \
{"name":"$eventid","value":{"@type":"xs:int","$":"10"}}, \
{"name":"txtname","value":{"@type":"xs:string","$":"test-json"}}\
]}' \
http://localhost:8080/imixs-microservice/workflow/workitem.json
Expand Down
6 changes: 3 additions & 3 deletions src/site/markdown/engine/luceneservice.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ If no further configuration exists, the content of the document items "txtworkf

In addition the following list of items in a document are indexed by the _LuceneService_ without using an analyser.

"$modelversion", "$processid", "$workitemid", "$uniqueidref", "type",
"$writeaccess", "$modified", "$created", "namcreator", "txtworkflowgroup", "txtname", "namowner", "txtworkitemref"
"$modelversion", "$taskid", "$workitemid", "$uniqueidref", "type",
"$writeaccess", "$modified", "$created", "namcreator", "txtworkflowgroup", "txtname", "namowner", "txtworkitemref", "$processid"

These items can be used in a search term.

Expand All @@ -33,7 +33,7 @@ The custom configuration of the _LuceneService_ can be provided in the file _imi
# Fields to be added into the searchindex
lucence.fulltextFieldList=txtsearchstring,txtSubject,txtname,txtEmail,txtWorkflowAbstract,txtWorkflowSummary
lucence.indexFieldListAnalyze=
lucence.indexFieldListNoAnalyze=type,$UniqueIDRef,$created,$modified,$ModelVersion,namCreator,$ProcessID,datDate,txtWorkflowGroup,txtemail, datdate, datfrom, datto, numsequencenumber, txtUsername,
lucence.indexFieldListNoAnalyze=datDate,txtWorkflowGroup,txtemail, datdate, datfrom, datto, numsequencenumber, txtUsername,


### IndexDir
Expand Down
4 changes: 2 additions & 2 deletions src/site/markdown/engine/workflowservice.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ The WorkflowService is the Java EE implementation of the [WorkflowManager interf
Before a workitem can be processed by the WorkflowService, a process model need to be defined and deployed together with the workflow engine. See the section [Imixs-BPMN Modeler](../modelling/index.html) for details about how to create a model and upload it into the workflow server. The following example shows how a workitem can be processed using the WorkflowService component. A workitem must provide at least the following properties:

* $ModelVersion
* $ProcessID
* $ActivityID
* $TaskID
* $EventID

These properties are defining the workflow activity which should be processed by the workflowManager.

Expand Down
13 changes: 6 additions & 7 deletions src/site/markdown/quickstart/businessprocess.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
#The Business Process

Before a new process instance can be started by the Imixs-Workflow engine, you need to define the corresponding business process model (workflow model). The process model describes the process flow with its different states and transitions. The model consists of a set
of process entities (Tasks) and activity entities (Events). A process entity defines the state of a process instance controlled by the workflow engine. The activity entity defines the event or condition to change a process instance from one state to another. This is also called a transition.
Before a new process instance can be started by the Imixs-Workflow engine, a business process model (workflow model) need to be defined. The process model describes the process flow with its different states and transitions. The model consists of a set
of Task elements and Event elements. A task defines the state of a process instance controlled by the workflow engine. The event describes the transition from one state to another.

The process activity can be triggered either by an actor or an event. When the workflow engine executes a workitem, different actions defined by an activity can be triggered.
The Event can be triggered either by an actor or a service. When the workflow engine executes a workitem, different actions defined by an event can be triggered.

<img src="../images/modelling/bpmn_screen_00.png"/>

Imixs-Workflow provides an eclipse based graphical editor to manage workflow models based on the BPMN 2.0 standard. You can create a model from the eclipse IDE and synchronize your model with the Imixs Workflow engine. For more details about how to create a workflow mode Read the [Modelling Section](../modelling/index.html).


## Creating a process instance
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 a 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':
Each entity stored in a workflow model has a uniqueID and a taskID. Before a workitem can be processed by the workflow engine a workitem need to be bound to the model:

.....
workitem.replaceItemValue("$processID",20);
workitem.replaceItemValue("$activityID",20);
ItemCollection workitem=new ItemCollection().model("1.0.0").task(100).event(20);

After the workitem was processed the first time, the workitem is called a 'process instance' as it is an instance of the process entity defined by the process model. After the workflow engine has processed the workitem 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.
After the workitem was processed the first time, the workitem is called a 'process instance' as it is an instance of the process entity defined by the process model. After the workflow engine has processed the workitem the next task entity will be automatically assigned to the workitem.

2 changes: 1 addition & 1 deletion src/site/markdown/restapi/documentservice.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ With the following optional URI parameters the GET request can be filtered and s
| pageIndex | page index to start | ..?pageindex=5&pagesize=10 |
| sortBy | sort item | ..&sortBy=txtworkflowstatus |
| sortReverse | sort direction (ascending/descending) | ..&sourtReverse=true |
| items | filter item values to be returned | ..&items=$processid,$modellversion
| items | filter item values to be returned | ..&items=$taskid,$modellversion


**Example:**
Expand Down
12 changes: 6 additions & 6 deletions src/site/markdown/restapi/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ The following example shows a business object in XML representation used for req
<item name="$modelversion">
<value xsi:type="xs:string">1.0.1</value>
</item>
<item name="$processid">
<item name="$taskid">
<value xsi:type="xs:int">1000</value>
</item>
<item name="$activityid">
<item name="$eventid">
<value xsi:type="xs:int">10</value>
</item>
<item name="_subject">
Expand All @@ -47,17 +47,17 @@ The following example shows a business object in JSON representation used for re

{"item":[
{"name":"$modelversion","value":{"@type":"xs:string","$":"1.0.1"}},
{"name":"$processid","value":{"@type":"xs:int","$":"1000"}},
{"name":"$activityid","value":{"@type":"xs:int","$":"10"}},
{"name":"$taskid","value":{"@type":"xs:int","$":"1000"}},
{"name":"$eventid","value":{"@type":"xs:int","$":"10"}},
{"name":"_subject","value":{"@type":"xs:string","$":"Hello World"}}
]}

Depending on the Rest Service Implementation the JSON format for response object can deviate in the following simplified presentation style (e.g. RESTeasy ):

{"item": [
{"name": "$modelversion", "value": ["1.0.1"] },
{"name": "$processid", "value": [2000] },
{"name": "$activityid", "value": [10] },
{"name": "$taskid", "value": [2000] },
{"name": "$eventid", "value": [10] },
{"name": "_subject", "value": ["Hello World"] }
]}

Expand Down
10 changes: 5 additions & 5 deletions src/site/markdown/restapi/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ See the following example:
{"item":[
{"name":"$uniqueid","value":{"@type":"xs:string","$":"141cb98aecc-18544f1b"}},
{"name":"$modelversion","value":{"@type":"xs:string","$":"bestandspflege-de-0.0.2"}},
{"name":"$processid","value":{"@type":"xs:int","$":"2000"}},
{"name":"$taskid","value":{"@type":"xs:int","$":"2000"}},
{"name":"namcreator","value":{"@type":"xs:string","$":"admin"}},
{"name":"$isauthor","value":{"@type":"xs:boolean","$":"true"}},
{"name":"_subject","value":{"@type":"xs:string","$":"JUnit Test-6476"}},
Expand All @@ -36,8 +36,8 @@ To create a new process instance with a JSON request object, the POST method of

{"item":[
{"name":"$modelversion","value":{"@type":"xs:string","$":"bestandspflege-de-0.0.2"}},
{"name":"$processid","value":{"@type":"xs:int","$":"2000"}},
{"name":"$activityid","value":{"@type":"xs:int","$":"1"}},
{"name":"$taskid","value":{"@type":"xs:int","$":"2000"}},
{"name":"$eventid","value":{"@type":"xs:int","$":"1"}},
{"name":"_subject","value":{"@type":"xs:string","$":"JUnit Test-6476"}}
]}

Expand Down Expand Up @@ -71,8 +71,8 @@ Using the RestClient provided by the Imixs-Workflow Core API the creation of a n

// create a json test string
String json = "{\"item\":["
+ " {\"name\":\"$processid\",\"value\":{\"@type\":\"xs:int\",\"$\":\"10\"}},"
+ " {\"name\":\"$activityid\",\"value\":{\"@type\":\"xs:int\",\"$\":\"10\"}},"
+ " {\"name\":\"$taskid\",\"value\":{\"@type\":\"xs:int\",\"$\":\"10\"}},"
+ " {\"name\":\"$eventid\",\"value\":{\"@type\":\"xs:int\",\"$\":\"10\"}},"
+ " {\"name\":\"txtList\",\"value\":[{\"@type\":\"xs:string\",\"$\":\"A\"},{\"@type\":\"xs:string\",\"$\":\"B\"}]},"
+ " {\"name\":\"txtname\",\"value\":{\"@type\":\"xs:string\",\"$\":\"workitem json test\"}}"
+ "]}";
Expand Down
5 changes: 1 addition & 4 deletions src/site/markdown/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,8 @@ To create a new workitem the WorkflowTestSuite provides method to create and pr

@Test
public void createNewWorkitemTest() throws Exception {
ItemCollection registration=new ItemCollection();
ItemCollection registration=new ItemCollection().model("system-de-0.0.1").task(200).event(10);
registration.replaceItemValue("type", "profile");
registration.replaceItemValue("$ModelVersion", "system-de-0.0.1");
registration.replaceItemValue("$processid", 200);
registration.replaceItemValue("$activityid", 10);
registration.replaceItemValue("txtName","Test");

registration=testSuite.processWorkitem(registration, "anna");
Expand Down
8 changes: 4 additions & 4 deletions src/site/markdown/webtools/controller.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ The DataController is a managed bean controlling the data of a single WorkItem.

All action methods accept a String param 'action' with the default action result. (Can be 'null')

##The WorkflowController
The WorkflowController is a subclass from the DataController and provides methods to process a workitem based on a specific workflow model. The workflow model version can be defined by the WorkItem property '$modelversion'. To process a WorkItem the properties '$processid' and '$activityid' need to be defined. The WorkflowController provides the following addition Action and ActionListener methods:
## The WorkflowController
The WorkflowController is a subclass from the DataController and provides methods to process a workitem based on a specific workflow model. The workflow model version can be defined by the WorkItem property '$modelversion'. To process a WorkItem the properties '$taskid' and '$eventid' need to be defined. The WorkflowController provides the following addition Action and ActionListener methods:

###init(actiion)
### init(actiion)
This method initializes a new created WorkItem based on the workflow model definition

###process()
### process()
The process method processes the current workItem and returns an action result. The method expects that the current workItem provides a valid $ActiviytID. The method returns the value of the property 'action' if provided by the workflow model or a plugin. The 'action' property is typically evaluated from the ResultPlugin. Alternatively the property can be provided by an application. If no 'action' property is provided the method evaluates the default property 'txtworkflowResultmessage' from the model as an action result.

###process(activityID)
Expand Down
2 changes: 1 addition & 1 deletion src/site/markdown/webtools/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ The WorkflowController extends the DataController, and provides an interface to
target="#{workflowController.workitem.item['$ModelVersion']}"
value="1.0.1" />
<f:setPropertyActionListener
target="#{workflowController.workitem.item['$ProcessID']}"
target="#{workflowController.workitem.item['$taskID']}"
value="1000" />
</h:commandButton>

Expand Down

0 comments on commit b131ca7

Please sign in to comment.