Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7589F200D1A for ; Mon, 25 Sep 2017 01:46:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6E1D51609E8; Sun, 24 Sep 2017 23:46:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B2A4C1609E6 for ; Mon, 25 Sep 2017 01:46:09 +0200 (CEST) Received: (qmail 183 invoked by uid 500); 24 Sep 2017 23:46:08 -0000 Mailing-List: contact issues-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list issues@nifi.apache.org Received: (qmail 167 invoked by uid 99); 24 Sep 2017 23:46:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Sep 2017 23:46:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 545A51A5BA7 for ; Sun, 24 Sep 2017 23:46:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id nKJlrFbcuH9J for ; Sun, 24 Sep 2017 23:46:07 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id DFAD75F2AD for ; Sun, 24 Sep 2017 23:46:06 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 944EDE0AA3 for ; Sun, 24 Sep 2017 23:46:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id D7E9924215 for ; Sun, 24 Sep 2017 23:46:01 +0000 (UTC) Date: Sun, 24 Sep 2017 23:46:01 +0000 (UTC) From: "Joseph Percivall (JIRA)" To: issues@nifi.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (NIFI-4415) Processors should be explicit in what is evaluated for a property that supports Expression Language MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 24 Sep 2017 23:46:10 -0000 [ https://issues.apache.org/jira/browse/NIFI-4415?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joseph Percivall resolved NIFI-4415. ------------------------------------ Resolution: Duplicate Apparently, I've already raised this issue in the past and my search skills didn't quite make find it before creating this one. Closing this one in favor of the other since it is older. > Processors should be explicit in what is evaluated for a property that supports Expression Language > --------------------------------------------------------------------------------------------------- > > Key: NIFI-4415 > URL: https://issues.apache.org/jira/browse/NIFI-4415 > Project: Apache NiFi > Issue Type: Improvement > Reporter: Joseph Percivall > > Currently, when a processor evaluates an Expression Language (EL) expression, it can do so by providing multiple different inputs to the function[1]. Without looking at the code and not explicitly stated in the docs, the user does not know what is available for them to use. > The list of available options to pass to evaluate includes: > * A FlowFile > * An attribute value decorator > * Any state values > * Any additional attributes that may be processor specific > At worst, a user will attempt design a flow thinking a processor's EL supports passing values via attributes and coming to find that it doesn't allow access to the FlowFile through an obscure error. At "best", a user just doesn't know about a certain functionality. > One may ask why a processor wouldn't allow access to the values. At the most basic, the processor may just not make use of that feature (a processor not storing state). On the other end, a processor may not expose access to a FlowFile's attributes because the evaluation happens once per scheduling (when there isn't a FlowFile) or once per batch (eg. PutElasticsearchHttp's url[2]) > A developer should be able to state what will be evaluated in the same place that they originally indicate that a property supports EL. NiFi should then pass that information to the user of the processor via the documentation (in the same way it tells the user whether EL is supported or not). > [1] https://github.com/apache/nifi/blob/50ea1083ec416c5d6e70c4e7bb5b2abde8f6266c/nifi-api/src/main/java/org/apache/nifi/components/PropertyValue.java#L139 > [2] https://github.com/apache/nifi/blob/4e4d14f86ff21d2c7d20d9e180acee54a2ddf93b/nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchHttp.java#L225 -- This message was sent by Atlassian JIRA (v6.4.14#64029)