Passing user data to custom graph stages when materializing a stream

Ok, now I finally understood the Attributes :slight_smile:

I found the withAttributes() method at RunnableGraph(). Didn’t see that before in any examples. I am now able to pass the Logger to the materialized workflow:

      MyLoggerAttribute loggerAttribute = new MyLoggerAttribute(_logger);

      List<CompletionStage<WorkflowResult>> futureList = runnableGraph.withAttributes(Attributes.apply(loggerAttribute)).run(ActorMaterializer.create(getContext()));

Thanks again for leading me on the right track!