Thanks Bryan. That helps. We were also thinking of exposing standard formatting functions as an API that other data flows can call and use.
Regards Anil On Tue, Mar 13, 2018 at 1:13 PM, Bryan Bende <bbe...@gmail.com> wrote: > Anil, > > It sounds like what you are interested in would be some combination of > the referenceable process groups  or worm-hole connections , > which were ideas that were discussed, but haven't been implemented. > > You might be able to make your situation slightly better by using the > NiFi Registry instead of templates... > > As an example, you could design a stand-alone process group for your > retry logic and place it under version control in the registry. Then > you import this flow from the registry into various points of your > overall flow. > > You could then go back to the original standalone process group and > make a change to the logic and save version 2 to the registry. At this > point all the other places you imported it to will show an upgrade and > you can change their version to v2 to bring in the change. > > It still requires manual upgrading of all the versioned process > groups, but at least they are all tied back to the same version, where > as templates are not linked to anything once they instantiated. > > -Bryan > >  https://cwiki.apache.org/confluence/display/NIFI/ > Reference-able+Process+Groups >  https://cwiki.apache.org/confluence/display/NIFI/Wormhole+Connections > > On Tue, Mar 13, 2018 at 10:48 AM, Anil Rai <anilrain...@gmail.com> wrote: > > Team, > > > > My question is around re-use. > > Templates : We are creating flows for different use cases. Most of them > have > > a requirement for retry. Say the API call fails, we would like to retry 3 > > time after certain interval before giving up. We have created a retry > > template that works perfect. > > Q: If I have to use this template, then i have to import this template in > > all the use case flows. If we have a change to this template, then i > would > > be forced to go to every flow that uses this template and make that > change. > > Date, String, Number formatting : I have seen couple of ways of doing > this > > formatting. Like in UpdateAttribute, Jolt transformation, ExecuteScript. > > Q: Like in Java, can we have this utility in one place that can be used > by > > all my flows at run time by passing the required Parameters? > > > > Thanks > > Anil > > > > >