When a function is run, we'd like to report back to the front end which implementation was selected. Now that the metadata map is part of Z22, we have the mechanism for doing this. With orchestrator patch 838864, we have a designated metadata key for this purpose, implementationId, and we report on the persistent ID of the selected implementation if it's a BuiltIn. More work is needed to capture the persistent IDs of Evaluated and Composite implementations. It appears the information can be captured in executeInternal(), before resolving the list of available implementations.
Once the ID is captured, it can be passed directly to addImplementationMetadata(), or perhaps it could be inserted into a new public field of class Implementation, and addImplementationMetadata() could get it from there.
Note: there is no guarantee a persistent ID will be available in all cases, but we want to capture it if it is there.
See the TODO for this ticket in execute.js.