[ 
https://issues.apache.org/jira/browse/NIFI-190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14266405#comment-14266405
 ] 

Mark Payne commented on NIFI-190:
---------------------------------

I think the Processors could also support another nice option:

If the Notify processor allowed for user-defined properties, the name of the 
property would correspond to a FlowFile attribute name and the value of the 
Property would correspond to a FlowFile attribute value. Then, when the Hold 
processor releases the FlowFile, it would add these key/value pairs as FlowFile 
attributes.

So the idea is say you want to Hold FlowFile A while FlowFile B does an HTTP 
POST. And then Post returns an identifier of a newly created object for 
instance. Then in the Notify Processor, you add a Property named 
"object.identifier" and value "${object.identifier}". This would then trigger 
HoldFlowFile to release FlowFile A but would add the object.identifier 
attribute to FlowFile A. This way we can not only hold the FlowFile but then 
add information to the FlowFile, where that information came from some other 
process...

> HoldFile processor
> ------------------
>
>                 Key: NIFI-190
>                 URL: https://issues.apache.org/jira/browse/NIFI-190
>             Project: Apache NiFi
>          Issue Type: New Feature
>          Components: Core Framework, Extensions
>            Reporter: Joseph Gresock
>            Priority: Minor
>         Attachments: HoldFile_example.xml
>
>
> Our team has developed a processor for the following use case:
> * Format A needs to be sent to Endpoint A
> * Format B needs to be sent to Endpoint B, but should not proceed until A has 
> reached Endpoint A.  We most commonly have this restriction when Endpoint B 
> requires some output of Endpoint A.
> The proposed HoldFile processor takes 2 types of flow files as input:
> * Files to be held
> * Signal files that can release corresponding held files, based on the value 
> of a configurable "release" attribute
> Signal files are distinguished from held files by the presence of the 
> "flow.file.release.value" attribute.  The processor is configured with a 
> "Release Signal Attribute".  Held files with this attribute whose value 
> matches a received signal value will be released.
> An example:
> HoldFile is configured with Release Signal Attribute = "myId".  Its 'Hold' 
> relationship routes back onto itself.
> 1. flowFile 1 { myId : "123" } enters HoldFile.  It is routed to the 'Hold' 
> relationship
> 2. flowFile 2 { flow.file.release.value : "123" } enters HoldFile.  flowfile 
> 1 is then routed to 'Release', and flow file 2 is removed from the session.
> Signal flow files will also copy their attributes to matching held files, 
> unless otherwise indicated.  This is what allows the output of Endpoint A to 
> pass to Endpoint B, above.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to