Commit c3221bf1 authored by Eduardo González Real's avatar Eduardo González Real
Browse files

Update README.md

parent f6e2e96b
......@@ -2,7 +2,7 @@
This document describes basic setup and usage of **Protection Orchestrator** services, running inside a single *Docker* container.
### **Directories description**
### **Directories**
- **witdom-core-po-deployment**: Compiled and Dockerized version of the **Protection Orchestrator**, ready for deployment.
- **witdom-core-po-source**: Source code for the development of the **Protection Orchestrator**, **Work Item Handlers** and **Protection Configurations**.
- **DISCLAIMER.txt**: Disclaimer text.
......@@ -22,16 +22,21 @@ Once a service finishes, its outputs are still protected, so they must be **post
[witdom.eu](http://witdom.eu/ "About Witdom")
### **Prerequisites**
- Docker Engine (https://docs.docker.com/engine/installation)
- **Eclipse** IDE (for development)
- Docker Engine (https://docs.docker.com/engine/installation)
- **REST Client** like *Curl*, *Postman* or *ARS* (for initial testing)
> **Note:** Deployment and source repositories have their own README files with more detailed documentation.
### **Instructions**
For compiling the **Protection Orchestrator**:
1. Compile the WAR using **Eclipse** export feature.
2. The project can also be compiled with **Maven**: ```$ mvn package```
3. The compiled version of the component is available [**here**](https://gitlab.atosresearch.eu/ari/witdom-core-po-pub/tree/master/witdom-core-po-deployment), with all the configuration resources needed for a correct deployment. Just add your WAR to that repository and replace existing one.
1. Navigate to the root directory of the [**source version**](https://gitlab.atosresearch.eu/ari/witdom-core-po-pub/tree/master/witdom-core-po-source/witdom-core-po) and import the Maven project to **Eclipse**.
2. Compile the WAR using **Eclipse** export feature.
3. The project can also be compiled with **Maven**: ```$ mvn package```
4. The compiled version of the component is available [**here**](https://gitlab.atosresearch.eu/ari/witdom-core-po-pub/tree/master/witdom-core-po-deployment), with all the configuration resources needed for a correct deployment. Just add your WAR to that repository and replace existing one.
To deploy an instance of the **Protection Orchestrator**:
......@@ -48,79 +53,4 @@ $ docker run -it -p 8080:8080 witdom-core-po
http://localhost:8080/witdom-core-po/*
```
> **Note:** If you are running the container in *Windows*, use `http://192.168.99.100:8080/witdom-core-po/*` to access the PO within the container (through *Docker Virtual Machine*).
### **Resource Naming**
#### API Resources:
**Executes** a protection configuration
``` bash
POST /api/execute/{protectionconfigurationid}/{purpose}
Content-Type: application/json
Request Body: serviceCallParameters
```
> The `serviceCallParameters` depends on the protection configuration definition.
Sends a **signal event** to a process instance
``` bash
POST /api/processsignalevent/{processinstanceid}/{eventName}/{randomUUID}
Content-Type: application/json
Request Body: eventData
```
> The `eventData` depends on the protection configuration definition.
**Creates or updates** a protection configuration
``` bash
POST /api/protectionconfiguration/{protectionconfigurationid}/{purpose}
Content-Type: application/json
Request Body: BPMN2
```
> The `BPMN2` refers to the protection configuration **XML definition**
Gets a **list** of protection configurations
``` bash
GET /api/protectionconfigurations?{numberofresults}&{startresult}
```
> Params `numberofresults` and `startresult` are optional.
Gets the protection configuration definition **associated** with that id and purpose
``` bash
GET /api/protectionconfiguration/{protectionconfigurationid}/{purpose}
```
> The protection configuration returned is in **XML format**.
Gets the **nodes log** of a given process instance
``` bash
GET /api/log?{id}&{type}&{offset}&{count}&{asc}
```
> Params `type`, `offset`, `count` and `asc` are optional.
**Deletes** a protection configuration
``` bash
DELETE /api/protectionconfiguration/{protectionconfigurationid}/{purpose}
```
Gets the **execution status** of a given process instance
``` bash
GET /api/processstatus/{processinstanceid}
```
#### Demo Resources:
Protection Orchestrator **index page**
``` bash
/demo/index
```
In this form page, you can upload and execute the protection configuration. You will have to upload the definition file, the protection configuration image and the service call parameters.
Protection Orchestrator **demo page**
``` bash
/demo/audit
```
In this page you will see the process running, **node by node**. The active elements will be shown within an orange rectangle and the completed elements will be shown in green. Also, there is a **console** where you will see the **execution log** and two input texts for the signal event params.
Gets protection configuration **process image**
``` bash
GET /demo/processimage/{imageName}
```
> **Note:** For a more detailed info about the Resource Naming please see the **Swagger** yaml file.
\ No newline at end of file
> **Note:** If you are running the container in *Windows*, use `http://192.168.99.100:8080/witdom-core-po/*` to access the PO within the container (through *Docker Virtual Machine*).
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment