Hi,

I been testing wait/notify pattern specially on a process one-by-one
pattern (an http rest API can only process 2nd request only after previous
completed).

1. i managed to have it work using technique i found here
https://community.cloudera.com/t5/Community-Articles/Trigger-based-Serial-Data-processing-in-NiFi-using-Wait-and/ta-p/248308
Basically it tags each ff via statefull UpdateAttribute and then creates a
distributedcache key "Release Signal Identifier" with this token (1, 2, ..)
and works fine. Wait removes key after consuming/releasing it.
2. but i was unable to understand - i guess - how to implement it uding
tooltip suggestion of special values zero(0) or one(1) on both
wait.Releasable FlowFile Count and notify.xxxxx which seems suggestion its
possible to implement exactly what i want (a flip-flop gate,. where some
processing happens serial way one at a time.. but i wasn't able to have
this work. It seems both wait/notify Release Signal Identifier would/can be
a static value (doesn't matter) as the magic values of zero(close gate) or
one(open gate) would be enough... but wasn't able to have this work. Any
suggestion please how to have a flip-flop or Singleton or serial processing
pattern using the magic values and just 1 Release Signal Identifier?

wait.Releasable FlowFile Count
"(..)Zero (0) has a special meaning, any number of FlowFiles can be
released as long as signal count matches target.(..)"

notify.Signal Counter Delta
"(..)Zero (0) has a special meaning, it clears target count back to 0,
which is especially useful when used with Wait Releasable FlowFile Count =
Zero (0) mode, to provide 'open-close-gate' type of flow control. One (1)
can open a corresponding Wait processor, and Zero (0) can negate it as if
closing a gate.(..)".

Ideally would be great if someone could share a minimalistic xml template
just demo this capacity suggested by both wait/notify processors
documentation.


Thanks,
Emanuel Oliveira

Reply via email to