Skip to content

Commit

Permalink
Update documentation, fix typos, add dependabot.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CRoberto1926 committed Nov 7, 2024
1 parent 02160dd commit 6ca1550
Show file tree
Hide file tree
Showing 34 changed files with 459 additions and 273 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
time: "06:00"
timezone: Europe/Berlin
open-pull-requests-limit: 99
4 changes: 2 additions & 2 deletions docs/demo-app/demoApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 1

# Demo App

While our main focus remains ob the backend of KADAI, we additionaly provide an example frontend in form of a Demo App. This is only an example, as KADAI frontend can be implemented differently for specific use cases. Here is what the demo app looks like:
While our main focus remains ob the backend of KADAI, we additionally provide an example frontend in form of a Demo App. This is only an example, as KADAI frontend can be implemented differently for specific use cases. Here is what the demo app looks like:
![Demo App](static/demo-app.png)
### [Click here to go to the Demo App](https://kadai-io.azurewebsites.net/kadai)

Expand All @@ -15,7 +15,7 @@ In order to login as admin, you need to use the following credentials:
>
> password: admin
Then, you will be forwarded to the **KADAI Administration**. There are also other users available.
Then, you will be forwarded to the **KADAI Administration**. There are other users available.

### Navigation in the Demo App
To navigate between different pages, select the menu using the three point icon on the upper left. Then, you can choose between the categories shown in the bucket list below.
Expand Down
Binary file modified docs/demo-app/static/demo-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/user-guide/adapter/_category_.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"position": 7,
"link": {
"type": "generated-index",
"description": "Learn more about KADAI Adapter, an application used to connect KADAI to other systenms."
"description": "Learn more about KADAI Adapter, an application used to connect KADAI to other systems."
}
}
28 changes: 14 additions & 14 deletions docs/user-guide/adapter/gettingStarted.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Getting Started
In this article, the set up of the Adapter is explained step by step. Additionally, you can try out some of the functionalities of the Adapter following the instructions in this article.
In this article, the set-up of the Adapter is explained step by step. Additionally, you can try out some of the functionalities of the Adapter following the instructions in this article.

## What you'll need

Expand All @@ -8,7 +8,7 @@ In this article, the set up of the Adapter is explained step by step. Additional
- maven
- Camunda Modeler
- Postgres or Docker (to set up postgres database)
- optional: postman (makes REST API requests easier)
- optional: Postman (makes REST API requests easier)
- Working KADAI application (see [here](../getting-started/exampleSpringBoot.md) for instructions)

Note: Please name your packages, folders and files exactly like in the example!
Expand All @@ -31,12 +31,12 @@ Add following dependencies to the dependencies section of your pom:
<dependency>
<groupId>io.kadai</groupId>
<artifactId>kadai-adapter-camunda-outbox-rest-spring-boot-starter</artifactId>
<version>3.1.0</version>
<version>9.0.0</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-servlet-spring-boot-starter</artifactId>
<version>6.1.1.Final</version>
<version>6.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.camunda.spin</groupId>
Expand Down Expand Up @@ -70,7 +70,7 @@ Then, add a repository to the pom:
</repository>
</repositories>
```
Add the following file to your resources folder:
Add the following file to your "resources" folder:

### kadai-outbox.properties
```
Expand Down Expand Up @@ -194,17 +194,17 @@ Add following dependencies to the dependencies section of your pom (if they don'
<dependency>
<groupId>io.kadai</groupId>
<artifactId>kadai-adapter</artifactId>
<version>3.1.0</version>
<version>9.0.0</version>
</dependency>
<dependency>
<groupId>io.kadai</groupId>
<artifactId>kadai-adapter-camunda-system-connector</artifactId>
<version>3.1.0</version>
<version>9.0.0</version>
</dependency>
<dependency>
<groupId>io.kadai</groupId>
<artifactId>kadai-adapter-kadai-connector</artifactId>
<version>3.1.0</version>
<version>9.0.0</version>
</dependency>
<dependency>
<groupId>com.ibm.db2</groupId>
Expand Down Expand Up @@ -316,7 +316,7 @@ kadai.jobs.enabled=false
## Step 4: Add SPIs to your Adapter application

SPIs need to be additionally specified in the Adapter application. You can read more about SPIs [here](../features/howToUseServiceProviderInterfaces.md).
The necessary SPI for the Adapter application can be build as follows: First, create a new package with the name taskrouting. Then, create a class in the package taskrouting with the name ExampleTaskRouter. It should look like this:
The necessary SPI for the Adapter application can be built as follows: First, create a new package with the name `taskrouting`. Then, create a class in the package `taskrouting` with the name ExampleTaskRouter. It should look like this:
```
package com.example.demo.taskrouting; //or your own path depending on your packages
import io.kadai.common.api.KadaiEngine;
Expand Down Expand Up @@ -354,27 +354,27 @@ Then, start your KADAI application. Start your camunda app next, and login. Last

## Step 6: Try out different functionalities of Adapter.

1. Start a process with a User Task in Camunda. The User Task should be imported to KADAI automatically. You can check it by first knowing the name of the user task from the started process, then make a postgres GET request to KADAI using the following request, entering the name (or just substring of the name) of the user task for the "name-like" attribute
1. Start a process with a User Task in Camunda. The User Task should be imported to KADAI automatically. You can check it by first knowing the name of the user task from the started process, then make a postgres GET request to KADAI using the following request, entering the name (or just substring of the name) of the user task for the "name-like" attribute.
```
GET http://localhost:8080/kadai/api/v1/tasks?name-like=Say hello
```
Here we assume that the name of the user task is "Say hello to demo", but you can set the name differently by opening the `process.bpmn` file in the camunda application and set the name attribute in `<bpmn:userTask>`differently.
Make sure that the correct port number is used for KADAI request. You can check the port number in `application.properties` of KADAI under `server.port`. If not specified, then the default port is 8080. You have to authenticate yourself using Basic Auth: In postman, go to the "Authorization" tab. There, select basicAuth and type "admin" as user and "admin" as password. Make sure enableCsrf is set to false in the properties of the KADAI application.
Make sure that the correct port number is used for KADAI request. You can check the port number in `application.properties` of KADAI under `server.port`. If not specified, then the default port is 8080. You have to authenticate yourself using Basic Auth: In Postman, go to the "Authorization" tab. There, select basicAuth and type "admin" as user and "admin" as password. Make sure enableCsrf is set to false in the properties of the KADAI application.

The output of the request in Postman should look like this:

![Local Image](../static/adapter/show-tasks.png)

2. Claim the KADAI Task from the previous step using postman. Make sure you add the following property to the `application.properties` file of the adapter application: ``kadai.adapter.camunda.claiming.enabled=true``, then restart the adapter. To send the POST request, use the same authorization as in the previous step. The Task should get claimed in Camunda automatically.
2. Claim the KADAI Task from the previous step using Postman. Make sure you add the following property to the `application.properties` file of the adapter application: ``kadai.adapter.camunda.claiming.enabled=true``, then restart the adapter. To send the POST request, use the same authorization as in the previous step. The Task should get claimed in Camunda automatically.
```
POST http://localhost:8080/kadai/api/v1/tasks/{taskid}/claim
```
You can check that the task in KADAI is also claimed by making the same GET Request as in Step 1 and see the `claimed` attribute.

3. Complete the KADAI Task from previous step using postman. To send the POST request, use the same authorization as in the previous step. The Task should disappear from Camunda Tasklist.
3. Complete the KADAI Task from the previous step using Postman. To send the POST request, use the same authorization as in the previous step. The Task should disappear from Camunda Tasklist.
```
POST http://localhost:8080/kadai/api/v1/tasks/{taskid}/complete
```


More functionalities like the cancelling of a claimed task and their URLs can be found in the [full documentation of the REST-API](https://kadai-io.azurewebsites.net/kadai/docs/rest/rest-api.html).
More functionalities like the cancelling of a claimed task and their URLs can be found in the [full documentation of the REST-API](https://kadai-io.azurewebsites.net/kadai/swagger-ui/index.html).
10 changes: 5 additions & 5 deletions docs/user-guide/configuration/classificationAndServiceLevel.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ sidebar_position: 4
The configuration of these parameters is in the file ```kadai.properties```. Some parameters allow multiple values specified as a list. In this case, individual values are separated by a configurable separator. Use the *propertiesSeparator* parameter to specify it. If none is provided, the default is "|". If you specify a propertiesSeparator, no list item in the properties file can contain any character from the propertiesSeparator.


| Parameter | Description | Sample Value |
|----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|--------------------------------------------|
| kadai.domains | A list of domains for Classifications and Workbaskets | DOMAIN_C \| DOMAIN_TEST |
| kadai.classification.types | A list of Classification types (case insensitive) | TASK \| document |
| Parameter | Description | Sample Value |
|-------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|--------------------------------------------|
| kadai.domains | A list of domains for Classifications and Workbaskets | DOMAIN_C \| DOMAIN_TEST |
| kadai.classification.types | A list of Classification types (case insensitive) | TASK \| document |
| kadai.classification.categories.\<type\> (for example kadai.classification.categories.document) | A list of classification categories for each type | EXTERNAL \| manual \| autoMAtic \| Process |
| kadai.servicelevel.validation.enforce | allows user to create Tasks with date-attributes independent of the serviceLevel of the Classifications | true |
| kadai.servicelevel.validation.enforce | allows user to create Tasks with date-attributes independent of the serviceLevel of the Classifications | true |
28 changes: 17 additions & 11 deletions docs/user-guide/configuration/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ sidebar_position: 1

# Database

In order to use KADAI, you need to create a database yourself, and then specify it through the [DataSource](#datasource). You can see the list of the supported databases [here](../getting-started/supportedEnvironments.md).
The recommended page size for the database is 32 k. It's needed to create the database schema. The sort order of query results can be changed by the collating sequence that is specified at database creation. The default for the most databases is a case sensitive sort order. If you want query results to be sorted case insensitively, you should specify an appropriate collating sequence.
To use KADAI, you need to create a database yourself, and then specify it through the [DataSource](#datasource). You can see the list of the supported databases [here](../getting-started/supportedEnvironments.md).
The recommended page size for the database is 32 k. It's necessary to create the database schema. The sort order of query results can be changed by the collating sequence specified in database creation. The default for most databases is a case-sensitive sort order. If you want query results to be sorted case insensitively, you should specify an appropriate collating sequence.

- Page size: 32k
- Encoding: UTF-8
- Encoding: UTF-8
- Collating sequence examples:
- db2 (case sensitive): IDENTITY
- postgres (case sensitive): de_DE.UTF-8
Expand All @@ -26,7 +26,7 @@ CREATE DATABASE <databaseName> WITH ENCODING 'UTF8' LC_COLLATE='de_DE.UTF-8';

### DataSource

KADAI connects to the database via a DataSource. It does not support XADataSources for connections to databases. The DataSource can be specified during the creation of KadaiConfiguration. For example as following:
KADAI connects to the database via a DataSource. It does not support XADataSources for connections to databases. The DataSource can be specified during the creation of KadaiConfiguration. For example, as following:
```
new KadaiConfiguration.Builder(dataSource, true, schemaName, false)
.initKadaiProperties(propertiesFileName, delimiter)
Expand All @@ -41,12 +41,18 @@ spring.datasource.password=sa
```
### SchemaName and Prefilling the Database

Additionally to the DataSource, you can also configure the schemaName. It can be specified during the creation of KadaiConfiguration, as seen in the example above. The default schemaName is "KADAI". The schemaName can also be changed by setting the parameter "kadai.schemaName" in the ```application.properties``` file:
Additionally to the DataSource, you can also configure the schemaName.
It can be specified during the creation of KadaiConfiguration, as seen in the example above.
The default schemaName is `KADAI.
The schemaName can also be changed by setting the parameter "kadai.schemaName"
in the ```application.properties``` file:

```
kadai.schemaName=KADAI
```
Additionaly to that, you can configure KADAI so that it prefills the database with sample data. You can find sample data in the folder ```common/kadai-common-data/src/main/resources/sql/sample-data```. To do that, set the "generateSampleData" property in the ```application.properties``` file to true:
Additionally to that, you can configure KADAI so that it prefills the database with sample data.
You can find sample data in the folder ```common/kadai-common-data/src/main/resources/sql/sample-data```.
To do that, set the "generateSampleData" property in the ```application.properties``` file to true:
```
generateSampleData=true
```
Expand All @@ -61,8 +67,8 @@ KadaiEngine buildKadaiEngine (KadaiConfiguration configuration, ConnectionManage

The default mode is PARTICIPATE.

| mode | description |
|--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| PARTICIPATE | KADAI participates in surrounding global transactions. It acquires and releases connections at begin / end of each API call and relies on the infrastructure to do the commit. |
| AUTOCOMMIT | KADAI commits each single API call separately. |
| EXPLICIT | KADAI doesn't acquire, commit or close connections. The client is responsible for opening a connection, passing it to KADAI, committing or rolling it back. In order to close a connection, the client has to call either KadaiEngine.closeConnection() or KadaiEngine.setConnection(null). |
| mode | description |
|-------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| PARTICIPATE | KADAI participates in surrounding global transactions. It acquires and releases connections at begin / end of each API call and relies on the infrastructure to do the commit. |
| AUTOCOMMIT | KADAI commits each single API call separately. |
| EXPLICIT | KADAI doesn't acquire, commit or close connections. The client is responsible for opening a connection, passing it to KADAI, committing or rolling it back. In order to close a connection, the client has to call either KadaiEngine.closeConnection() or KadaiEngine.setConnection(null). |
10 changes: 5 additions & 5 deletions docs/user-guide/configuration/holidaysAndWorkingDays.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Holidays can be customized. This is relevant because time on a holiday doesn't c

## Working time

- `kadai.workingTime.schedule.MONDAY` : Working time on Monday, e. g. 09:00-18:00
- ``kadai.workingTime.schedule.TUESDAY`` : Working time on Tuesday, e. g. 09:00-18:00
- ``kadai.workingTime.schedule.WEDNESDAY`` : Working time on Wednesday, e. g. 09:00-18:00
- ``kadai.workingTime.schedule.THURSDAY`` : Working time on Thursday, e. g. 09:00-18:00
- ``kadai.workingTime.schedule.FRIDAY`` : Working time on Friday, e. g. 09:00-18:00
- ``kadai.workingTime.schedule.MONDAY`` : Working time on Monday, e.g., 09:0018:00
- ``kadai.workingTime.schedule.TUESDAY`` : Working time on Tuesday, e.g., 09:0018:00
- ``kadai.workingTime.schedule.WEDNESDAY`` : Working time on Wednesday, e.g., 09:0018:00
- ``kadai.workingTime.schedule.THURSDAY`` : Working time on Thursday, e.g., 09:0018:00
- ``kadai.workingTime.schedule.FRIDAY`` : Working time on Friday, e.g., 09:0018:00
- ``kadai.workingTime.timezone`` : Time zone, e. g. UTC
Loading

0 comments on commit 6ca1550

Please sign in to comment.