Closed casejohnsondeloitte closed 2 years ago
Just kidding, this is my own misuse of the library :) Did not notice that nipyapi.canvas.update_processor()
returns a new instance of the processor.
actually ideally it would helpfully inform you that you are not working with the latest revision of the processor config, that would be a small but useful improvement.
Description
nipyapi.canvas.create_connection()
fails to create a connection from the RouteOnAttribute processor for a dynamic relationship name.What I Did
In the NiFi UI, I've created and connected a HandleHttpRequest processor, a RouteOnAttribute processor, and a LogAttribute processor. I am adding a custom property to RouteOnAttribute using
nipyapi.canvas.update_processor()
:This creates a new connectable relationship on the processor:
When calling
nipyapi.canvas.create_connection()
withrelationships=['/sample']
, I am unable to create the connection for this dynamic name with the following error:Urgency
We are not in production today, but building a product for production in the range of 2-3 months.
Workaround
If the processor is retrieved from the canvas again after updating its properties, the newly retrieved object will have the correct relationships. In other words: