[
https://issues.apache.org/jira/browse/NIFI-3688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16234961#comment-16234961
]
ASF GitHub Bot commented on NIFI-3688:
--------------------------------------
Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/1662#discussion_r148412300
--- Diff:
nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-processors/src/main/resources/docs/org.apache.nifi.processors.groovyx.ExecuteGroovyScript/additionalDetails.html
---
@@ -0,0 +1,202 @@
+<!DOCTYPE html>
+<html lang="en">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<head>
+ <meta charset="utf-8" />
+ <title>Groovy</title>
+ <!--link rel="stylesheet" href="../../css/component-usage.css"
type="text/css" /-->
+ <link rel="stylesheet" href="/nifi-docs/css/component-usage.css"
type="text/css" />
+</head>
+
+<body>
+<h2>Summary</h2>
+<p>This is a grooviest groovy script :)</p>
+<h2>Script Bindings:</h2>
+<table>
+<tr><th>variable</th><th>type</th><th>description</th></tr>
+<tr>
+ <td>session</td>
+ <td>org.apache.nifi.processor.ProcessSession</td>
+ <td>the session that is used to get, change, and transfer input
files</td>
+</tr>
+<tr>
+ <td>context</td>
+ <td>org.apache.nifi.processor.ProcessContext</td>
+ <td>the context (almost unusefull)</td>
+</tr>
+<tr>
+ <td>log</td>
+ <td>org.apache.nifi.logging.ComponentLog</td>
+ <td>the logger for this processor instance</td>
+</tr>
+<tr>
+ <td>REL_SUCCESS</td>
+ <td>org.apache.nifi.processor.Relationship</td>
+ <td>the success relationship</td>
+</tr>
+<tr>
+ <td>REL_FAILURE</td>
+ <td>org.apache.nifi.processor.Relationship</td>
+ <td>the failure relationship</td>
+</tr>
+<tr>
+ <td>flowFile</td>
+ <td>org.apache.nifi.flowfile.FlowFile</td>
+ <td>Binded only if the property `Require flow file`=true for the
processor</td>
+</tr>
+<tr>
+ <td>CTL</td>
+ <td>java.util.HashMap</td>
+ <td>Map populated with controller services binded through `CTL.*`
processor properties</td>
+</tr>
+<tr>
+ <td>Dynamic processor properties</td>
+ <td>org.apache.nifi.components.PropertyDescriptor</td>
+ <td>All processor properties not started with `CTL.` are binded to
script variables</td>
+</tr>
+</table>
+
+<h2>CTL map</h2>
+<p>
+CTL.* objects accessible if corresponding processor property defined.<br/>
+<b>Example:</b> if you defined property <code>`CTL.cache`</code> to
DistributedMapCacheClientService, then you can access it from code
<code>CTL.cache</code><br/>
--- End diff --
Can you explain (at least to me here) more about linking with CTL? Does the
name of the service have to be "cache" in this case? Or does there need to be a
user-defined property called "CTL.cache" added to the service? If the latter,
what if the service itself uses the user-defined properties? Seems like there
might be conflict in processing?
> Create extended groovy scripting processor
> ------------------------------------------
>
> Key: NIFI-3688
> URL: https://issues.apache.org/jira/browse/NIFI-3688
> Project: Apache NiFi
> Issue Type: New Feature
> Components: Extensions
> Reporter: Dmitry Lukyanov
> Priority: Minor
>
> The idea is to simplify groovy scripting.
> Main targets:
> - to be compatible with existing groovy scripting
> - simplify read/write attributes
> - simplify read/write content
> - avoid closure casting to nifi types like `StreamCallback`
> - simplify and provide visibility when accessing to controller services from
> script
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)