From 3d8da4597b4ba78f9a695345075612c492577cc5 Mon Sep 17 00:00:00 2001 From: Stephan Pelikan Date: Wed, 7 Oct 2026 13:14:42 +0200 Subject: [PATCH] docs: state that instanceId and processInstanceId are the same value ProcessInformation.instanceId and the processInstanceId in the meta of a task name the same process instance with the same string. A caller can match a delivered task to the instance it started. Confirmed in #318. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Lxo4MXbp6VPoDkUrTBNXJ1 --- .../dev/bpmcrafters/processengineapi/CommonRestrictions.kt | 4 ++++ .../processengineapi/process/ProcessInformation.kt | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/api/src/main/kotlin/dev/bpmcrafters/processengineapi/CommonRestrictions.kt b/api/src/main/kotlin/dev/bpmcrafters/processengineapi/CommonRestrictions.kt index 2043f35f..11c1d05b 100644 --- a/api/src/main/kotlin/dev/bpmcrafters/processengineapi/CommonRestrictions.kt +++ b/api/src/main/kotlin/dev/bpmcrafters/processengineapi/CommonRestrictions.kt @@ -28,6 +28,10 @@ object CommonRestrictions { /** * Id provided by the runtime identifying the process instance. + * + * In the meta of a task, the value is the same as + * [dev.bpmcrafters.processengineapi.process.ProcessInformation.instanceId] returned when that process + * instance was started. An engine which uses a different value in one of the two places has a bug. */ const val PROCESS_INSTANCE_ID = "processInstanceId" diff --git a/api/src/main/kotlin/dev/bpmcrafters/processengineapi/process/ProcessInformation.kt b/api/src/main/kotlin/dev/bpmcrafters/processengineapi/process/ProcessInformation.kt index eb0ee5ff..fa7c7495 100644 --- a/api/src/main/kotlin/dev/bpmcrafters/processengineapi/process/ProcessInformation.kt +++ b/api/src/main/kotlin/dev/bpmcrafters/processengineapi/process/ProcessInformation.kt @@ -7,6 +7,11 @@ package dev.bpmcrafters.processengineapi.process data class ProcessInformation( /** * Reference to the instance. + * + * When an engine puts [dev.bpmcrafters.processengineapi.CommonRestrictions.PROCESS_INSTANCE_ID] into the + * meta of a task of this instance, it is the same value. A caller can rely on that to match a delivered + * task to the process instance it started. An engine which uses a different value in one of the two places + * has a bug. */ val instanceId: String, /**