gabriel-farache commented on code in PR #4094:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/4094#discussion_r2589298536
##########
jbpm/jbpm-flow/src/main/java/org/kie/kogito/process/impl/AbstractProcessInstance.java:
##########
@@ -225,9 +226,35 @@ protected void reconnect() {
}
getProcessRuntime().getProcessInstanceManager().setLock(((MutableProcessInstances<T>)
process.instances()).lock());
processInstance.setMetaData(KOGITO_PROCESS_INSTANCE, this);
+
+ restoreProcessInstanceContext();
+
processInstance.reconnect();
}
+ private void restoreProcessInstanceContext() {
+ Map<String, List<String>> headers = processInstance.getHeaders();
+ if (headers != null && !headers.isEmpty()) {
+ Map<String, String> contextMap =
convertHeadersToContextMap(headers);
+ if (!contextMap.isEmpty()) {
+
org.kie.kogito.services.context.ProcessInstanceContext.setContextFromAsync(contextMap);
Review Comment:
ok I ended up with something a bit more complex with merge but that should
be better
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]