<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Custom Nifi Controller properties do not appear in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Custom-Nifi-Controller-properties-do-not-appear/m-p/367976#M240013</link>
    <description>&lt;P&gt;Just for everyones information; There was nothing wrong with the code. It was simply that the docker image I used to run Nifi did not build properly and therefore my modifications weren't taken into account.&lt;/P&gt;</description>
    <pubDate>Fri, 07 Apr 2023 07:32:42 GMT</pubDate>
    <dc:creator>Fredi</dc:creator>
    <dc:date>2023-04-07T07:32:42Z</dc:date>
    <item>
      <title>Custom Nifi Controller properties do not appear</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Custom-Nifi-Controller-properties-do-not-appear/m-p/367669#M239964</link>
      <description>&lt;P&gt;Hello friends,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wrote a custom processor and now wanted to add a custom &lt;STRONG&gt;controller&lt;/STRONG&gt;. The problem is, that the properties I wrote for the controller do not appear when I create the service. I followed the structure of this controller: &lt;A href="https://github.com/Automna/NiFi/blob/master/nifi-rel-nifi-1.1.2/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/main/java/org/apache/nifi/dbcp/DBCPConnectionPool.java" target="_blank"&gt;https://github.com/Automna/NiFi/blob/master/nifi-rel-nifi-1.1.2/nifi-nar-bundles/nifi-standard-services/nifi-dbcp-service-bundle/nifi-dbcp-service/src/main/java/org/apache/nifi/dbcp/DBCPConnectionPool.java&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fredi_0-1680600586185.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37177iEEF9840C7455902C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fredi_0-1680600586185.png" alt="Fredi_0-1680600586185.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I did so far:&lt;/P&gt;&lt;LI-CODE lang="java"&gt;public class MyNewControllerService extends AbstractControllerService implements MyControllerService {

    public static final PropertyDescriptor USERNAME = new PropertyDescriptor.Builder()
            .name("Username")
            .expressionLanguageSupported(ExpressionLanguageScope.NONE)
            .displayName("Set username")
            .required(true)
            .defaultValue("User")
            .description("Username to login to graph service")
            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
            .build();

    public static final PropertyDescriptor PASSWORD = new PropertyDescriptor.Builder().
            name("Password")
            .expressionLanguageSupported(ExpressionLanguageScope.NONE)
            .displayName("Set password")
            .required(true)
            .defaultValue("password")
            .description("Password to login to graph service")
            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
            .build();

    public static final PropertyDescriptor URL = new PropertyDescriptor.Builder().
            name("ApiUrl")
            .expressionLanguageSupported(ExpressionLanguageScope.NONE)
            .displayName("Set url")
            .required(true)
            .defaultValue("url")
            .description("Full url to api")
            .addValidator(StandardValidators.NON_EMPTY_VALIDATOR)
            .build();

    private static final List&amp;lt;PropertyDescriptor&amp;gt; properties;
    static {
        final List&amp;lt;PropertyDescriptor&amp;gt; props = new ArrayList&amp;lt;&amp;gt;();
        props.add(USERNAME);
        props.add(PASSWORD);
        props.add(URL);

        properties = Collections.unmodifiableList(props);
    }

    OkHttpClient client = new OkHttpClient();
    private static ObjectMapper mapper = new ObjectMapper();

    @Override
    protected List&amp;lt;PropertyDescriptor&amp;gt; getSupportedPropertyDescriptors() {
        return properties;
    }

    @OnEnabled
    public void onConfigured(final ConfigurationContext context) throws InitializationException {
        final String user = context.getProperty(USERNAME).getValue();
        final String password = context.getProperty(PASSWORD).getValue();
        final String url = context.getProperty(URL).getValue();&lt;/LI-CODE&gt;&lt;P&gt;What is missing that I only get a blank properties page?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 09:35:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Custom-Nifi-Controller-properties-do-not-appear/m-p/367669#M239964</guid>
      <dc:creator>Fredi</dc:creator>
      <dc:date>2023-04-04T09:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Nifi Controller properties do not appear</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Custom-Nifi-Controller-properties-do-not-appear/m-p/367976#M240013</link>
      <description>&lt;P&gt;Just for everyones information; There was nothing wrong with the code. It was simply that the docker image I used to run Nifi did not build properly and therefore my modifications weren't taken into account.&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 07:32:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Custom-Nifi-Controller-properties-do-not-appear/m-p/367976#M240013</guid>
      <dc:creator>Fredi</dc:creator>
      <dc:date>2023-04-07T07:32:42Z</dc:date>
    </item>
  </channel>
</rss>

