sdk-php icon indicating copy to clipboard operation
sdk-php copied to clipboard

Expose UpdateID in an update handler

Open drewhoskins-temporal opened this issue 1 year ago • 3 comments

This will allow users to use it when they want a unique idempotent primary key for handlers.

drewhoskins-temporal avatar Jun 04 '24 16:06 drewhoskins-temporal

Looks like we already have it https://github.com/temporalio/sdk-php/blob/cc879864a3fe0cf023d941b99f7c5e31f4c82ff7/src/Client/Update/UpdateHandle.php#L45-L48

roxblnfk avatar Jun 20 '24 15:06 roxblnfk

I think that is for the client. This is for access inside the handler inside the workflow. Go is using context for this, other languages are using "async local" or similar. Unsure the best approach in PHP for providing contextual state to a handler (and things it may start) without affecting anything outside the handler.

cretz avatar Jun 20 '24 20:06 cretz

This is for access inside the handler inside the workflow

Got it. Thanks.

roxblnfk avatar Jun 20 '24 20:06 roxblnfk