commit 75e3a05d3652a358cba2b2ab7b14e1c92ed04348 Author: ProcessGit Templates Date: Thu Feb 5 21:19:44 2026 +0000 Initial template import diff --git a/.gitea/template b/.gitea/template new file mode 100644 index 0000000..be03def --- /dev/null +++ b/.gitea/template @@ -0,0 +1,4 @@ +# Expand placeholders across integration documentation +README.md +connectors/** +config/** diff --git a/README.md b/README.md new file mode 100644 index 0000000..ad4eccb --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# {{.RepoName}} + +UAPF integration-ready template with REST, SOAP, and database connector placeholders. diff --git a/config/secrets.example.env b/config/secrets.example.env new file mode 100644 index 0000000..8a22205 --- /dev/null +++ b/config/secrets.example.env @@ -0,0 +1,3 @@ +# Example secrets file (do not commit real secrets) +API_KEY=replace-me +DATABASE_URL=postgres://user:pass@host:5432/dbname diff --git a/connectors/database/schema.sql b/connectors/database/schema.sql new file mode 100644 index 0000000..1e59aaa --- /dev/null +++ b/connectors/database/schema.sql @@ -0,0 +1,5 @@ +-- Placeholder database schema for {{.RepoName}} +CREATE TABLE IF NOT EXISTS example_table ( + id INTEGER PRIMARY KEY, + name TEXT NOT NULL +); diff --git a/connectors/rest-api/openapi.yaml b/connectors/rest-api/openapi.yaml new file mode 100644 index 0000000..2c33cfc --- /dev/null +++ b/connectors/rest-api/openapi.yaml @@ -0,0 +1,11 @@ +openapi: 3.0.0 +info: + title: {{.RepoName}} REST Connector + version: 0.1.0 +paths: + /health: + get: + summary: Health check + responses: + '200': + description: ok diff --git a/connectors/soap/wsdl/service.wsdl b/connectors/soap/wsdl/service.wsdl new file mode 100644 index 0000000..54fb06f --- /dev/null +++ b/connectors/soap/wsdl/service.wsdl @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo-process/bpmn/process.bpmn.xml b/demo-process/bpmn/process.bpmn.xml new file mode 100644 index 0000000..d84b122 --- /dev/null +++ b/demo-process/bpmn/process.bpmn.xml @@ -0,0 +1,115 @@ + + + + + + + Flow_1 + + + + + + Flow_1 + Flow_2 + + + + + + Flow_2 + Flow_3 + + + + + + Flow_3 + Flow_4 + + + + + + Flow_4 + Flow_5 + + + + + + Flow_5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo-process/cmmn/case.cmmn.xml b/demo-process/cmmn/case.cmmn.xml new file mode 100644 index 0000000..33c3e72 --- /dev/null +++ b/demo-process/cmmn/case.cmmn.xml @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + create + + + + + + complete + + + + + + complete + + + complete + + + + + + complete + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo-process/dmn/decisions.dmn.xml b/demo-process/dmn/decisions.dmn.xml new file mode 100644 index 0000000..44a8acd --- /dev/null +++ b/demo-process/dmn/decisions.dmn.xml @@ -0,0 +1,137 @@ + + + + + + + + recordType + + + + + + qualityScore + + + + + + hasRequiredFields + + + + + + + + + + "customer" + + + >= 80 + + + true + + + "VALID" + + + "PROCESS" + + + + + + "customer" + + + >= 50 + + + true + + + "WARNING" + + + "REVIEW" + + + + + + "customer" + + + < 50 + + + - + + + "INVALID" + + + "REJECT" + + + + + + - + + + - + + + false + + + "INVALID" + + + "REJECT" + + + + + + "transaction" + + + >= 90 + + + true + + + "VALID" + + + "PROCESS" + + + + + + + + + + + + + + + diff --git a/demo-process/docs/notes.md b/demo-process/docs/notes.md new file mode 100644 index 0000000..a48a0b9 --- /dev/null +++ b/demo-process/docs/notes.md @@ -0,0 +1,168 @@ +# Data Synchronization Process - Documentation + +## Overview + +This process implements a data synchronization workflow that fetches data from an external REST API, transforms and validates it, and writes it to a PostgreSQL database. + +## Process Flow + +1. **Fetch Data from API** - Retrieves customer data from the external REST API endpoint +2. **Transform Data** - Maps external data fields to internal schema +3. **Validate Data** - Applies quality rules and validation logic using DMN decisions +4. **Write to Database** - Persists validated data to the PostgreSQL database + +## Integration Points + +### REST API Connector +- **Location**: `../connectors/rest-api/` +- **Configuration**: See `resources/mappings.yaml` for endpoint details +- **Authentication**: Bearer token (configured via `API_TOKEN` environment variable) +- **Endpoints**: + - GET `/api/v1/data` - Fetch customer records + - PUT `/api/v1/data/{id}` - Update customer record + +### Database Connector +- **Location**: `../connectors/database/` +- **Type**: PostgreSQL +- **Schema**: See `../connectors/database/schema.sql` +- **Tables**: + - `customers` - Main customer data table + - `sync_log` - Synchronization audit trail + +## Decision Logic (DMN) + +The validation decision table (`dmn/decisions.dmn.xml`) evaluates records based on: +- **Record Type**: customer, transaction, etc. +- **Quality Score**: 0-100 numeric quality metric +- **Required Fields**: Presence of mandatory fields + +### Validation Outcomes +- **VALID** (Score ≥ 80) → Process immediately +- **WARNING** (Score 50-79) → Flag for manual review +- **INVALID** (Score < 50 or missing required fields) → Reject + +## Case Management (CMMN) + +When synchronization issues occur, a case is created to manage the investigation and resolution: + +1. **Investigate Issue** - Manual task to analyze the problem +2. **Check API Status** - Automated check of API availability +3. **Check Database Status** - Automated check of database connectivity +4. **Resolve Issue** - Manual remediation task +5. **Retry Synchronization** - Automated retry of failed sync + +## Configuration + +### Environment Variables + +Required environment variables (see `../config/secrets.example.env`): + +```bash +# API Configuration +API_TOKEN=your-api-bearer-token +API_BASE_URL=https://api.example.com + +# Database Configuration +DB_HOST=localhost +DB_PORT=5432 +DB_NAME=processgit +DB_USER=sync_user +DB_PASSWORD=secure_password +``` + +### Data Mapping + +Field mappings are defined in `resources/mappings.yaml`: + +| External Field | Internal Field | Type | +|---------------|----------------|---------| +| external_id | customerId | string | +| full_name | customerName | string | +| contact_email | email | string | +| created_date | createdAt | datetime| + +## Error Handling + +### API Failures +- **Strategy**: Retry with exponential backoff +- **Max Retries**: 3 +- **Notification**: Alert ops team + +### Database Failures +- **Strategy**: Log and continue +- **Notification**: Alert ops team + +### Validation Failures +- **Strategy**: Reject record +- **Log Level**: Warning + +## Performance Considerations + +- **API Timeout**: 30 seconds +- **Database Connection Pool**: 2-10 connections +- **Batch Size**: Recommended 100 records per sync +- **Frequency**: Configurable (default: hourly) + +## Testing + +### Unit Tests +- Validate data transformation logic +- Test decision table rules +- Verify error handling + +### Integration Tests +- End-to-end API to database flow +- Connection failure scenarios +- Data validation edge cases + +### Performance Tests +- Load test with 10,000+ records +- Concurrent sync operations +- Connection pool behavior + +## Monitoring + +### Key Metrics +- Sync success rate +- Average processing time per record +- API response times +- Database query performance +- Error rates by type + +### Alerts +- Sync failure rate > 5% +- API response time > 10s +- Database connection pool exhaustion +- Validation rejection rate > 20% + +## Troubleshooting + +### Common Issues + +**Issue**: Sync fails with API timeout +- **Cause**: API endpoint slow or unavailable +- **Resolution**: Check API status, increase timeout, contact API provider + +**Issue**: Database write failures +- **Cause**: Connection pool exhausted or schema mismatch +- **Resolution**: Check pool configuration, verify schema matches mappings + +**Issue**: High validation rejection rate +- **Cause**: Data quality issues at source +- **Resolution**: Review validation rules, contact data provider + +## Change Log + +### Version 0.1.0 (Initial Release) +- Implemented basic data sync workflow +- Configured REST API and database connectors +- Added DMN validation rules +- Created CMMN case for issue management +- Documented configuration and operations + +## Support + +For issues or questions: +- **Primary Contact**: {{.RepoOwner}}@processgit.local +- **Integration Team**: integration@processgit.local +- **On-Call**: See `metadata/ownership.yaml` diff --git a/demo-process/metadata/lifecycle.yaml b/demo-process/metadata/lifecycle.yaml new file mode 100644 index 0000000..115f9d2 --- /dev/null +++ b/demo-process/metadata/lifecycle.yaml @@ -0,0 +1,90 @@ +# Process Lifecycle Metadata +version: 1.0 + +# Current State +current_state: draft +created_date: "{{.CreatedDate}}" +last_modified: "{{.CreatedDate}}" + +# Lifecycle Stages +stages: + draft: + description: Initial development and design + entry_date: "{{.CreatedDate}}" + criteria: + - Process model defined + - Integration connectors identified + - Basic validation rules established + next_stage: review + + review: + description: Peer review and validation + criteria: + - Process flow reviewed by stakeholders + - Integration endpoints tested + - Security review completed + - Documentation complete + approvers: + - integration-team + - data-governance + next_stage: testing + + testing: + description: Integration and end-to-end testing + criteria: + - Unit tests passing + - Integration tests with API successful + - Database operations validated + - Performance benchmarks met + - Error handling verified + next_stage: staging + + staging: + description: Pre-production validation + criteria: + - Deployed to staging environment + - User acceptance testing complete + - Load testing completed + - Monitoring configured + next_stage: production + + production: + description: Live and operational + criteria: + - Final approval obtained + - Rollback plan documented + - Production deployment successful + - Monitoring active + next_stage: retired + + retired: + description: Decommissioned + criteria: + - Replacement process operational + - Data migration complete + - Documentation archived + +# Version History +version_history: + - version: 0.1.0 + date: "{{.CreatedDate}}" + stage: draft + changes: + - Initial process creation + - API and database connectors configured + author: "{{.RepoOwner}}" + +# Compliance and Review Schedule +compliance: + review_frequency: quarterly + next_review: "{{.NextReviewDate}}" + compliance_frameworks: + - SOX + - GDPR + - ISO27001 + +# Deprecation Policy +deprecation: + notice_period: 90 days + migration_support: 180 days + archive_period: 7 years diff --git a/demo-process/metadata/ownership.yaml b/demo-process/metadata/ownership.yaml new file mode 100644 index 0000000..235bb06 --- /dev/null +++ b/demo-process/metadata/ownership.yaml @@ -0,0 +1,60 @@ +# Process Ownership Metadata +version: 1.0 + +# Primary Owner +primary_owner: + type: team + id: "{{.RepoOwner}}" + name: "{{.RepoOwner}}" + contact: "{{.RepoOwner}}@processgit.local" + responsibilities: + - Process definition and maintenance + - Integration connector management + - Issue resolution and support + +# Additional Stakeholders +stakeholders: + - type: team + id: integration-team + name: Integration Team + contact: integration@processgit.local + role: technical_support + responsibilities: + - API and database connector maintenance + - Connection troubleshooting + - Performance monitoring + + - type: team + id: data-governance + name: Data Governance Team + contact: data-governance@processgit.local + role: compliance + responsibilities: + - Data quality standards + - Validation rule definition + - Compliance oversight + +# Escalation Path +escalation: + level_1: + contact: "{{.RepoOwner}}@processgit.local" + response_time: 4h + + level_2: + contact: integration@processgit.local + response_time: 2h + + level_3: + contact: ops-manager@processgit.local + response_time: 1h + +# Support Schedule +support: + business_hours: + timezone: UTC + monday_friday: "09:00-17:00" + saturday_sunday: "on-call" + + on_call: + primary: "{{.RepoOwner}}" + backup: integration-team diff --git a/demo-process/resources/mappings.yaml b/demo-process/resources/mappings.yaml new file mode 100644 index 0000000..267b6c5 --- /dev/null +++ b/demo-process/resources/mappings.yaml @@ -0,0 +1,145 @@ +# Data Synchronization System Mappings +version: 1.0 +mappings: + + # REST API Configuration + api: + type: rest-api + connector: ../connectors/rest-api + endpoints: + fetch: + path: /api/v1/data + method: GET + headers: + Accept: application/json + Authorization: "Bearer ${API_TOKEN}" + timeout: 30s + retry: + max_attempts: 3 + backoff: exponential + + update: + path: /api/v1/data/{id} + method: PUT + headers: + Content-Type: application/json + Authorization: "Bearer ${API_TOKEN}" + timeout: 30s + + transforms: + incoming: + - type: json_to_object + schema: customer_schema + - type: field_mapping + fields: + external_id: customerId + full_name: customerName + contact_email: email + created_date: createdAt + + outgoing: + - type: object_to_json + - type: field_mapping + fields: + customerId: external_id + customerName: full_name + email: contact_email + + # Database Configuration + database: + type: database + connector: ../connectors/database + connection: + driver: postgresql + host: "${DB_HOST}" + port: "${DB_PORT}" + database: "${DB_NAME}" + username: "${DB_USER}" + password: "${DB_PASSWORD}" + ssl_mode: require + pool: + min_connections: 2 + max_connections: 10 + connection_timeout: 5s + + tables: + customers: + name: customers + schema: public + primary_key: id + fields: + id: SERIAL PRIMARY KEY + customer_id: VARCHAR(100) UNIQUE NOT NULL + customer_name: VARCHAR(255) + email: VARCHAR(255) + quality_score: INTEGER + created_at: TIMESTAMP DEFAULT CURRENT_TIMESTAMP + updated_at: TIMESTAMP DEFAULT CURRENT_TIMESTAMP + + operations: + insert: + query: | + INSERT INTO public.customers (customer_id, customer_name, email, quality_score) + VALUES (?, ?, ?, ?) + ON CONFLICT (customer_id) DO NOTHING + + update: + query: | + UPDATE public.customers + SET customer_name = ?, email = ?, quality_score = ?, updated_at = CURRENT_TIMESTAMP + WHERE customer_id = ? + + upsert: + query: | + INSERT INTO public.customers (customer_id, customer_name, email, quality_score) + VALUES (?, ?, ?, ?) + ON CONFLICT (customer_id) DO UPDATE + SET customer_name = EXCLUDED.customer_name, + email = EXCLUDED.email, + quality_score = EXCLUDED.quality_score, + updated_at = CURRENT_TIMESTAMP + + sync_log: + name: sync_log + schema: public + primary_key: id + fields: + id: SERIAL PRIMARY KEY + sync_id: UUID NOT NULL + status: VARCHAR(50) + records_processed: INTEGER + records_failed: INTEGER + started_at: TIMESTAMP + completed_at: TIMESTAMP + error_message: TEXT + +# Validation Rules +validation: + customer_schema: + required_fields: + - customerId + - customerName + field_types: + customerId: string + customerName: string + email: email + qualityScore: integer + constraints: + qualityScore: + min: 0 + max: 100 + +# Error Handling +error_handling: + on_api_failure: + strategy: retry_with_backoff + max_retries: 3 + notification: alert_ops_team + + on_database_failure: + strategy: log_and_continue + notification: alert_ops_team + + on_validation_failure: + strategy: reject_record + log_level: warning diff --git a/demo-process/uapf.yaml b/demo-process/uapf.yaml new file mode 100644 index 0000000..0e5f883 --- /dev/null +++ b/demo-process/uapf.yaml @@ -0,0 +1,25 @@ +kind: uapf.package +id: uapf.integration-ready +name: Integration Ready Process +description: Process with API and database connectors +level: 4 +version: 0.1.0 +includes: [] +cornerstones: + bpmn: true + dmn: true + cmmn: true + resources: true + integration: true +paths: + bpmn: bpmn + dmn: dmn + cmmn: cmmn + resources: resources + metadata: metadata + connectors: ../connectors +owners: + - type: team + id: "{{.RepoOwner}}" + contact: "{{.RepoOwner}}@processgit.local" +lifecycle: draft diff --git a/enterprise/enterprise.yaml b/enterprise/enterprise.yaml new file mode 100644 index 0000000..4efafd8 --- /dev/null +++ b/enterprise/enterprise.yaml @@ -0,0 +1,262 @@ +# Enterprise Configuration for Integration Ready Template +kind: uapf.enterprise +version: 1.0 + +# Enterprise Metadata +enterprise: + name: "{{.RepoOwner}} Organization" + id: "{{.RepoOwner}}" + domain: processgit.local + established: "{{.CreatedDate}}" + +# Repository Configuration +repository: + type: integration-ready + template: uapf-integration-ready + level: 4 + description: Enterprise process repository with integration capabilities + +# Governance +governance: + compliance_frameworks: + - name: SOX + enabled: true + requirements: + - audit_trail + - change_management + - access_control + + - name: GDPR + enabled: true + requirements: + - data_privacy + - consent_management + - data_retention + + - name: ISO27001 + enabled: true + requirements: + - information_security + - risk_management + - incident_response + + policies: + - id: POL-001 + name: Integration Security Policy + description: Security requirements for external integrations + mandatory: true + + - id: POL-002 + name: Data Quality Policy + description: Standards for data validation and quality + mandatory: true + + - id: POL-003 + name: Change Management Policy + description: Process for managing changes to production integrations + mandatory: true + +# Integration Standards +integration: + security: + authentication: + - bearer_token + - oauth2 + - api_key + + encryption: + in_transit: TLS_1.2_or_higher + at_rest: AES_256 + + secrets_management: + provider: vault + rotation_period: 90d + + api_standards: + protocols: + - REST + - GraphQL + - SOAP + + formats: + - JSON + - XML + + versioning: semantic + rate_limiting: true + + database_standards: + supported_databases: + - PostgreSQL + - MySQL + - Oracle + - SQL Server + + connection_pooling: required + prepared_statements: required + transaction_management: required + +# Monitoring and Observability +monitoring: + metrics: + enabled: true + provider: prometheus + retention: 30d + + logging: + enabled: true + level: info + provider: elasticsearch + retention: 90d + + tracing: + enabled: true + provider: jaeger + sampling_rate: 0.1 + + alerting: + enabled: true + channels: + - email + - slack + - pagerduty + +# Environments +environments: + development: + description: Local development environment + isolation: container + data_masking: true + + testing: + description: Automated testing environment + isolation: namespace + data_masking: true + + staging: + description: Pre-production environment + isolation: cluster + data_masking: true + approval_required: false + + production: + description: Live production environment + isolation: cluster + data_masking: false + approval_required: true + approvers: + - integration-team-lead + - security-team + +# Access Control +access_control: + authentication: + method: sso + provider: oauth2 + + authorization: + model: rbac + roles: + - name: process-developer + permissions: + - read:process + - write:process + - read:connectors + - write:connectors + + - name: process-operator + permissions: + - read:process + - execute:process + - read:monitoring + + - name: integration-admin + permissions: + - read:* + - write:* + - admin:connectors + - admin:credentials + + - name: auditor + permissions: + - read:process + - read:audit-logs + - read:monitoring + +# Deployment +deployment: + strategy: blue_green + + pipeline: + stages: + - name: build + automated: true + + - name: test + automated: true + gates: + - unit_tests + - integration_tests + + - name: security_scan + automated: true + gates: + - vulnerability_scan + - secrets_detection + + - name: staging + automated: true + gates: + - smoke_tests + - performance_tests + + - name: production + automated: false + approval_required: true + gates: + - manual_approval + - rollback_plan + + rollback: + automatic: true + conditions: + - error_rate_threshold: 5% + - latency_threshold: 5s + - availability_threshold: 99% + +# Support and Maintenance +support: + business_hours: + timezone: UTC + schedule: "24/7" + + sla: + availability: 99.9% + response_time: + critical: 1h + high: 4h + medium: 1d + low: 3d + + maintenance_windows: + frequency: monthly + duration: 2h + notification_period: 7d + +# Backup and Recovery +backup: + process_definitions: + frequency: daily + retention: 90d + + configuration: + frequency: on_change + retention: 365d + + audit_logs: + frequency: real_time + retention: 7y + + recovery: + rpo: 1h + rto: 4h