### Start all services with startServices.sh Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-instance-migration-quarkus/README.md Starts the full example including consoles and all required infrastructure services. ```shell sh startServices.sh ``` -------------------------------- ### Start services with startServices.sh Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/kogito-travel-agency/extended/visas/README.md Navigate to the docker-compose directory and run the startServices.sh script to start all required services for the quickstart. ```bash cd /docker-compose ``` ```bash ./startServices.sh ``` -------------------------------- ### Response from starting Simple process instance Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-instance-migration-quarkus/README.md Example response from starting a Simple process instance, showing the returned process instance ID. ```json { "id": "29ec3980-9f0f-4b92-8a2d-394ffdb477e3" } ``` -------------------------------- ### Compile Hiring example with infinispan profile Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-timer-quarkus/README.md Compiles the Hiring example with the infinispan profile. Required before starting services or running the example. ```sh mvn clean install -Pinfinispan ``` -------------------------------- ### Clone the Apache KIE examples repository Source: https://github.com/apache/incubator-kie-examples/blob/main/README.md Clones the Apache KIE examples repository using SSH. This is the first step in the getting started workflow. ```bash git clone git@github.com:apache/incubator-kie-examples.git ``` -------------------------------- ### Navigate to the process-quarkus-example directory Source: https://github.com/apache/incubator-kie-examples/blob/main/README.md Navigates to the root of the process-quarkus-example directory after cloning the repository. This is the second step in the getting started workflow. ```bash cd ./incubator-kie-examples/kogito-quarkus-examples/process-quarkus-example ``` -------------------------------- ### Run Hiring example in Local Dev Mode Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-timer-quarkus/README.md Starts the Hiring example in Quarkus dev mode with the infinispan profile. Enables hot reload for business assets like processes, rules, decision tables, and Java code. ```bash mvn clean package quarkus:dev -Pinfinispan ``` -------------------------------- ### Start services with startServices.sh Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-instance-migration-quarkus/docker-compose/README.md Starts the services using the specified Docker Compose profile (e.g., 'example'). Defaults to 'full' if no argument is provided. ```shell sh startServices.sh example ``` -------------------------------- ### GET /orders - Example response Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-outbox-mongodb-quarkus/README.md Example response from GET /orders, returning an array of active orders. ```json [{ "approver": "john", "id": "b5225020-4cf4-4e91-8f86-dc840589cc22", "order": { "orderNumber": "12345", "shipped": false, "total": 0.529655982561999 } }] ``` -------------------------------- ### Run Hiring example in Quarkus Dev Mode Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-timer-quarkus/README.md Start the application in Quarkus development mode with the postgresql profile enabled. ```sh mvn clean package quarkus:dev -Ppostgresql ``` -------------------------------- ### GET /orderItems/{id}/tasks - Example response Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-outbox-mongodb-quarkus/README.md Example response from GET /orderItems/{id}/tasks, returning a list of tasks with id and name. ```json [ {"id":"62f1c985-d31c-4ead-9906-2fe8d05937f0","name":"Verify order"} ] ``` -------------------------------- ### GET /usertasks/instance?user={user} - Example response Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/process-springboot-example/README.md Example JSON response for the GET /usertasks/instance endpoint. ```json [ { "id": "1dd3123a-aa2c-4b68-93c3-fd0c2abe76c8", "userTaskId": "UserTask_1", "status": { "terminate": null, "name": "Reserved" }, "taskName": "Verify order", ... ] ``` -------------------------------- ### GET /orderItems - Example response Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-outbox-mongodb-quarkus/README.md Example response from GET /orderItems, returning a list of order items. ```json [ { "id":"66c11e3e-c211-4cee-9a07-848b5e861bc5", "order": { "orderNumber":"12345", "shipped":false, "total":0.537941914075738 } } ] ``` -------------------------------- ### Start services on Linux and MacOS Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/README.md Run this script to start all required services for the demo on Linux and MacOS. ```bash ./startServices.sh ``` -------------------------------- ### GET /orderItems/{id}/Verify_order/{tid} - Example response Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-outbox-mongodb-quarkus/README.md Example response from GET /orderItems/{id}/Verify_order/{tid}, returning task details including input1 and name. ```json { "id":"62f1c985-d31c-4ead-9906-2fe8d05937f0", "input1": { "orderNumber":"12345", "shipped":false, "total":0.537941914075738 }, "name":"Verify order" } ``` -------------------------------- ### Run example in Development mode Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-instance-migration-quarkus/README.md Runs the example in Development mode, which embeds all needed Infrastructure Services (PostgreSQL, Data-Index & Jobs Service) and requires no extra steps. ```shell mvn clean package quarkus:dev -Pdevelopment ``` -------------------------------- ### Response with process instance id Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-instance-migration-quarkus/README.md Example JSON response returned by the engine after starting a process instance. ```json { "id": "b97efe7d-dc9b-4da8-8b3e-6100f8d8b045" } ``` -------------------------------- ### Start services with Docker Compose Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/README.md Run this command to start all services defined in the docker-compose template. ```bash docker compose up ``` -------------------------------- ### Start infrastructure services with startServices.sh Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-timer-quarkus/README.md Starts the infrastructure services (Infinispan, Kafka, Data Index, Jobs Service) using the infinispan argument. Requires the project to be compiled first. ```bash ./startServices.sh infinispan ``` -------------------------------- ### Example Response from /find-approved Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/rules-legacy-quarkus-example/README.md Example response from POST /find-approved showing an approved loan application. ```json [ { "id":"ABC10001", "applicant":{ "name":"John", "age":45 }, "amount":2000, "deposit":100, "approved":true } ] ``` -------------------------------- ### Start a usertask from Ready state Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/README.md Starts the usertask directly from Ready state as adam. ```sh curl -X POST "http://localhost:8080/usertasks/instance/${taskId}/transition?user=adam" \ -H "content-type: application/json" \ -d '{ "transitionId": "start" }' ``` -------------------------------- ### GET /orderItems/{id}/tasks - list tasks Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/process-outbox-mongodb-springboot/README.md Get user tasks awaiting user action and example response. ```sh curl -X GET http://localhost:8080/orderItems/66c11e3e-c211-4cee-9a07-848b5e861bc5/tasks?user=john ``` ```json [ {"id":"62f1c985-d31c-4ead-9906-2fe8d05937f0","name":"Verify order"} ] ``` -------------------------------- ### Response Example Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/process-scripts-springboot/README.md Example response from the service after submitting a request. ```json { "id":"ab5239e2-f497-4684-b337-5a44440b38dd", "name":"john", "message":"Hello john" } ``` -------------------------------- ### Start a Simple process instance Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-instance-migration-quarkus/README.md Sends a POST request to start a Simple process instance. The response contains the new process instance id. ```bash curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST http://localhost:8080/simple -d '{}' ``` -------------------------------- ### GET /usertasks/instance: Get user tasks awaiting action Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-monitoring-quarkus/README.md Retrieve user task details awaiting user action. The response is an array of user task instances, with the example truncated with '...'. ```sh curl -X GET http://localhost:8080/usertasks/instance?user=john ``` ```json [ { "id": "bcbe9d60-4847-45f0-8069-e983f3f055e6", "userTaskId": "UserTask_1", "status": { "terminate": null, "name": "Reserved" }, "taskName": "Verify order", ... ] ``` -------------------------------- ### Start infrastructure services script Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-timer-quarkus/README.md Execute the startServices.sh script to bootstrap the required infrastructure services. ```bash ./startServices.sh ``` ```bash ./startServices.sh postgresql ``` -------------------------------- ### POST /orders - Example response Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-outbox-mongodb-quarkus/README.md Example response from creating an order, showing the updated order with an id and total. ```json { "approver": "john", "id": "b5225020-4cf4-4e91-8f86-dc840589cc22", "order": { "orderNumber": "12345", "shipped": false, "total": 0.529655982561999 } } ``` -------------------------------- ### Example response for POST /Tree Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/dmn-pmml-quarkus-example/README.md Example JSON response from the TestTreeDMN endpoint. ```json { "TestTreeBKM":"function TestTreeBKM( humidity, temperature )", "temperature":30, "humidity":10, "Decision":"sunglasses" } ``` -------------------------------- ### Start Kafka instance with Docker Compose Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/pmml-event-driven-quarkus/README.md Starts a dedicated Kafka instance for quick tests. After startup, you can inspect data via Kafdrop at http://localhost:9000/. ```bash docker compose up -d ``` -------------------------------- ### Run sink application with podman/docker Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/dmn-knative-quickstart-quarkus/README.md Starts the Knative event display sink on port 8181 to avoid clashing with the example application on port 8080. ```shell script $ podman run --rm -it -p 8181:8080 gcr.io/knative-releases/knative.dev/eventing-contrib/cmd/event_display ``` -------------------------------- ### Build with container profile Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-instance-migration-quarkus/docker-compose/README.md Command to compile the example using the 'container' Maven profile, required for the 'example' and 'full' Docker Compose profiles. ```shell mvn clean package -Pcontainer ``` -------------------------------- ### Run installer.sh Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/ocp-tryout/README.md Run the installer script after configuring installer.properties and the testapp folders. Logs are written to the console and ./ocp-tryout/installLogs.txt. ```bash ./installer.sh ``` -------------------------------- ### POST /usertasks/instance/{taskId}/transition?user={user} - Example response Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/process-springboot-example/README.md Example JSON response for the POST transition endpoint. ```json { "id": "1dd3123a-aa2c-4b68-93c3-fd0c2abe76c8", "userTaskId": "UserTask_1", "status": { "terminate": "COMPLETED", "name": "Completed" }, "taskName": "Verify order", ... } ``` -------------------------------- ### Log message when process starts Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-instance-migration-quarkus/README.md Console log message indicating the process has started. ```text Started process e4bf4948-1f56-4ee3-9f2c-5010aaf50701 [simple, v1.0] ``` -------------------------------- ### Compile Hiring example with postgresql profile Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-timer-quarkus/README.md Compile the project using the postgresql Maven profile. ```sh mvn clean install -Ppostgresql ``` -------------------------------- ### Start Kogito Job Service with Infinispan persistence Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-timer-quarkus/README.md Starts the Kogito Job Service with Infinispan persistence. Requires an Infinispan server to be running first. Replace {version} with the actual Kogito version. ```sh java -Dquarkus.http.port=8085 -jar jobs-service-infinispan/target/jobs-service-infinispan-{version}-runner.jar ``` -------------------------------- ### Start Application with Docker Compose Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/README.md Starts the entire application using docker-compose. The PROJECT_VERSION property identifies the image by tag. ```shell PROJECT_VERSION=999-SNAPSHOT docker compose up ``` -------------------------------- ### Start a usertask Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/README.md Starts the usertask as mark, transitioning it from Reserved to InProgress state. ```sh curl -X POST "http://localhost:8080/usertasks/instance/${taskId}/transition?user=mark" \ -H "content-type: application/json" \ -d '{ "transitionId": "start" }' ``` -------------------------------- ### Start hiring process for Harry Potter Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-timer-quarkus/README.md Curl command to start a Hiring process for 'Harry Potter' by POSTing the JSON payload to http://localhost:8080/hiring. ```bash curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST http://localhost:8080/hiring -d @- << EOF { "candidate": { "name": "Harry Potter", "email": "harrypotter@example.com", "salary": 30000, "skills": "Java, Kogito" } } EOF ``` -------------------------------- ### Response Example Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/dmn-incubation-api-quarkus/README.md Example response from the custom REST endpoint for the provided request. ```json { "Driver" : { "Age" : null, "City" : null, "Name" : null, "Points" : 2, "State" : null }, "Fine" : { "Amount" : 500, "Points" : 3 }, "Should the driver be suspended?" : "No", "Violation" : { "Actual Speed" : 120, "Code" : null, "Date" : null, "Speed Limit" : 100, "Type" : "speed" } } ``` -------------------------------- ### POST /order - Successful response example Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-saga-quarkus/README.md Example response for a successful Order Saga. All step responses are SUCCESS. ```json { "id": "157a5e40-df97-4bc5-8a5e-4bd1fe30c2a8", "stockResponse": { "type": "SUCCESS", "resourceId": "779afb46-f035-47bc-85bf-3da0f590b847" }, "paymentResponse": { "type": "SUCCESS", "resourceId": "216e8738-2f0b-4e1f-9787-4d561fcda692" }, "orderId": "03e6cf79-3301-434b-b5e1-d6899b5639aa", "orderResponse": { "type": "SUCCESS", "resourceId": "03e6cf79-3301-434b-b5e1-d6899b5639aa" }, "shippingResponse": { "type": "SUCCESS", "resourceId": "a49e88f8-6f1b-45dc-9cc0-a8f0217e3223" } } ``` -------------------------------- ### POST /onboarding - Start new onboarding with curl Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/onboarding-example/onboarding-quarkus/README.md Use this curl command to start a new onboarding for an employee. It sends a POST request to http://localhost:8080/onboarding with a JSON payload containing employee details. The service contacts the hr and payroll services, and returns employee information and status. Note that the same personal ID cannot be onboarded twice; the first request may be slower due to lazy loading. ```sh curl -X POST -H 'Content-Type: application/json' -d '{"employee" : {"firstName" : "Mark", "lastName" : "Test", "personalId" : "xxx-yy-zzz", "birthDate" : "1995-12-10T14:50:12.123+02:00", "address" : {"country" : "US", "city" : "Boston", "street" : "any street 3", "zipCode" : "10001"}}}' http://localhost:8080/onboarding ``` -------------------------------- ### Example response for POST /Regression Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/dmn-pmml-quarkus-example/README.md Example JSON response from the TestRegressionDMN endpoint. ```json { "RegressionModelBKM":"function RegressionModelBKM( fld1, fld2, fld3 )", "fld3":"y", "fld2":2.0, "fld1":3.0, "Decision":52.5 } ``` -------------------------------- ### POST /orderItems/{id}/Verify_order/{tid} - Example response Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-outbox-mongodb-quarkus/README.md Example response from completing a user task, returning the updated order item. ```json { "id":"66c11e3e-c211-4cee-9a07-848b5e861bc5", "order": { "orderNumber":"12345", "shipped":false, "total":0.537941914075738 } } ``` -------------------------------- ### Habitability - Example Response Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/dmn-multiple-models-quarkus-example/README.md Example JSON response from the habitability endpoint, including the habitability assessment. ```json { "oxygene": 70, "temperature": 30, "habitability": "somehow doable" } ``` -------------------------------- ### Submit Request to Start Manager Approval Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-ws-humantask-lifecycle-quarkus/README.md Sends a POST request to start a new Manager Approval process instance at http://localhost:8080/manager_approval. ```sh curl -X POST "http://localhost:8080/manager_approval" \ -H "Accept: application/json" \ -H "Content-Type: application/json" ``` -------------------------------- ### GET /usertasks/instance?user={user} - List user tasks Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-quarkus-example/README.md Get user tasks awaiting user action by calling GET /usertasks/instance?user={user}. The response is an array of task objects with status and task name. ```sh curl -X GET http://localhost:8080/usertasks/instance?user=john ``` ```json [ { "id": "1dd3123a-aa2c-4b68-93c3-fd0c2abe76c8", "userTaskId": "UserTask_1", "status": { "terminate": null, "name": "Reserved" }, "taskName": "Verify order", ... ] ``` -------------------------------- ### Start Keycloak Server with Docker Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/README.md Starts a Keycloak server using Docker with the admin user and password set to 'admin', imports the kogito-realm.json file, and maps port 8281 to 8080. The Keycloak server is accessible at localhost:8281/auth. ```bash docker run -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e KEYCLOAK_IMPORT=/tmp/kogito-realm.json -v /process-usertasks-with-security-oidc-quarkus/config/kogito-realm.json:/tmp/kogito-realm.json -p 8281:8080 quay.io/keycloak/keycloak:legacy ``` -------------------------------- ### Compact approval response example Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/process-usertasks-springboot/README.md Similar response message after performing the second line approval, shown as a compact JSON example. ```json {"id":"f498de73-e02d-4829-905e-2f768479a4f1", "approver":"admin","firstLineApproval":true, "secondLineApproval":true,"traveller":{"firstName":"John","lastName":"Doe","email":"jon.doe@example.com","nationality":"American","address":{"street":"main street","city":"Boston","zipCode":"10005","country":"US"}}} ``` -------------------------------- ### Start Kogito Job Service with PostgreSQL persistence Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-timer-quarkus/README.md Starts the Kogito Job Service with PostgreSQL persistence. Requires a PostgreSQL server to be running first. Replace placeholders and {version} with actual values. ```sh java -Dquarkus.http.port=8085 -Dquarkus.datasource.username={username} -Dquarkus.datasource.password={password} -Dquarkus.datasource.reactive.url=postgresql://{host}:{port}/{db} -Dquarkus.datasource.jdbc.url=jdbc:postgresql://{host}:{port}/{db} -jar jobs-service-postgresql/target/jobs-service-postgresql-{version}-runner.jar ``` -------------------------------- ### Start Kogito Job Service with MongoDB persistence Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-timer-quarkus/README.md Starts the Kogito Job Service with MongoDB persistence. Requires a MongoDB server to be running first. Replace placeholders and {version} with actual values. ```sh java -Dquarkus.http.port=8085 -Dquarkus.mongodb.connection-string=mongodb://{username}:{password}@{host}:{port} -Dquarkus.mongodb.database={db} -jar jobs-service-mongodb/target/jobs-service-mongodb-{version}-runner.jar ``` -------------------------------- ### Start first line approval task Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/README.md curl command to transition the first line approval task to status 'start'. Replace {taskid} with the actual task instance ID. The user must be 'manager'. ```sh curl -X POST 'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=manager' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"transitionId": "start"}' ``` -------------------------------- ### Start hiring process for Jon Snow Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-timer-quarkus/README.md Curl command to start a Hiring process for 'Jon Snow' by POSTing the JSON payload to http://localhost:8080/hiring. ```bash curl -H "Content-Type: application/json" -H "Accept: application/json" -X POST http://localhost:8080/hiring -d @- << EOF { "candidate": { "name": "Jon Snow", "email": "jdoe@example.com", "salary": 30000, "skills": "Java, Kogito" } } EOF ``` -------------------------------- ### Response with new process instance id Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-instance-migration-quarkus/README.md Example JSON response returned by the engine for the new process instance. ```json { "id": "2a507f63-9db1-4d15-b64c-9e14f922d470" } ``` -------------------------------- ### Start second line approval task Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-custom-lifecycle-quarkus/README.md curl command to transition the second line approval task to status 'start'. Replace {taskid} with the actual task instance ID. The user must be 'admin'. ```sh curl -X POST 'http://localhost:8080/usertasks/instance/{taskid}/transition?group=managers&user=admin' -H 'accept: application/json' -H 'Content-Type: application/json' -d '{"transitionId": "start"}' ``` -------------------------------- ### Start First Line Approval Task with curl Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/README.md Starts the first line approval task for a given approval and task instance. Replace {uuid} and {tuuid} with the actual IDs. ```sh curl -X POST -d '{"approved" : true}' -H 'Content-Type:application/json' -H 'Accept:application/json' 'http://localhost:8080/approvals/{uuid}/firstLineApproval/{tuuid}?phase=start&user=admin&group=managers' ``` -------------------------------- ### Start Kogito Job Service (common) Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-timer-quarkus/README.md Starts the Kogito Job Service locally on port 8085 using the common (in-memory) variant. Replace {version} with the actual Kogito version (available from 0.6.0). ```sh java -Dquarkus.http.port=8085 -jar jobs-service-common/target/jobs-service-common-{version}-runner.jar ``` -------------------------------- ### Expose onboarding-service with Minikube Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/onboarding-example/README.md Exposes the onboarding-service via Node Port in Minikube and prints the URL to the terminal. Use the URL to make calls to the service. ```shell minikube service --url onboarding-service ``` -------------------------------- ### Response from custom-rest-process Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-incubation-api-quarkus/README.md Example response from the custom REST endpoint. It echoes the provided name and includes a hello message. ```json { "name":"john", "message":"Hello john" } ``` -------------------------------- ### Approved Hello Response Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/README.md Example response for the approved Hello request. ```json {"greeting":"foo","approved":true} ``` -------------------------------- ### Expose onboarding-springboot service with minikube service --url Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/onboarding-springboot/README.md Exposes the onboarding-springboot service via Node Port on Minikube and prints its URL to the terminal. Use the returned URL to make calls to the service. ```shell minikube service --url onboarding-springboot ``` -------------------------------- ### Package and run the application Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/ruleunit-springboot-example/README.md Use these commands to build the executable JAR and run it. The JAR file is named ruleunit-springboot-example.jar. ```sh mvn clean package java -jar target/ruleunit-springboot-example.jar ``` -------------------------------- ### Denied Hello Response Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/README.md Example response for the denied Hello request. ```json {"greeting":"bar","approved":false} ``` -------------------------------- ### Start second line approval task Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/process-usertasks-custom-lifecycle-springboot/README.md Use this curl command to start the second line approval task. The {uuid} is the approval instance id and {tuuid} is the task instance id. ```sh curl -X POST -d '{"approved" : true}' -H 'Content-Type:application/json' -H 'Accept:application/json' 'http://localhost:8080/approvals/{uuid}/secondLineApproval/{tuuid}?phase=start&user=john&group=managers' ``` -------------------------------- ### Package and Run in JVM mode Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-timer-quarkus/README.md Packages and runs the Hiring example in JVM mode. The first block is for Unix-like systems, the second for Windows. ```sh mvn clean package -Pinfinispan java -jar target/quarkus-app/quarkus-run.jar ``` ```sh mvn clean package -Pinfinispan java -jar target\quarkus-app\quarkus-run.jar ``` -------------------------------- ### GET /travels/{id}/VisaApplication/{taskId} - Get visa task Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/kogito-travel-agency/basic/README.md GET /travels/{id}/VisaApplication/{taskId} returns visa application task information. ```sh curl -X GET http://localhost:8080/travels/{uuid}/VisaApplication/{task-uuid} ``` -------------------------------- ### POST /timers Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/process-timer-springboot/README.md Starts a new timers process with a specified delay. ```APIDOC ## [POST] /timers ### Description Starts a new timers process with a specified delay. ### Method POST ### Endpoint http://localhost:8080/timers ### Parameters #### Request Body - **delay** (string) - Required - ISO-8601 duration format (e.g., "PT30S") ### Request Example { "delay" : "PT30S" } ### Response #### Success Response (200) No response body documented. ``` -------------------------------- ### GET /travels/{id} - Get travel request Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/kogito-travel-agency/basic/README.md GET /travels/{id} returns a single travel request if found, otherwise 404 Not Found is returned. ```sh curl -X GET http://localhost:8080/travels/{uuid} ``` -------------------------------- ### Get tasks for user manager Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-with-security-oidc-quarkus/README.md Gets the tasks assigned to user manager by sending a GET request to the usertasks instance endpoint with the group and user query parameters. ```sh curl -H "Authorization: Bearer "$access_token -X GET 'http://localhost:8080/usertasks/instance?group=managers&user=manager' -H 'accept: application/json' ``` -------------------------------- ### Build and push Kogito Travel Agency image Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/ocp-tryout/applicationImage.md Build the Kogito Travel Agency application, create a container image, log into a registry, tag the image for the remote repository, and push it. Replace with your actual registry username. ```bash mvn clean package ``` ```bash docker build -f src/main/docker/Dockerfile.jvm -t quarkus/kogito-travel-agency-travels-jvm . ``` ```bash podman login quay.io ``` ```bash docker tag $(docker images | grep quarkus/kogito-travel-agency-travels-jvm | awk '{printf $3}') quay.io//kogito-travel-agency-travels-jvm:1.0.0 ``` ```bash docker push quay.io//kogito-travel-agency-travels-jvm:1.0.0 ``` -------------------------------- ### Example Response JSON Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/dmn-listener-quarkus/README.md Example response from the Traffic Violation service. ```json { "Violation":{ "Type":"speed", "Speed Limit":100, "Actual Speed":120 }, "Driver":{ "Points":2 }, "Fine":{ "Points":3, "Amount":500 }, "Should the driver be suspended?":"No" } ``` -------------------------------- ### GET /travels/{id}/ConfirmTravel/{taskId} - Get confirm task Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/kogito-travel-agency/basic/README.md GET /travels/{id}/ConfirmTravel/{taskId} returns travel (hotel, flight) task information required for confirmation. ```sh curl -X GET http://localhost:8080/travels/{uuid}/ConfirmTravel/{task-uuid} ``` -------------------------------- ### Package and Run the JAR Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/dmn-pmml-springboot-example/README.md Packages the application into a JAR and runs it. ```sh mvn clean package java -jar ./target/dmn-pmml-springboot-example.jar ``` -------------------------------- ### Migration response Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-instance-migration-quarkus/README.md Example JSON response from the migration endpoint. ```json { "message":"All intances migrated", "numberOfProcessInstanceMigrated":1 } ``` -------------------------------- ### Example Input JSON Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/dmn-listener-quarkus/README.md Example input payload for the Traffic Violation service. ```json { "Driver":{"Points":2}, "Violation":{ "Type":"speed", "Actual Speed":120, "Speed Limit":100 } } ``` -------------------------------- ### User task list response Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-business-rules-quarkus/README.md Example response showing a running user task for the child, including the userTaskId. ```json [{"id":"1676f775-0759-4579-9676-f5c433689c2a","userTaskId":"_D9CFCEE9-BCDF-48D0-8CB4-A55584DF0D9D",...}] ``` -------------------------------- ### GET /orders/{id} - Get order by id Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-quarkus-example/README.md Fetch a single active order by its id using GET /orders/{id}. Returns the order if found, otherwise a 404 Not Found response. ```sh curl -X GET http://localhost:8080/orders/b5225020-4cf4-4e91-8f86-dc840589cc22 ``` ```json { "approver": "john", "id": "b5225020-4cf4-4e91-8f86-dc840589cc22", "order": { "orderNumber": "12345", "shipped": false, "total": 0.529655982561999 } } ``` -------------------------------- ### Package and run using local native image Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/pmml-event-driven-quarkus/README.md Builds a native executable with GraalVM. Requires GRAALVM_HOME to point to a valid GraalVM installation. The generated executable is in target/ and is named dmn-quarkus-example-runner. Not yet supported on Windows. ```bash mvn clean package -Pnative ``` ```bash ./target/dmn-quarkus-example-runner ``` -------------------------------- ### Run Quarkus Dev Mode (Windows) Source: https://github.com/apache/incubator-kie-examples/blob/main/gradle-examples/kogito-quarkus-gradle-examples/process-decisions-rules-quarkus-gradle/README.md Windows equivalent of the Unix command to start Quarkus in dev mode. ```sh ..\..\..\gradlew.bat clean quarkusDev ``` -------------------------------- ### Package and run the JAR Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/rules-legacy-scesim-springboot-example/README.md Packages the project into a JAR and runs it. The JAR is located at target/rules-legacy-scesim-springboot-example.jar. ```sh mvn clean package java -jar target/rules-legacy-scesim-springboot-example.jar ``` -------------------------------- ### GET /usertasks/instance?user={user} Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-quarkus-example/README.md Returns user tasks awaiting user action for the specified user. ```APIDOC ## [GET] /usertasks/instance?user={user} ### Description Returns user tasks awaiting user action for the specified user. ### Method GET ### Endpoint /usertasks/instance?user={user} ### Parameters #### Query Parameters - **user** (string) - Required - The user for whom to retrieve tasks. ### Response #### Success Response (200) - **id** (string) - The unique identifier of the task instance. - **userTaskId** (string) - The identifier of the user task. - **status** (object) - The status of the task. - **terminate** (string) - The termination status. - **name** (string) - The status name. - **taskName** (string) - The name of the task. #### Response Example [ { "id": "1dd3123a-aa2c-4b68-93c3-fd0c2abe76c8", "userTaskId": "UserTask_1", "status": { "terminate": null, "name": "Reserved" }, "taskName": "Verify order", ... } ] ``` -------------------------------- ### Add kie-addons-quarkus-monitoring-prometheus dependency to pom.xml Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-monitoring-quarkus/README.md Import this dependency in your pom.xml to enable the runtime metrics monitoring feature. This is required for the example to work. ```XML org.kie kie-addons-quarkus-monitoring-prometheus ``` -------------------------------- ### GET /orderItems - Curl command Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-outbox-mongodb-quarkus/README.md Curl command to get order items sub processes. ```sh curl -X GET http://localhost:8080/orderItems ``` -------------------------------- ### Package and Run using Local Native Image Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-usertasks-timer-quarkus/README.md Compile the application into a native executable and run it. ```sh mvn clean package -Pnative -Ppostgresql ``` ```sh ./target/./target/process-usertasks-timer-quarkus ``` -------------------------------- ### POST /orderItems/{id}/Verify_order/{tid} - complete task Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/process-outbox-mongodb-springboot/README.md Complete the user task and example response. ```sh curl -d '{}' -H "Content-Type: application/json" -X POST http://localhost:8080/orderItems/66c11e3e-c211-4cee-9a07-848b5e861bc5/Verify_order/62f1c985-d31c-4ead-9906-2fe8d05937f0?user=john ``` ```json { "id":"66c11e3e-c211-4cee-9a07-848b5e861bc5", "order": { "orderNumber":"12345", "shipped":false, "total":0.537941914075738 } } ``` -------------------------------- ### Run Kogito application with K_SINK and view startup logs Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-knative-quickstart-quarkus/README.md Runs the Kogito application in dev mode with the K_SINK environment variable pointing to the local event display. The output shows the application startup logs, including the warning about the unconnected subscriber and the list of installed features. ```shell script $ K_SINK=http://localhost:8181 mvn clean quarkus:dev 2021-05-18 14:50:47,574 INFO [org.kie.kog.cod.api.uti.AddonsConfigDiscovery] (build-24) Performed addonsConfig discovery, found: AddonsConfig{usePersistence=false, useTracing=false, useMonitoring=false, usePrometheusMonitoring=false, useCloudEvents=true, useExplainability=false, useProcessSVG=false} 2021-05-18 14:50:47,777 INFO [org.kie.kog.cod.cor.uti.ApplicationGeneratorDiscovery] (build-24) Generator discovery performed, found [openapispecs, processes, rules, decisions, predictions] 2021-05-18 14:50:48,726 INFO [org.kie.kog.cod.api.uti.AddonsConfigDiscovery] (build-31) Performed addonsConfig discovery, found: AddonsConfig{usePersistence=false, useTracing=false, useMonitoring=false, usePrometheusMonitoring=false, useCloudEvents=true, useExplainability=false, useProcessSVG=false} 2021-05-18 14:50:48,730 INFO [org.kie.kog.qua.com.dep.KogitoQuarkusResourceUtils] (build-31) No Java source to compile __ ____ __ _____ ___ __ ____ ______ --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \ --\___\_\____/_/ |_/_/|_/_/|_|\____/___/ 2021-05-18 14:50:50,046 WARN [io.sma.rea.mes.provider] (Quarkus Main Thread) SRMSG00207: Some components are not connected to either downstream consumers or upstream producers: - SubscriberMethod{method:'org.kie.kogito.addon.cloudevents.quarkus.QuarkusCloudEventPublisher#onEvent', incoming:'kogito_incoming_stream'} has no upstream 2021-05-18 14:50:50,111 INFO [org.kie.kog.add.clo.qua.QuarkusKogitoExtensionInitializer] (Quarkus Main Thread) Registered Kogito CloudEvent extension 2021-05-18 14:50:50,114 INFO [org.kie.kog.ser.eve.imp.AbstractMessageConsumer] (Quarkus Main Thread) Consumer for class org.acme.travel.Traveller started. 2021-05-18 14:50:50,164 INFO [io.quarkus] (Quarkus Main Thread) process-knative-quickstart-quarkus 999-SNAPSHOT on JVM (powered by Quarkus 1.13.3.Final) started in 3.118s. Listening on: http://localhost:8080 2021-05-18 14:50:50,164 INFO [io.quarkus] (Quarkus Main Thread) Profile dev activated. Live Coding activated. 2021-05-18 14:50:50,164 INFO [io.quarkus] (Quarkus Main Thread) Installed features: [cdi, kogito-decisions, kogito-predictions, kogito-processes, kogito-rules, mutiny, rest-client, rest-client-jackson, resteasy, resteasy-jackson, servlet, smallrye-context-propagation, smallrye-health, smallrye-openapi, smallrye-reactive-messaging, swagger-ui, vertx, vertx-web] ``` -------------------------------- ### Add kie-addons-springboot-monitoring-prometheus dependency to pom.xml Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/dmn-drools-springboot-metrics/README.md Import this dependency in your pom.xml to enable the runtime metrics monitoring feature. This is required for the example to work. ```XML org.kie kie-addons-springboot-monitoring-prometheus ``` -------------------------------- ### Start timers process - JSON payload Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-timer-quarkus/README.md JSON payload to start a timer process with a delay of PT30S. ```json { "delay" : "PT30S" } ``` -------------------------------- ### Package and Run with Java Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/dmn-resource-jar-springboot-example/README.md Builds the project and runs the packaged JAR file. ```sh mvn clean install cd ./dmn-springboot-consumer-example java -jar ./target/dmn-springboot-consumer-example.jar ``` -------------------------------- ### GET /usertasks/instance Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-monitoring-quarkus/README.md Returns user task details awaiting user action. The response is an array of user task objects. ```APIDOC ## GET /usertasks/instance ### Description Getting user tasks details awaiting user action. ### Method GET ### Endpoint /usertasks/instance ### Parameters #### Query Parameters - **user** (string) - Required - The user for whom to retrieve tasks. ### Response #### Success Response (200) - **array** (array) - An array of user task objects. - **id** (string) - The unique identifier of the task instance. - **userTaskId** (string) - The user task definition id. - **status** (object) - The status of the task. - **terminate** (string|null) - The termination status. - **name** (string) - The status name. - **taskName** (string) - The name of the task. - ... (additional fields) #### Response Example [ { "id": "bcbe9d60-4847-45f0-8069-e983f3f055e6", "userTaskId": "UserTask_1", "status": { "terminate": null, "name": "Reserved" }, "taskName": "Verify order", ... } ] ``` -------------------------------- ### Hot Reload: Start Application (Windows) Source: https://github.com/apache/incubator-kie-examples/blob/main/gradle-examples/kogito-springboot-gradle-examples/dmn-springboot-gradle/README.md Start the application in a second terminal after the continuous compile is running (Windows). ```sh ..\..\gradlew.bat bootRun ``` -------------------------------- ### Package and Run in JVM Mode (Windows) Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/process-decisions-rest-springboot/README.md Build the project and execute the resulting JAR file on Windows, using backslashes in the JAR path. Use the target JAR filename 'target\process-decisions-rest-springboot.jar'. ```sh mvn clean package java -jar target\process-decisions-rest-springboot.jar ``` -------------------------------- ### Hot Reload: Start Application (Unix) Source: https://github.com/apache/incubator-kie-examples/blob/main/gradle-examples/kogito-springboot-gradle-examples/dmn-springboot-gradle/README.md Start the application in a second terminal after the continuous compile is running (Unix). ```sh ../../gradlew bootRun ``` -------------------------------- ### POST /order - Error response example Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-saga-quarkus/README.md Example response when PaymentService fails. paymentResponse and orderResponse are ERROR, shippingResponse is null. ```json { "id": "b32c2c16-046b-40d5-8d99-c7b854cdbe24", "stockResponse": { "type": "SUCCESS", "resourceId": "2671b316-b3c4-4afb-ae4c-d8df526c15c7" }, "paymentResponse": { "type": "ERROR", "resourceId": "0ffcca70-c541-4926-bcf9-68ebb0211855" }, "orderId": "03e6cf79-3301-434b-b5e1-d6899b5639aa", "orderResponse": { "type": "ERROR", "resourceId": "03e6cf79-3301-434b-b5e1-d6899b5639aa" }, "shippingResponse": null } ``` -------------------------------- ### GET /travels - List travel requests Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/kogito-travel-agency/basic/README.md GET /travels returns a list of currently active travel requests as an array. ```sh curl -X GET http://localhost:8080/travels ``` -------------------------------- ### Package and Run the JAR Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/dmn-springboot-example/README.md Packages the application into a JAR and runs it. The JAR is located at ./target/dmn-springboot-example.jar. ```sh mvn clean package java -jar ./target/dmn-springboot-example.jar ``` -------------------------------- ### Show Docker Compose help Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/kogito-travel-agency/extended/docker-compose/README.md Display help information for Docker Compose commands. ```bash docker compose --help ``` -------------------------------- ### Test BusinessCalendarCreditBill with curl POST and GET Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/process-business-calendar-quarkus-example/README.md POST and GET requests to the BusinessCalendarCreditBill process. The POST sends a credit card bill with a null creditCardNumber and card details. The GET retrieves the process state. Both are used to test the process during non-working hours or a specified holiday. ```sh curl -X POST http://localhost:8080/BusinessCalendarCreditBill \ -H "Content-Type: application/json" \ -d '{"creditCardNumber": null, "creditCardDetails": {"cardNumber": "434353433", "status": "Bill Due"}}' ``` ```sh curl -X GET http://localhost:8080/BusinessCalendarCreditBill \ -H "Content-Type: application/json" \ -H "Accept: application/json" ``` -------------------------------- ### Package and Run with Local Native Image Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-quarkus-examples/rules-legacy-scesim-quarkus-example/README.md Builds a native executable with GraalVM and runs it. Requires GRAALVM_HOME to point to a valid GraalVM installation. Not yet supported on Windows. ```sh mvn clean package -Pnative ``` ```sh ./target/rules-legacy-quarkus-example-runner ``` -------------------------------- ### Package and run the Spring Boot jar Source: https://github.com/apache/incubator-kie-examples/blob/main/kogito-springboot-examples/rules-legacy-springboot-example/README.md Use these commands to package the application into a jar and run it. The jar is located at target/rules-legacy-springboot-example.jar. ```sh mvn clean package ``` ```sh java -jar target/rules-legacy-springboot-example.jar ```