Skip to content

HR-medewerker onboarding (ERPNext → NexusID → HarborERP / Ledgerly / Taxline)

Event-gedreven onboarding: nieuwe medewerkers uit ERPNext, eerst een directory-account in NexusID, daarna parallel aanmaken in HarborERP, Ledgerly (SOAP) en Taxline. Als alle scopes slagen, gaat er een mail naar de manager.

Geen nieuwe capability-providers: egress.http.call, egress.rabbitmq.topic.send, transformers.*, script.execute, egress.smtp.call.

Systeemkaarten: ERPNext, NexusID, HarborERP, Ledgerly, Taxline. Catalogus: Integrations.

Applicatienamen

Rol Demo-naam Connection
HR-bron (was AFAS) ERPNext (Employee) erpnext
Directory / IAM (was Entra) NexusID nexusid
Financieel ERP (was Business Central) HarborERP harborerp
Boekhouding SOAP (was AccountView) Ledgerly ledgerly
Fiscaal / payroll (was AFAS Fiscaal) Taxline taxline
Manager-mail SMTP fellman.nl

Architectuur

flowchart TB
  SCH[Schedule + cursor] --> EXT[hr_employee_extract_erpnext]
  EXT -->|GET Employee| ERP[ERPNext]
  EXT -->|DSAV HR.Employee.New.1.0| BUS[meshflows.events]
  BUS --> IAM[hr_employee_create_nexusid]
  IAM -->|POST /v1/directory/users| NID[NexusID]
  IAM -->|DSAV HR.Employee.CreatedInIAM.1.0| BUS
  BUS --> PROV[hr_employee_provision_targets]
  PROV --> PAR[type: parallel]
  PAR --> H[HarborERP]
  PAR --> L[Ledgerly SOAP]
  PAR --> T[Taxline]
  PAR --> MAIL[SMTP manager]

De join zit in de run-graph (type: parallel, daarna SMTP). MeshFlows heeft geen parallel convoy op de bus (ADR 0014).

DSAV-contract

Event Domain / Service / Action / Version Routing key Body
Nieuwe medewerker HR / Employee / New / 1.0 hr.employee.new.1.0 CDM Employee XML
Account in directory HR / Employee / CreatedInIAM / 1.0 hr.employee.creatediniam.1.0 CDM + IAMObjectId

business_id = ERPNext Employee.name (bijv. HR-EMP-00042).

CDM-root <Employee>: ID, FirstName, LastName, DisplayName, Email, Company, Department, JobTitle, Status, DateOfJoining, ManagerID, IAMObjectId.

Workflows

Workflow Start Doet
hr_employee_extract_erpnext schedule (5 min, disabled) + HTTP Cursor → ERPNext list/GET → XSLT CDM → publish New
hr_employee_create_nexusid AMQP New + HTTP POST NexusID → stamp IAMObjectId → publish CreatedInIAM
hr_employee_provision_targets AMQP CreatedInIAM + HTTP parallel HarborERP / Ledgerly / Taxline → SMTP

YAML: flows/workflows/hr_employee_*.yaml, flows/triggers/hr-employee-*.yaml, flows/schedules/hr-employee-extract-erpnext.yaml.

Extract (ERPNext + cursor)

cursor:
  enabled: true
  bucket: trigger-cursors
  key: HR/Employee/ERPNext/watermark
  default_value: "1970-01-01 00:00:00"
  context_key: filterDateTime
  update_from_context: currentDateTime

Orchestrator injecteert filterDateTime bij start en schrijft currentDateTime terug na een geslaagde run. Dashboard Design → Cursor.

ERPNext: GET /api/resource/Employee met modified > watermark, daarna GET /api/resource/Employee/{name}. Mapping: flows/artifacts/transforms/hr-employee/erpnext-employee-to-cdm.xslt.

NexusID

AMQP-filters op DSAV-headers + routing key hr.employee.new.1.0. OAuth client credentials op de HTTP-connection; de orchestrator cachet de bearer en stuurt geen client_secret naar egress (ADR 0011).

Parallel provision + manager

fail_fast: true: SMTP draait alleen als alle drie de scopes slagen. Ledgerly volgt SOAP over HTTP + XSLT. Mail: egress.smtp.call op fellman.nl, ontvangers config:email.to_emails.

Business events

Elke workflow logt meshflows.business_event met tag business-event (New, CreatedInIAM, FullyProvisioned). Zie Business events.

Secrets en hosts

Secret Gebruik
erpnext-api-key / erpnext-api-secret ERPNext Authorization: token …
nexusid-client-id / nexusid-client-secret NexusID OAuth
harborerp-client-id / harborerp-client-secret HarborERP OAuth
taxline-api-token Taxline bearer
smtp-password SMTP fellman.nl

Zet base_urls op de echte API's en voeg hosts toe aan global.config.egress.http.allowed_hosts vóór je de schedule op enabled: true zet.

Handmatig testen

Stap HTTP
Extract POST /v1/api/hr/employee-extract-erpnext
NexusID POST /v1/api/hr/employee-create-nexusid + sample-cdm-employee.xml
Provision POST /v1/api/hr/employee-provision-targets + sample-cdm-employee-iam.xml

Of Dashboard → workflow → example payload.

Wat dit niet is

  • Geen native AFAS/Entra/BC-connector in de orchestrator.
  • Geen parallel convoy / correlation-set dehydrate.
  • Geen C#-custom process — wrap een .NET SDK desgewenst als provider (C# custom process).