You've already forked uapf-integration-ready
Import UAPF package
Initial template import
This commit is contained in:
115
demo-process/bpmn/process.bpmn.xml
Normal file
115
demo-process/bpmn/process.bpmn.xml
Normal file
@@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL"
|
||||
xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
|
||||
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
|
||||
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
id="Definitions_DataSync"
|
||||
targetNamespace="http://processgit.local/bpmn"
|
||||
exporter="ProcessGit"
|
||||
exporterVersion="1.0">
|
||||
|
||||
<bpmn:process id="DataSynchronizationProcess" name="Data Synchronization Process" isExecutable="true">
|
||||
|
||||
<bpmn:startEvent id="StartEvent_1" name="Sync Triggered">
|
||||
<bpmn:outgoing>Flow_1</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
|
||||
<bpmn:sequenceFlow id="Flow_1" sourceRef="StartEvent_1" targetRef="Task_FetchAPI" />
|
||||
|
||||
<bpmn:serviceTask id="Task_FetchAPI" name="Fetch Data from API">
|
||||
<bpmn:incoming>Flow_1</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_2</bpmn:outgoing>
|
||||
</bpmn:serviceTask>
|
||||
|
||||
<bpmn:sequenceFlow id="Flow_2" sourceRef="Task_FetchAPI" targetRef="Task_Transform" />
|
||||
|
||||
<bpmn:serviceTask id="Task_Transform" name="Transform Data">
|
||||
<bpmn:incoming>Flow_2</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_3</bpmn:outgoing>
|
||||
</bpmn:serviceTask>
|
||||
|
||||
<bpmn:sequenceFlow id="Flow_3" sourceRef="Task_Transform" targetRef="Task_Validate" />
|
||||
|
||||
<bpmn:serviceTask id="Task_Validate" name="Validate Data">
|
||||
<bpmn:incoming>Flow_3</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_4</bpmn:outgoing>
|
||||
</bpmn:serviceTask>
|
||||
|
||||
<bpmn:sequenceFlow id="Flow_4" sourceRef="Task_Validate" targetRef="Task_WriteToDB" />
|
||||
|
||||
<bpmn:serviceTask id="Task_WriteToDB" name="Write to Database">
|
||||
<bpmn:incoming>Flow_4</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_5</bpmn:outgoing>
|
||||
</bpmn:serviceTask>
|
||||
|
||||
<bpmn:sequenceFlow id="Flow_5" sourceRef="Task_WriteToDB" targetRef="EndEvent_1" />
|
||||
|
||||
<bpmn:endEvent id="EndEvent_1" name="Sync Complete">
|
||||
<bpmn:incoming>Flow_5</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
|
||||
</bpmn:process>
|
||||
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DataSynchronizationProcess">
|
||||
|
||||
<bpmndi:BPMNShape id="StartEvent_1_di" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="152" y="102" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="132" y="145" width="76" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
|
||||
<bpmndi:BPMNShape id="Task_FetchAPI_di" bpmnElement="Task_FetchAPI">
|
||||
<dc:Bounds x="240" y="80" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
|
||||
<bpmndi:BPMNShape id="Task_Transform_di" bpmnElement="Task_Transform">
|
||||
<dc:Bounds x="390" y="80" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
|
||||
<bpmndi:BPMNShape id="Task_Validate_di" bpmnElement="Task_Validate">
|
||||
<dc:Bounds x="540" y="80" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
|
||||
<bpmndi:BPMNShape id="Task_WriteToDB_di" bpmnElement="Task_WriteToDB">
|
||||
<dc:Bounds x="690" y="80" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
|
||||
<bpmndi:BPMNShape id="EndEvent_1_di" bpmnElement="EndEvent_1">
|
||||
<dc:Bounds x="842" y="102" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="821" y="145" width="78" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
|
||||
<bpmndi:BPMNEdge id="Flow_1_di" bpmnElement="Flow_1">
|
||||
<di:waypoint x="188" y="120" />
|
||||
<di:waypoint x="240" y="120" />
|
||||
</bpmndi:BPMNEdge>
|
||||
|
||||
<bpmndi:BPMNEdge id="Flow_2_di" bpmnElement="Flow_2">
|
||||
<di:waypoint x="340" y="120" />
|
||||
<di:waypoint x="390" y="120" />
|
||||
</bpmndi:BPMNEdge>
|
||||
|
||||
<bpmndi:BPMNEdge id="Flow_3_di" bpmnElement="Flow_3">
|
||||
<di:waypoint x="490" y="120" />
|
||||
<di:waypoint x="540" y="120" />
|
||||
</bpmndi:BPMNEdge>
|
||||
|
||||
<bpmndi:BPMNEdge id="Flow_4_di" bpmnElement="Flow_4">
|
||||
<di:waypoint x="640" y="120" />
|
||||
<di:waypoint x="690" y="120" />
|
||||
</bpmndi:BPMNEdge>
|
||||
|
||||
<bpmndi:BPMNEdge id="Flow_5_di" bpmnElement="Flow_5">
|
||||
<di:waypoint x="790" y="120" />
|
||||
<di:waypoint x="842" y="120" />
|
||||
</bpmndi:BPMNEdge>
|
||||
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
|
||||
</bpmn:definitions>
|
||||
114
demo-process/cmmn/case.cmmn.xml
Normal file
114
demo-process/cmmn/case.cmmn.xml
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<cmmn:definitions xmlns:cmmn="http://www.omg.org/spec/CMMN/20151109/MODEL"
|
||||
xmlns:cmmndi="http://www.omg.org/spec/CMMN/20151109/CMMNDI"
|
||||
xmlns:dc="http://www.omg.org/spec/CMMN/20151109/DC"
|
||||
xmlns:di="http://www.omg.org/spec/CMMN/20151109/DI"
|
||||
id="Definitions_SyncIssueCase"
|
||||
targetNamespace="http://processgit.local/cmmn"
|
||||
exporter="ProcessGit"
|
||||
exporterVersion="1.0">
|
||||
|
||||
<cmmn:case id="SyncIssueCase" name="Data Sync Issue Case">
|
||||
|
||||
<cmmn:casePlanModel id="CasePlanModel_1" name="Handle Sync Issue">
|
||||
|
||||
<cmmn:planItem id="PlanItem_InvestigateIssue" definitionRef="HumanTask_Investigate">
|
||||
<cmmn:entryCriterion id="EntryCriterion_1" sentryRef="Sentry_CaseStart" />
|
||||
</cmmn:planItem>
|
||||
|
||||
<cmmn:planItem id="PlanItem_CheckAPIStatus" definitionRef="Task_CheckAPI">
|
||||
<cmmn:entryCriterion id="EntryCriterion_2" sentryRef="Sentry_InvestigationComplete" />
|
||||
</cmmn:planItem>
|
||||
|
||||
<cmmn:planItem id="PlanItem_CheckDBStatus" definitionRef="Task_CheckDB">
|
||||
<cmmn:entryCriterion id="EntryCriterion_3" sentryRef="Sentry_InvestigationComplete" />
|
||||
</cmmn:planItem>
|
||||
|
||||
<cmmn:planItem id="PlanItem_ResolveIssue" definitionRef="HumanTask_Resolve">
|
||||
<cmmn:entryCriterion id="EntryCriterion_4" sentryRef="Sentry_DiagnosisComplete" />
|
||||
</cmmn:planItem>
|
||||
|
||||
<cmmn:planItem id="PlanItem_RetrySync" definitionRef="Task_Retry">
|
||||
<cmmn:entryCriterion id="EntryCriterion_5" sentryRef="Sentry_IssueResolved" />
|
||||
</cmmn:planItem>
|
||||
|
||||
<cmmn:sentry id="Sentry_CaseStart">
|
||||
<cmmn:planItemOnPart id="OnPart_1" sourceRef="PlanItem_InvestigateIssue">
|
||||
<cmmn:standardEvent>create</cmmn:standardEvent>
|
||||
</cmmn:planItemOnPart>
|
||||
</cmmn:sentry>
|
||||
|
||||
<cmmn:sentry id="Sentry_InvestigationComplete">
|
||||
<cmmn:planItemOnPart id="OnPart_2" sourceRef="PlanItem_InvestigateIssue">
|
||||
<cmmn:standardEvent>complete</cmmn:standardEvent>
|
||||
</cmmn:planItemOnPart>
|
||||
</cmmn:sentry>
|
||||
|
||||
<cmmn:sentry id="Sentry_DiagnosisComplete">
|
||||
<cmmn:planItemOnPart id="OnPart_3" sourceRef="PlanItem_CheckAPIStatus">
|
||||
<cmmn:standardEvent>complete</cmmn:standardEvent>
|
||||
</cmmn:planItemOnPart>
|
||||
<cmmn:planItemOnPart id="OnPart_4" sourceRef="PlanItem_CheckDBStatus">
|
||||
<cmmn:standardEvent>complete</cmmn:standardEvent>
|
||||
</cmmn:planItemOnPart>
|
||||
</cmmn:sentry>
|
||||
|
||||
<cmmn:sentry id="Sentry_IssueResolved">
|
||||
<cmmn:planItemOnPart id="OnPart_5" sourceRef="PlanItem_ResolveIssue">
|
||||
<cmmn:standardEvent>complete</cmmn:standardEvent>
|
||||
</cmmn:planItemOnPart>
|
||||
</cmmn:sentry>
|
||||
|
||||
<cmmn:humanTask id="HumanTask_Investigate" name="Investigate Issue" />
|
||||
|
||||
<cmmn:task id="Task_CheckAPI" name="Check API Status" />
|
||||
|
||||
<cmmn:task id="Task_CheckDB" name="Check Database Status" />
|
||||
|
||||
<cmmn:humanTask id="HumanTask_Resolve" name="Resolve Issue" />
|
||||
|
||||
<cmmn:task id="Task_Retry" name="Retry Synchronization" />
|
||||
|
||||
</cmmn:casePlanModel>
|
||||
|
||||
</cmmn:case>
|
||||
|
||||
<cmmndi:CMMNDI>
|
||||
<cmmndi:CMMNDiagram id="CMMNDiagram_1">
|
||||
<cmmndi:CMMNShape id="CMMNShape_CasePlanModel_1" cmmnElementRef="CasePlanModel_1">
|
||||
<dc:Bounds x="50" y="50" width="700" height="400" />
|
||||
</cmmndi:CMMNShape>
|
||||
|
||||
<cmmndi:CMMNShape id="CMMNShape_PlanItem_1" cmmnElementRef="PlanItem_InvestigateIssue">
|
||||
<dc:Bounds x="100" y="100" width="100" height="80" />
|
||||
</cmmndi:CMMNShape>
|
||||
|
||||
<cmmndi:CMMNShape id="CMMNShape_PlanItem_2" cmmnElementRef="PlanItem_CheckAPIStatus">
|
||||
<dc:Bounds x="250" y="100" width="100" height="80" />
|
||||
</cmmndi:CMMNShape>
|
||||
|
||||
<cmmndi:CMMNShape id="CMMNShape_PlanItem_3" cmmnElementRef="PlanItem_CheckDBStatus">
|
||||
<dc:Bounds x="250" y="220" width="100" height="80" />
|
||||
</cmmndi:CMMNShape>
|
||||
|
||||
<cmmndi:CMMNShape id="CMMNShape_PlanItem_4" cmmnElementRef="PlanItem_ResolveIssue">
|
||||
<dc:Bounds x="400" y="160" width="100" height="80" />
|
||||
</cmmndi:CMMNShape>
|
||||
|
||||
<cmmndi:CMMNShape id="CMMNShape_PlanItem_5" cmmnElementRef="PlanItem_RetrySync">
|
||||
<dc:Bounds x="550" y="160" width="100" height="80" />
|
||||
</cmmndi:CMMNShape>
|
||||
|
||||
<cmmndi:CMMNShape id="EntryCriterion_1_di" cmmnElementRef="EntryCriterion_1">
|
||||
<dc:Bounds x="270" y="126" width="20" height="28" />
|
||||
</cmmndi:CMMNShape>
|
||||
<cmmndi:CMMNShape id="EntryCriterion_2_di" cmmnElementRef="EntryCriterion_2">
|
||||
<dc:Bounds x="420" y="126" width="20" height="28" />
|
||||
</cmmndi:CMMNShape>
|
||||
<cmmndi:CMMNShape id="EntryCriterion_3_di" cmmnElementRef="EntryCriterion_3">
|
||||
<dc:Bounds x="440" y="306" width="20" height="28" />
|
||||
</cmmndi:CMMNShape>
|
||||
</cmmndi:CMMNDiagram>
|
||||
</cmmndi:CMMNDI>
|
||||
|
||||
</cmmn:definitions>
|
||||
137
demo-process/dmn/decisions.dmn.xml
Normal file
137
demo-process/dmn/decisions.dmn.xml
Normal file
@@ -0,0 +1,137 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/"
|
||||
xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/"
|
||||
xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"
|
||||
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
|
||||
id="Definitions_DataValidation"
|
||||
name="Data Validation Decisions"
|
||||
namespace="http://processgit.local/dmn"
|
||||
exporter="ProcessGit"
|
||||
exporterVersion="1.0">
|
||||
|
||||
<decision id="Decision_ValidateRecord" name="Validate Record">
|
||||
<decisionTable id="DecisionTable_1">
|
||||
<input id="Input_1" label="Record Type">
|
||||
<inputExpression id="InputExpression_1" typeRef="string">
|
||||
<text>recordType</text>
|
||||
</inputExpression>
|
||||
</input>
|
||||
|
||||
<input id="Input_2" label="Data Quality Score">
|
||||
<inputExpression id="InputExpression_2" typeRef="number">
|
||||
<text>qualityScore</text>
|
||||
</inputExpression>
|
||||
</input>
|
||||
|
||||
<input id="Input_3" label="Required Fields Present">
|
||||
<inputExpression id="InputExpression_3" typeRef="boolean">
|
||||
<text>hasRequiredFields</text>
|
||||
</inputExpression>
|
||||
</input>
|
||||
|
||||
<output id="Output_1" label="Validation Result" name="validationResult" typeRef="string" />
|
||||
|
||||
<output id="Output_2" label="Action" name="action" typeRef="string" />
|
||||
|
||||
<rule id="Rule_1">
|
||||
<inputEntry id="InputEntry_1_1">
|
||||
<text>"customer"</text>
|
||||
</inputEntry>
|
||||
<inputEntry id="InputEntry_1_2">
|
||||
<text>>= 80</text>
|
||||
</inputEntry>
|
||||
<inputEntry id="InputEntry_1_3">
|
||||
<text>true</text>
|
||||
</inputEntry>
|
||||
<outputEntry id="OutputEntry_1_1">
|
||||
<text>"VALID"</text>
|
||||
</outputEntry>
|
||||
<outputEntry id="OutputEntry_1_2">
|
||||
<text>"PROCESS"</text>
|
||||
</outputEntry>
|
||||
</rule>
|
||||
|
||||
<rule id="Rule_2">
|
||||
<inputEntry id="InputEntry_2_1">
|
||||
<text>"customer"</text>
|
||||
</inputEntry>
|
||||
<inputEntry id="InputEntry_2_2">
|
||||
<text>>= 50</text>
|
||||
</inputEntry>
|
||||
<inputEntry id="InputEntry_2_3">
|
||||
<text>true</text>
|
||||
</inputEntry>
|
||||
<outputEntry id="OutputEntry_2_1">
|
||||
<text>"WARNING"</text>
|
||||
</outputEntry>
|
||||
<outputEntry id="OutputEntry_2_2">
|
||||
<text>"REVIEW"</text>
|
||||
</outputEntry>
|
||||
</rule>
|
||||
|
||||
<rule id="Rule_3">
|
||||
<inputEntry id="InputEntry_3_1">
|
||||
<text>"customer"</text>
|
||||
</inputEntry>
|
||||
<inputEntry id="InputEntry_3_2">
|
||||
<text>< 50</text>
|
||||
</inputEntry>
|
||||
<inputEntry id="InputEntry_3_3">
|
||||
<text>-</text>
|
||||
</inputEntry>
|
||||
<outputEntry id="OutputEntry_3_1">
|
||||
<text>"INVALID"</text>
|
||||
</outputEntry>
|
||||
<outputEntry id="OutputEntry_3_2">
|
||||
<text>"REJECT"</text>
|
||||
</outputEntry>
|
||||
</rule>
|
||||
|
||||
<rule id="Rule_4">
|
||||
<inputEntry id="InputEntry_4_1">
|
||||
<text>-</text>
|
||||
</inputEntry>
|
||||
<inputEntry id="InputEntry_4_2">
|
||||
<text>-</text>
|
||||
</inputEntry>
|
||||
<inputEntry id="InputEntry_4_3">
|
||||
<text>false</text>
|
||||
</inputEntry>
|
||||
<outputEntry id="OutputEntry_4_1">
|
||||
<text>"INVALID"</text>
|
||||
</outputEntry>
|
||||
<outputEntry id="OutputEntry_4_2">
|
||||
<text>"REJECT"</text>
|
||||
</outputEntry>
|
||||
</rule>
|
||||
|
||||
<rule id="Rule_5">
|
||||
<inputEntry id="InputEntry_5_1">
|
||||
<text>"transaction"</text>
|
||||
</inputEntry>
|
||||
<inputEntry id="InputEntry_5_2">
|
||||
<text>>= 90</text>
|
||||
</inputEntry>
|
||||
<inputEntry id="InputEntry_5_3">
|
||||
<text>true</text>
|
||||
</inputEntry>
|
||||
<outputEntry id="OutputEntry_5_1">
|
||||
<text>"VALID"</text>
|
||||
</outputEntry>
|
||||
<outputEntry id="OutputEntry_5_2">
|
||||
<text>"PROCESS"</text>
|
||||
</outputEntry>
|
||||
</rule>
|
||||
|
||||
</decisionTable>
|
||||
</decision>
|
||||
|
||||
<dmndi:DMNDI>
|
||||
<dmndi:DMNDiagram id="DMNDiagram_1">
|
||||
<dmndi:DMNShape id="DMNShape_Decision_1" dmnElementRef="Decision_ValidateRecord">
|
||||
<dc:Bounds x="150" y="150" width="180" height="80" />
|
||||
</dmndi:DMNShape>
|
||||
</dmndi:DMNDiagram>
|
||||
</dmndi:DMNDI>
|
||||
|
||||
</definitions>
|
||||
168
demo-process/docs/notes.md
Normal file
168
demo-process/docs/notes.md
Normal file
@@ -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`
|
||||
90
demo-process/metadata/lifecycle.yaml
Normal file
90
demo-process/metadata/lifecycle.yaml
Normal file
@@ -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
|
||||
60
demo-process/metadata/ownership.yaml
Normal file
60
demo-process/metadata/ownership.yaml
Normal file
@@ -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
|
||||
145
demo-process/resources/mappings.yaml
Normal file
145
demo-process/resources/mappings.yaml
Normal file
@@ -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
|
||||
25
demo-process/uapf.yaml
Normal file
25
demo-process/uapf.yaml
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user