What is the use of Context Propagator and how to implement it ? using java SDK.
We don’t have a sample for the ContextPropagator. Here is a test implementation of one.
Is there a way for the workflow method to get the context object? The test leverages slfj4.MDC but I’m concerned about making some values available to logging as well as cleaning up the threadpool storage.
Use WorkflowThreadLocal or WorkflowLocal to pass values to workflows from the context propagator.
Hi Maxim,
this thread is old, nevertheless I have a question related to this specific test.
In this test MDC is used to pass a value with key “test” to the workflow using contxt propagators.
Let’s say instead that we have the same contxt propagator, but we want to set the value of the key “test” within the workflow.
Can we expect to have the value set on the client side (i.e. retrieving it with MDC.get)?
If not, there is any other way to “propagate” key/values pairs from a workflow (or activity) back to the client?
Currently, the workflow and activity results don’t support header fields used to propagate context information. Please file an issue to get them added.