Alessio

I might not quite follow all of the question but I'll try to respond
to what I believe you're asking.

First, it is important to note that whether a human is looking at the
UI or a system/script/process is interacting with the REST API of NiFi
in the end the effect is the same.  It is all happening through the
REST API.

Presently we offer the following scheduling styles available within
the framework
- timer based
- cron based
- event based

Whether a processor/component is given a thread to use at any given
time depends on whether one of those above triggers fire AND whether
or not back pressure prevents it from getting a thread or whether it
depends on there being work (data) in an inbound queue first or
whether that processor/component is presently in a yield/hold pattern
for some period of time.  That is all predicated on whether some thing
(user through UI or some service/process invoking the REST API) has
told the nifi framework that a given component may be scheduled to
execute.

So how best to inject your desire to have an external system dictate
whether a component or set of components (your notion of a workflow)
depends on how you feel the above best reflects your case.  You can
control whether processors/components are scheduled to run (not
whether they actually get triggered) by using our REST API
exclusively.  Or, you might feel that you want to add a new triggering
style such as 'external service'.  That would require framework level
code changes in an area that is not really designed for extension most
likely.  So that might be a lot harder.  So, in that sense I'd
probably recommend more evaluation and research going into leveraging
that first approach I mention to see if that meets your needs.

Thanks
Joe

On Mon, Jan 23, 2017 at 10:59 AM, Alessio Palma
<[email protected]> wrote:
> Hello all,
>
> before starting diving into the code I have a little question:
>
> It's possible to write a service connected to processor which can be used to 
> start workflows ?
> Scenario is this:
> Currently we can start workflows using a schedule strategy, I like to move 
> this logic into a service which broadcast to registered processors the names 
> of the workflows which are supposed to start in the current time frame.
> So the basic idea is to have these custom processor which keep polling the 
> service asking the permission to start.
>
> Is there a better option which does not requires polling?
>
> If I read it carefully the  REST API can do the work, but it cuts all the 
> advantages of the graphical environment. So this is not an option.
>
>
> AP

Reply via email to