kind: uapf.resources.mapping # ─── Targets: who/what fulfills the work ───────────────────────── targets: - id: system.opendms-document-api type: system_api name: OpenDMS document API description: Hosting DMS that stores the iesniegums and returns its content + metadata. capabilities: - capability.document.fetch - capability.data.write endpoint: "uapf-host:/api/documents" authentication: method: oauth2 configRef: "host-oauth" - id: agent.tiesibsargs-pii-redactor type: ai_agent name: PII redaction agent description: Masks personal data from iesniegums text before downstream AI processing. Enforces GDPR Art. 5 minimisation. capabilities: - capability.ai.redact - id: agent.tiesibsargs-fact-extractor type: ai_agent name: Structured fact extractor description: Extracts typed facets (mentions_child, ongoing_harm, vulnerable_group, criminal_indication, language, sector) from redacted text. Consumed by the three downstream DMN decisions. capabilities: - capability.ai.extract - id: system.opendms-event-bus type: system_api name: OpenDMS event bus description: CloudEvents v1.0 receiver. Downstream subscribers consume document.classified.v1 events. capabilities: - capability.event.emit - id: role.tiesibsargs-iesniegumu-koordinators type: human_role name: Iesniegumu koordinators description: Human reviewer required by EU AI Act Art. 14 when humanValidationStatus is PENDING or REQUIRED. Fallback for low-confidence classifications. # ─── Bindings: BPMN/DMN element → target ───────────────────────── bindings: # BPMN service tasks - source: { type: bpmn.serviceTask, ref: FetchDocument } targetId: system.opendms-document-api mode: autonomous contract: input: - { name: documentId, type: string, required: true } output: - { name: title, type: string } - { name: docType, type: string } - { name: regNumber, type: string } - { name: text, type: string } timeout: "30s" retries: { maxAttempts: 3, backoffMs: 1000 } requiredCapabilities: [capability.document.fetch] - source: { type: bpmn.serviceTask, ref: RedactPii } targetId: agent.tiesibsargs-pii-redactor mode: autonomous contract: input: - { name: text, type: string, required: true } output: - { name: redactedText, type: string } - { name: detections, type: array } timeout: "10s" requiredCapabilities: [capability.ai.redact] fallback: onError: "fail" onTimeout: "fail" - source: { type: bpmn.serviceTask, ref: ExtractFacets } targetId: agent.tiesibsargs-fact-extractor mode: autonomous contract: input: - { name: text, type: string, required: true } output: - { name: extracted, type: object } - { name: confidence, type: number } - { name: modelUsed, type: string } timeout: "30s" retries: { maxAttempts: 2, backoffMs: 2000 } requiredCapabilities: [capability.ai.extract] fallback: targetId: role.tiesibsargs-iesniegumu-koordinators onError: "escalate" onTimeout: "escalate" - source: { type: bpmn.serviceTask, ref: RecordClassification } targetId: system.opendms-document-api mode: autonomous contract: input: - { name: documentId, type: string, required: true } - { name: classification, type: object, required: true } timeout: "10s" requiredCapabilities: [capability.data.write] - source: { type: bpmn.serviceTask, ref: EmitClassifiedEvent } targetId: system.opendms-event-bus mode: autonomous contract: input: - { name: eventType, type: string, required: true } - { name: payload, type: object, required: true } timeout: "5s" requiredCapabilities: [capability.event.emit] # BPMN business rule tasks → DMN decisions - source: { type: dmn.decision, ref: classify-topic } targetId: agent.tiesibsargs-fact-extractor mode: autonomous notes: "DMN evaluation is local to the engine; AI agent supplies the input facets." - source: { type: dmn.decision, ref: determine-priority } targetId: agent.tiesibsargs-fact-extractor mode: autonomous notes: "Driven by topic + ongoing_harm + vulnerable_group + mentions_child facets." - source: { type: dmn.decision, ref: route-to-department } targetId: agent.tiesibsargs-fact-extractor mode: autonomous notes: "Topic → department mapping. Output is consumed by downstream human workflow."