Timer Driven/onTrigger (I think) will only fire when an incoming FlowFile is received, thus triggering the processor to execute.
But you mention not having any connections (presumably incoming or outgoing), so I guess that's not what you're after? You could try a Scheduling Strategy of "Cron" and set that to a relatively low interval I guess? Don't know whether it will work though, I'm not sure processors were designed to be used in quite this way. Might be worth your explaining your use case a bit more so the community can understand and suggest possible solutions/alternatives. --- *Chris Sampson* IT Consultant [email protected] <https://www.naimuri.com/> On Fri, 8 Jan 2021 at 15:34, Russell Bateman <[email protected]> wrote: > The code I really want to run is sitting in onTrigger(), though I could > move it elsewhere. > > Yes, I have tried > > *Scheduling Strategy*of Timer driven > *Run Schedule*of 10 sec > > ...but the getLogger().info( "called from onTrigger()" )never reaches > /logs/nifi-app.log/ (while the logging statement from > onPropertyModified()does reach the log every time I change properties to > remove old or introduce new properties). > > > On 1/7/21 6:38 PM, Russell Bateman wrote: > > (Inadequate title; didn't know what to call it.) > > > > I have written a processor that doesn't feature any relationships. > > > > It accepts dynamically properties that, in theory, when created (or > > removed, or values added or changed), and sets data into a class > > inside my NAR. > > > > I wonder, however, at what I expect of it because, while it works in > > unit testing, it does not in practice. I can sort of guess why, but > > I'm not sure what to do about it. Given that I can create methods to > > be called at various opportunities by annotating thus: > > > > @OnAdded > > @OnEnabled > > @OnRemoved > > @OnScheduled > > @OnUnscheduled > > @OnStopped > > @OnShutdown > > > > There isn't one of these annotations that says to my brain, "When a > > dynamic property is added, changed or removed, wake up and run this > > method." Except, of course, for onPropertyModified(). A new property > > is duly added when created in configuration; my call to > > getLogger.info()from onPropertyModified()shows > > > > 2021-01-07 18:32:51,923 INFO [NiFi Web Server-78] > > c.windofkeltia.processor.HumanReadables > > HumanReadables[id=afa5b637-0176-1000-78bd-a74904054649] null -> > > |http://hospital.smarthealthit.org|Smart Health IT > > > > But, how do I incite some code after the fact to awaken and analyze > > the newly added configuration then affect the > > HumanReadableMappingsclass instance? > > > > (Hope I haven't explained this too badly. I am willing to attach > > code--it's a very tiny processor.) > > > > Thanks > > > > > > > >
