Skip to content

Commit 7b258b3

Browse files
committed
docu (Issue #947)
1 parent 70e8a01 commit 7b258b3

File tree

5 files changed

+81
-20
lines changed

5 files changed

+81
-20
lines changed

src/site/markdown/engine/index.md

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
11
# The Imixs-Workflow Engine
22

3-
The Imixs-Workflow engine consists of different service components. Each component maps a specific functionality into your workflow application:
3+
The Imixs-Workflow engine consists of different service components. Each component maps a specific functionality into your workflow application:
44

5-
* The [WorkflowService](./workflowservice.html) → the core component to create and update a process instance
6-
* The [ModelService](./modelservice.html) → the management component for BPMN models.
7-
* The [DocumentService](./documentservice.html) → the data access layer to store workflow related data
8-
* The [ReportService](./reportservice.html) → a service component to create data reports
5+
- The [WorkflowService](./workflowservice.html) → the core component to create and update a process instance
6+
- The [ModelService](./modelservice.html) → the management component for BPMN models.
7+
- The [DocumentService](./documentservice.html) → the data access layer to store workflow related data
8+
- The [ReportService](./reportservice.html) → a service component to create data reports
99

10-
All services can either be injected into a Java Enterprise application or can be accessed through its [RESTfull service API](../restapi/index.html).
10+
All services can either be injected into a Java Enterprise application or can be accessed through its [RESTfull service API](../restapi/index.html).
1111

12-
Further more, all services are subject to the [Imixs-Workflow Security Model](./acl.html). In this way only an authenticated access to these service components is allowed. This concept ensures the protection of your business data.
12+
Further more, all services are subject to the [Imixs-Workflow Security Model](./acl.html). In this way only an authenticated access to these service components is allowed. This concept ensures the protection of your business data.
1313

14-
1514
### The WorkflowService
16-
The `WorkflowService` is the core service to create, update and read a process instance. To create a process instance a workitem is assigned to a BPMN 2.0 model definition managed by the `ModelService`.
15+
16+
The `WorkflowService` is the core service to create, update and read a process instance. To create a process instance a workitem is assigned to a BPMN 2.0 model definition managed by the `ModelService`.
1717

1818
```java
1919
@Inject
2020
WorkflowService workflowService;
2121
ItemCollection workitem=new ItemCollection().model("1.0.0").task(100).event(10);
2222
workitem=workflowService.processWorkItem(workitem);
2323
```
24-
24+
2525
Read more about in the section [Imixs WorkflowService](../engine/workflowservice.html).
26-
26+
2727
### The DocumentService
28-
The `DocumentService` is the general persistence layer of the Imixs-Workflow engine and provides an interface to store, load and query data objects (`Documents`) within a database.
29-
The `DocumentService` is independent from the workflow engine and can not only be used to persist a process instance (`workitem`), but also any other kind of business data, not necessarily associated with the workflow engine (e.g configuration data).
28+
29+
The `DocumentService` is the general persistence layer of the Imixs-Workflow engine and provides an interface to store, load and query data objects (`Documents`) within a database.
30+
The `DocumentService` is independent from the workflow engine and can not only be used to persist a process instance (`workitem`), but also any other kind of business data, not necessarily associated with the workflow engine (e.g configuration data).
3031

3132
```java
3233
@Inject
@@ -35,7 +36,7 @@ ItemCollection myDocument=new ItemCollection;
3536
myDocument.setItemValue("type","product");
3637
myDocument.setItemValue("name","coffee");
3738
myDocument=documentService.save(myDocument);
38-
```
39+
```
3940

4041
The `DocumentService` provides also a [Full-Text-Search](./luceneservice.html). In this way documents can be accessed through a search query:
4142

@@ -44,17 +45,18 @@ List<ItemCollection> result=documentService.find("(type:'workitem')(imixs*)");
4445
```
4546

4647
Read more about in the section [DocumentService](../engine/documentservice.html).
47-
48+
4849
### The ModelService
49-
The _ModelService_ provides methods to manage BPMN model definitions. A model can be created with the Eclipse based modeling tool [Imixs-BPMN](../modelling/index.html).
50+
51+
The _ModelService_ provides methods to manage BPMN model definitions. A model can be created with the Eclipse based modeling tool [Imixs-BPMN](../modelling/index.html).
5052

5153
```java
5254
@Inject
5355
ModelService modelService;
5456
InputStream inputStream = new FileInputStream(new File("ticket.bpmn"));
5557
ticketModel = BPMNParser.parseModel(inputStream, "UTF-8");
5658
modelService.addModel(model);
57-
```
59+
```
5860

5961
The `ModelService` is used internally by the `WorkflowService` but can also be used by your application to navigate through a model definition.
6062

@@ -66,8 +68,7 @@ List<ItemCollection> tasks = modelService.findAllTasks();
6668
```
6769

6870
Read more about in the section [ModelService](../engine/modelservice.html).
69-
70-
### The ReportService
7171

72-
The `ReportService` component supports methods to create, find and execute business reports created with the Eclipse based [Imixs-Workflow Modeler](../modelling/index.html). A report is used to generate aggregated information from data objects managed by the `DocumentService`.
72+
### The ReportService
7373

74+
The `ReportService` component supports methods to create, find and execute business reports created with the Eclipse based [Imixs-Workflow Modeler](../modelling/index.html). A report is used to generate aggregated information from data objects managed by the `DocumentService`.

src/site/markdown/restapi/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ The different resources provided by Imixs-Workflow are divided in the following
1616
| [/documents/](./documentservice.html) | This resource provides methods to query documents managed by the DocumentService EJB |
1717
| [/adminp/](./adminp.html) | This resource provides methods to create and monitor adminP jobs managed by the AdminPService EJB |
1818
| [/eventlog/](./eventlogservice.html) | This resource provides methods to fetch event log entries |
19+
| [/scheduler/](./scheduler.html) | This resource provides methods to control an [Imixs Scheduler service](../engine/scheduling.html). |
1920

2021
<strong>Note:</strong> The root context of the REST Service is defined by the web application (web.xml) containing the REST Service. The default root context is "/api/".
2122

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# The Workflow Scheduler Service
2+
3+
The resource _/scheduler_ provides methods to control the [Imixs Workflow Scheduler](../engine/scheduler.html) service.
4+
The workflow Scheduler can be monitored with the [Imixs-Admin Client](../administration.html).
5+
6+
<img src="../images/imixs-admin-client-06.png" class="screenshot" />
7+
8+
## GET Jobs
9+
The GET method is used to read all running ore completed jobs:
10+
11+
| URI | Method | Description |
12+
| ----------------- | ------ | ---------------------------------------------------------------------------------- |
13+
| /scheduler/{name} | GET | returns the scheduler configurration by name (e.g. `org.imixs.workflow.scheduler`) |
14+
15+
A scheduler configuration is defined by the following item definitions:
16+
17+
```xml
18+
<document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
19+
<item name="type">
20+
<value xsi:type="xs:string">scheduler</value>
21+
</item>
22+
<item name="name">
23+
<value xsi:type="xs:string">org.imixs.workflow.scheduler</value>
24+
</item>
25+
<item name="_scheduler_class">
26+
<value xsi:type="xs:string">org.imixs.workflow.engine.WorkflowScheduler</value>
27+
</item>
28+
<item name="_scheduler_definition">
29+
<value xsi:type="xs:string">hour=*</value>
30+
<value xsi:type="xs:string">minute=30</value>
31+
</item>
32+
<item name="_scheduler_enabled">
33+
<value xsi:type="xs:boolean">true</value>
34+
</item>
35+
</document>
36+
```
37+
38+
## POST a new Configuration
39+
40+
The methods POST allow to update/create a scheduler configuration. Depending on the flag `_scheduler_enabled` the scheduler will be started or stopped :
41+
42+
| URI | Method | Description |
43+
| ----------- | ------ | ------------------------------------------------------------------------ |
44+
| /scheduler/ | POST | posts a scheduler configuration. The post data is expected in xml format |
45+
46+
The following curl example shows how to update a scheduler configuration:
47+
48+
curl --user admin:adminpassword -H "Content-Type: text/xml" -d \
49+
'<document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/ XMLSchema"> \
50+
<item name="type"><value xsi:type="xs:string">scheduler</value></item> \
51+
<item name="name"><value xsi:type="xs:string">org.imixs.workflow.scheduler</value></item> \
52+
<item name="_scheduler_class"><value xsi:type="xs:string">org.imixs.workflow.engine.WorkflowScheduler</value></item> \
53+
<item name="_scheduler_definition"><value xsi:type="xs:string">hour=*</value></item> \
54+
<item name="_scheduler_enabled"><value xsi:type="xs:boolean">true</value></item> \
55+
</document>' \
56+
http://localhost:8080/api/adminp/jobs
57+
58+
In case the scheduler definition is not valid the attribute '$error_code' will be returned in the response.
136 KB
Loading

src/site/site.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
<item name="RestClient" href="./restapi/restclient.html" />
119119
<item name="EventLog Service" href="./restapi/eventlogservice.html" />
120120
<item name="AdminP Service" href="./restapi/adminp.html" />
121+
<item name="Scheduler Service" href="./restapi/scheduler.html" />
121122
</item>
122123

123124
<item name="Web Forms" href="./webforms/index.html" collapse="true">

0 commit comments

Comments
 (0)