PowerDecision Quick Reference
API Endpoints
| Method | Endpoint | Description |
POST | /api/powerdecision/v1/decisions | Submit a decision job |
GET | /api/powerdecision/v1/decisions/{jobId} | Get decision job status & result |
POST | /api/powerdecision/v1/models/upload | Upload a model from wizard JSON |
GET | /api/powerdecision/v1/models | List all decision models |
GET | /q/health | Quarkus health check (liveness + readiness) |
GET | /health/liveness | Custom liveness probe |
GET | /health/readiness | Custom readiness probe |
GET | /openapi | OpenAPI spec (JSON) |
GET | /swagger-ui.html | Swagger UI |
Job Statuses
| Status | Terminal? | Description |
ACCEPTED | No | Job submitted, queued for processing |
PENDING | No | Job stored, waiting to start |
PROCESSING | No | DMN model being evaluated |
SUCCESS | Yes | Decision evaluated successfully |
ERROR | Yes | Decision evaluation failed |
Hit Policies
| Policy | Behavior |
FIRST | First matching rule wins (default; recommended when default rule exists) |
UNIQUE | Exactly one rule must match; fails if zero or multiple match |
PRIORITY | All matching rules evaluated; highest-priority result returned |
ANY | Multiple rules may match; all must produce same output |
COLLECT | All matching rules collected; returns list of results |
Data Types
| Wizard Type | DMN FEEL Type | Example |
string | string | "EMPLOYED" |
integer | number | 42 |
number | number | 3.14 |
boolean | boolean | true |
date | date | 2026-01-15 |
enum | string | "HIGH" (from allowed values) |
Condition Operators
| Operator | FEEL Output | Example |
eq | "value" | {"eq": "EMPLOYED"} |
neq | not("value") | {"neq": "UNEMPLOYED"} |
gt | > value | {"gt": 700} |
gte | >= value | {"gte": 750} |
lt | < value | {"lt": 600} |
lte | <= value | {"lte": 100} |
between | [a..b] | {"between": [600, 750]} |
in | in (a, b) | {"in": ["A", "B"]} |
isNull | null | {"isNull": true} |
and | expr and expr | Compound: array of conditions |
or | expr or expr | Compound: array of conditions |
default | - (match-all) | {"default": true} |
Decision Templates
| Template | Sector | Use Case |
loan_approval | Banking | Automated loan approval based on credit, income, debt |
credit_limit_determination | Finance | Credit limit calculation from risk factors |
customer_risk_classification | Insurance | Risk tier classification for customers |
fraud_detection | Security | Transaction fraud scoring and flagging |
insurance_premium_calculation | Insurance | Premium calculation based on risk profile |
product_recommendation | Retail | Product recommendation from customer attributes |
support_ticket_routing | IT/Support | Ticket priority and department routing |
Environment Variables
| Variable | Default | Description |
QUARKUS_HTTP_PORT | 8031 | API server port |
quarkus.http.cors | true | Enable CORS |
quarkus.http.cors.origins | * | Allowed CORS origins |
quarkus.redis.hosts | redis://localhost:6379 | Redis connection URL (model registry persistence) |
powerdecision.models.path | models | Directory for uploaded DMN model files |
JAVA_OPTS | -Xmx1024m -Xms512m | JVM memory settings |
Decision Spec (Execution Request)
POST /api/powerdecision/v1/decisions
Content-Type: application/json
{
"model_id": "loan_approval",
"version": "1.0.0",
"context": {},
"inputs": {
"applicant_age": 35,
"credit_score": 780,
"annual_income": 85000,
"loan_amount": 250000,
"employment_status": "EMPLOYED",
"existing_debt": 0
}
}
Wizard JSON Template (Model Upload)
POST /api/powerdecision/v1/models/upload
Content-Type: application/json
{
"model_id": "my_decision",
"version": "1.0.0",
"inputs_schema": {
"field_name": { "type": "string|integer|number|boolean|enum", "required": true }
},
"outputs_schema": {
"result_field": { "type": "boolean", "required": true }
},
"policy": { "hit_policy": "FIRST" },
"rules": [
{ "id": "rule_1", "when": { "field_name": { "eq": "value" } }, "then": { "result_field": true } },
{ "id": "rule_default", "when": { "default": true }, "then": { "result_field": false } }
]
}
Decision Result Response
{
"model_id": "loan_approval",
"version": "1.0.0",
"status": "SUCCESS",
"decision": {
"result": { "approved": true, "reasonCode": "APPROVED_EXCELLENT", "interest_rate": 3.5 },
"decision_name": "loan_approval"
},
"explanation": { "matched_rules": [...], "confidence": 0.95 },
"metadata": { "executed_at": "2026-03-02T10:00:00Z", "execution_time_ms": 45 }
}
Docker Commands
| Action | Command |
| Build & start | docker compose up -d --build |
| Start | docker start powerdecision-api |
| Stop | docker stop powerdecision-api |
| View logs | docker logs -f powerdecision-api |
| Health check | curl http://localhost:8031/q/health |
| Swagger UI | http://localhost:8031/swagger-ui.html |
File Locations
| Component | Path |
| Decision API | decision-api/ |
| Decision Wizard | decision-wizard/ |
| Decision Templates | decision-templates/ |
| Uploaded Models (Docker) | /app/models/ |
| Documentation | Documentation/ |
Environment URLs
| Environment | API | Health | Swagger |
| Local | http://localhost:8031 | http://localhost:8031/q/health | http://localhost:8031/swagger-ui.html |
| Production | https://decision-api.planningpowertools.com | https://decision-api.planningpowertools.com/q/health | N/A |
Support