Shows how to post a dynamically built JSON using regex text replacement.
0158101f-6f14-1cd3-58bc-87f34a1b1e4a
POST with a Dynamic Body using ReplaceText
01581000-5b0d-16f0-0000-000000000000
0158101f-6f14-1cd3-0000-000000000000
1 GB
10000
0158101f-6f14-1cd3-0000-000000000000
6f141cd3-103e-1158-0000-000000000000
PROCESSOR
0 sec
1
success
0158101f-6f14-1cd3-0000-000000000000
6f141cd3-103f-1158-0000-000000000000
PROCESSOR
0
01581000-cb51-16ef-0000-000000000000
0158101f-6f14-1cd3-0000-000000000000
1 GB
10000
0158101f-6f14-1cd3-0000-000000000000
6f141cd3-103f-1158-0000-000000000000
PROCESSOR
0 sec
1
Response
0158101f-6f14-1cd3-0000-000000000000
6f141cd3-103b-1158-0000-000000000000
PROCESSOR
0
01581001-71d4-16f0-0000-000000000000
0158101f-6f14-1cd3-0000-000000000000
1 GB
10000
0158101f-6f14-1cd3-0000-000000000000
6f141cd3-1040-1158-0000-000000000000
PROCESSOR
0 sec
1
success
0158101f-6f14-1cd3-0000-000000000000
6f141cd3-103a-1158-0000-000000000000
PROCESSOR
0
01581002-71d4-16f0-0000-000000000000
0158101f-6f14-1cd3-0000-000000000000
1 GB
10000
0158101f-6f14-1cd3-0000-000000000000
6f141cd3-1040-1158-0000-000000000000
PROCESSOR
0 sec
1
loop.next
0158101f-6f14-1cd3-0000-000000000000
6f141cd3-103e-1158-0000-000000000000
PROCESSOR
0
01581004-71d4-16f0-0000-000000000000
0158101f-6f14-1cd3-0000-000000000000
1 GB
10000
0158101f-6f14-1cd3-0000-000000000000
01581003-71d4-16f0-0000-000000000000
PROCESSOR
0 sec
1
success
0158101f-6f14-1cd3-0000-000000000000
6f141cd3-1040-1158-0000-000000000000
PROCESSOR
0
01581005-71d4-16f0-0000-000000000000
0158101f-6f14-1cd3-0000-000000000000
1 GB
10000
0158101f-6f14-1cd3-0000-000000000000
6f141cd3-103b-1158-0000-000000000000
PROCESSOR
0 sec
1
success
0158101f-6f14-1cd3-0000-000000000000
01581003-71d4-16f0-0000-000000000000
PROCESSOR
0
6f141cd3-1043-1158-0000-000000000000
0158101f-6f14-1cd3-0000-000000000000
1 GB
10000
0158101f-6f14-1cd3-0000-000000000000
6f141cd3-103a-1158-0000-000000000000
PROCESSOR
0 sec
1
success
0158101f-6f14-1cd3-0000-000000000000
6f141cd3-1039-1158-0000-000000000000
PROCESSOR
0
01581003-71d4-16f0-0000-000000000000
0158101f-6f14-1cd3-0000-000000000000
1175.0397558593745
423.3600244140621
WARN
1
Regular Expression
Regular Expression
Replacement Value
Replacement Value
Character Set
Character Set
Maximum Buffer Size
Maximum Buffer Size
Replacement Strategy
Replacement Strategy
Evaluation Mode
Evaluation Mode
false
30 sec
Regular Expression
USERID_PLACEHOLDER
Replacement Value
${counter:plus(1)}
Character Set
UTF-8
Maximum Buffer Size
1 MB
Replacement Strategy
Regex Replace
Evaluation Mode
Entire text
0
0 sec
TIMER_DRIVEN
1 sec
ReplaceText
true
failure
false
success
org.apache.nifi.processors.standard.ReplaceText
6f141cd3-1039-1158-0000-000000000000
0158101f-6f14-1cd3-0000-000000000000
588.4300852816436
0.0
WARN
1
File Size
File Size
Batch Size
Batch Size
Data Format
Data Format
Unique FlowFiles
Unique FlowFiles
false
30 sec
File Size
1b
Batch Size
1
Data Format
Binary
Unique FlowFiles
false
0
60 sec
TIMER_DRIVEN
1 sec
Trigger the flow
false
success
org.apache.nifi.processors.standard.GenerateFlowFile
6f141cd3-103a-1158-0000-000000000000
0158101f-6f14-1cd3-0000-000000000000
589.8495605468747
221.64000361119383
WARN
1
Delete Attributes Expression
Delete Attributes Expression
body
body
counter
counter
title
title
userId
userId
false
30 sec
Delete Attributes Expression
body
bar
counter
0
title
foo
userId
USERID_PLACEHOLDER
0
0 sec
TIMER_DRIVEN
1 sec
Initialise a counter and req params
false
success
org.apache.nifi.processors.attributes.UpdateAttribute
6f141cd3-103b-1158-0000-000000000000
0158101f-6f14-1cd3-0000-000000000000
602.0533081054687
742.5029288034634
WARN
1
HTTP Method
HTTP Method
Remote URL
Remote URL
SSL Context Service
org.apache.nifi.ssl.SSLContextService
SSL Context Service
Connection Timeout
Connection Timeout
Read Timeout
Read Timeout
Include Date Header
Include Date Header
Follow Redirects
Follow Redirects
Attributes to Send
Attributes to Send
Basic Authentication Username
Basic Authentication Username
Basic Authentication Password
Basic Authentication Password
Proxy Host
Proxy Host
Proxy Port
Proxy Port
invokehttp-proxy-user
invokehttp-proxy-user
invokehttp-proxy-password
invokehttp-proxy-password
Put Response Body In Attribute
Put Response Body In Attribute
Max Length To Put In Attribute
Max Length To Put In Attribute
Digest Authentication
Digest Authentication
Always Output Response
Always Output Response
Trusted Hostname
Trusted Hostname
Add Response Headers to Request
Add Response Headers to Request
Content-Type
Content-Type
send-message-body
send-message-body
Use Chunked Encoding
Use Chunked Encoding
Penalize on "No Retry"
Penalize on "No Retry"
false
30 sec
HTTP Method
POST
Remote URL
http://jsonplaceholder.typicode.com/posts
SSL Context Service
Connection Timeout
5 secs
Read Timeout
15 secs
Include Date Header
True
Follow Redirects
True
Attributes to Send
Basic Authentication Username
Basic Authentication Password
Proxy Host
Proxy Port
invokehttp-proxy-user
invokehttp-proxy-password
Put Response Body In Attribute
Max Length To Put In Attribute
256
Digest Authentication
false
Always Output Response
false
Trusted Hostname
Add Response Headers to Request
false
Content-Type
${mime.type}
send-message-body
true
Use Chunked Encoding
false
Penalize on "No Retry"
false
0
0 sec
TIMER_DRIVEN
1 sec
Make a new post
true
Failure
true
No Retry
true
Original
false
Response
true
Retry
org.apache.nifi.processors.standard.InvokeHTTP
6f141cd3-103e-1158-0000-000000000000
0158101f-6f14-1cd3-0000-000000000000
1.1943298339845114
435.56684504185773
WARN
1
Routing Strategy
Routing Strategy
loop.next
loop.next
false
30 sec
Routing Strategy
Route to Property name
loop.next
${counter:lt(5)}
0
0 sec
TIMER_DRIVEN
1 sec
Iterate
false
loop.next
true
unmatched
org.apache.nifi.processors.standard.RouteOnAttribute
6f141cd3-103f-1158-0000-000000000000
0158101f-6f14-1cd3-0000-000000000000
0.0
736.7815636697874
WARN
1
Delete Attributes Expression
Delete Attributes Expression
counter
counter
false
30 sec
Delete Attributes Expression
counter
${counter:plus(1)}
0
0 sec
TIMER_DRIVEN
1 sec
Increment the counter
false
success
org.apache.nifi.processors.attributes.UpdateAttribute
6f141cd3-1040-1158-0000-000000000000
0158101f-6f14-1cd3-0000-000000000000
596.2406192377425
435.7693377989481
WARN
1
Attributes List
Attributes List
Destination
Destination
Include Core Attributes
Include Core Attributes
Null Value
Null Value
false
30 sec
Attributes List
title,body,userId
Destination
flowfile-content
Include Core Attributes
true
Null Value
false
0
0 sec
TIMER_DRIVEN
1 sec
Turn request parameters into JSON
true
failure
false
success
org.apache.nifi.processors.standard.AttributesToJSON
10/30/2016 19:27:22 GMT