diff --git a/api/src/main/kotlin/dev/bpmcrafters/processengineapi/CommonRestrictions.kt b/api/src/main/kotlin/dev/bpmcrafters/processengineapi/CommonRestrictions.kt index 2043f35..11c1d05 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 eb0ee5f..fa7c749 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, /**