^1742441422512
@
sname
GroovyAction
slabel
GroovyAction
sdescriptors
xworker.lang.MetaDescriptor3
sextends
xworker.lang.actions.Inout,xworker.lang.actions.Action
smany
true
seditCols
2
sinitialization
false
sgroup
_actions.code,xworker.groovy
smodifier
public
sinheritDescription
false
sicon
icons/file/groovy.gif
Sdescription
#$@text#$@
<p>使用Groovy脚本定义的动作。</p>

<p><strong>Script</strong></p>

<p>&nbsp;&nbsp;&nbsp; Groovy脚本编译后是groovy.lang.Script，运行的也是它，如果用Groovy编写的是普通的Java类，那么可以尝试用JavaAction来调用。</p>

<p><strong>变量管理</strong></p>

<p>&nbsp;&nbsp;&nbsp; 变量申明，Groovy脚本中自定义的变量都应该通过def 申明，未申明直接使用的变量会保存到变量上下文的全局变量栈中，可能会造成变量污染。</p>

<p>&nbsp;&nbsp;&nbsp; 可以直接使用变量上下文中的变量，需要自行管理变量上下文中的变量。变量上下文中的默认变量：</p>

<ul>
	<li><strong>actionContext: ActionContext</strong><br />
	变量上下文自身。<br />
	&nbsp;</li>
	<li><strong>world: World</strong><br />
	org.xmeta.World对象，事物模型的总容器。</li>
</ul>

<p><strong>Groovy脚本的编写方式</strong></p>

<ul>
	<li><strong>使用外部Groovy</strong><br />
	在XWorker之外编写和编译的Groovy脚本。</li>
	<li><strong>使用内部Groovy</strong><br />
	在当前事物的事物管理器编写的*.groovy脚本文件。</li>
	<li><strong>代码</strong><br />
	直接写在动作中的Groovy脚本。</li>
</ul>
#$@text#$@
snotXmlAttribute
false
sjson_isArray
false
sjson_array_type
children
sjson_attribute
false
sth_createIndex
false
sth_registThing
child|xworker.lang.actions.Actions
sth_registMyChilds
false
sth_registDisabled
false
sth_noThingRegistViewer
false
sth_fileMonitor
false
sth_deprecated
false
Sen_description
#$@text#$@
<p>Use the actions defined by Groovy scripts. </p>

<p><strong>Script</strong></p>

<p>&nbsp;&nbsp;&nbsp; Groovy script is compiled into groovy.lang.Script, and it is also running. If you write ordinary Java classes in Groovy, you can try to call it with JavaAction. </p>

<p><strong>Variable Management</strong></p>

<p>&nbsp;&nbsp;&nbsp; Variable declaration, custom variables in Groovy scripts should be declared through def. Variables used directly without declaration will be stored in the global variable stack of the variable context, which may cause variable pollution. </p>

<p>&nbsp;&nbsp;&nbsp; You can directly use the variables in the variable context, and you need to manage the variables in the variable context yourself. Default variable in variable context:</p>

<ul>
<li><strong>actionContext: ActionContext</strong><br />
The variable context itself. <br />
&nbsp;</li>
<li><strong>world: World</strong><br />
The org.xmeta.World object, the general container of the thing model. </li>
</ul>

<p><strong>How to write Groovy scripts</strong></p>

<ul>
<li><strong>Use external Groovy</strong><br />
Groovy scripts written and compiled outside of XWorker. </li>
<li><strong>Use internal Groovy</strong><br />
*.Groovy script file written in the transaction manager of the current transaction. </li>
<li><strong>Code</strong><br />
Groovy script written directly in the action. </li>
</ul>
#$@text#$@
sth_mark
false
sth_registQueryOnlySelf
false
sgroupDescriptor
false
  @/@actions
  sname
  actions
  slabel
  actions
  sdescriptors
  xworker.lang.MetaDescriptor3/@actions
  sid
  actions
    @/@actions/@run
    sname
    run
    slabel
    run
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    souterClassName
    xworker.groovy.GroovyAction
    sclassName
    GroovyAction
    smethodName
    run
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sid
    run
    @/@actions/@getActionClass
    sname
    getActionClass
    sisSynchronized
    false
    sthrowException
    false
    suseOtherAction
    false
    suseOuterJava
    false
    sclassName
    GetActionClass
    smethodName
    run
    sdisableGlobalContext
    false
    Scode
#$@text#$@
/*
 * Copyright 2007-2008 The XWorker.org.
 * 
 * Licensed to the XWorker under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The XWorker 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.
 */

import groovy.lang.Binding;
import groovy.lang.Script;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;

import org.codehaus.groovy.control.CompilerConfiguration;
import org.codehaus.groovy.control.MultipleCompilationErrorsException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xmeta.Action;
import org.xmeta.ActionContext;
import org.xmeta.Bindings;
import org.xmeta.Thing;
import org.xmeta.World;

public class GetActionClass {
	private static Logger log = LoggerFactory.getLogger(GetActionClass.class);	
	
	public static Object run(ActionContext context) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException{				
		Thing actionThing = (Thing) context.get("actionThing");
		if(actionThing == null){
		    return null;
		}
		
		World world = World.getInstance();
		Action action = actionThing.getAction();		
		if(action.actionClass == null || action.changed){
			//查看代码是否需要重新编译			
			boolean recompile = false;
			if(action.changed){
				recompile = true;
			}
			if(action.actionClass == null){
				File classFile = new File(action.classFileName);
				if(!classFile.exists()){
					recompile = true;
				}
			}
			
			if(recompile){
				//重新编译并装载脚本
				org.codehaus.groovy.tools.Compiler compiler;
				Properties prop = new Properties();
				prop.setProperty("groovy.target.directory", world.getPath()
						+ "/actionClasses");
				prop.setProperty("groovy.classpath", action.getCompileClassPath());
				CompilerConfiguration config = new CompilerConfiguration(prop);
				//System.out.println(config.getClasspath());
				compiler = new org.codehaus.groovy.tools.Compiler(config);
				
				//更新代码
				File codeFile = new File(action.fileName + ".groovy");
				if(!codeFile.exists()){
					codeFile.getParentFile().mkdirs();
				}
				
				FileOutputStream fout = new FileOutputStream(codeFile);
				try{					
					fout.write(("/*path:" + action.getThing().getMetadata().getPath() + "*/\n").getBytes());
					fout.write(("package " + action.packageName + ";\n\n").getBytes());
					fout.write(action.code.getBytes());
					
				}finally{
					fout.close();
				}
				
				//int dotIndex = action.className.lastIndexOf(".");			
				//String compileClassName = action.className.substring(dotIndex + 1, action.className.length());
				//compiler.compile(file);
				try{
					compiler.compile(codeFile);
					//log.info("compile groovy " + action.getThing().getMetadata().getPath());
					action.updateCompileTime();					
				}catch(MultipleCompilationErrorsException me){
					log.error("compile groovy code : " + action.getThing().getMetadata().getPath());
					throw me;
				}
			}
			action.changed = false;
		}
		
		if(action.actionClass == null){
			action.actionClass = action.classLoader.loadClass(action.className);	
			java.lang.Compiler.compileClass(action.actionClass);
		}

		return action.actionClass;
	}
}
#$@text#$@
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sid
    getActionClass
    @/@actions/@ai_getPromptFormat
    sname
    ai_getPromptFormat
    stype
    string
    Svalue
#$@text#$@
## 输出要求
不要解释。只输出Groovy代码，保持代码为连续文本，输出全部Groovy代码，不要用任何 Markdown 格式包裹。例如：

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}
#$@text#$@
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@ValueFactory
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sid
    ai_getPromptFormat
    @/@actions/@ai_getPromptSystem
    sname
    ai_getPromptSystem
    stype
    string
    Svalue
#$@text#$@
# Groovy脚本程序员智能助手提示词

## **定位**
专精Groovy脚本编程的AI助手，提供代码编写、优化、调试支持及最佳实践指导。

## **核心能力**
1. **代码编写**
   - 快速生成/补全Groovy脚本、类、闭包、DSL实现
   - 兼容Java语法并展示Groovy语法糖特性
2. **调试支持**
   - 分析栈跟踪/异常信息
   - 提供代码逻辑修正方案
3. **性能优化**
   - 识别内存泄漏/低效代码模式
   - 推荐AST转换等高级优化方案
4. **技术集成**
   - Gradle/Grails/Jenkins集成方案
   - Java互操作指导
5. **文档解读**
   - 解析API文档/框架源码
   - 生成代码示例
6. **代码重构**
   - 实施元编程改造
   - 提升代码可维护性

## **知识储备**
- Groovy 1.5-4.0+版本特性
- GPars/Geb/Spock等生态框架
- Jenkins Pipeline/Gradle脚本规范
- JVM调试工具链
- 常见问题库：
  - 闭包委托策略
  - 动态方法调用
  - 编译配置问题
  - 类型转换陷阱

## **使用规范**
1. 提供完整上下文（框架版本/依赖关系）
2. 明确需求场景（自动化/测试/构建）
3. 分步沟通复杂需求
4. 使用代码块标记核心逻辑片段
5. 提供可直接运行的完整代码片段
6. 避免使用已弃用的API方法
7. 需要的类要使用import导入
8. 全局变量使用@Field注解，import groovy.transform.Field;
9. 使用java的样式初始化数组
#$@text#$@
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@ValueFactory
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sid
    ai_getPromptSystem
    @/@actions/@ai_onResult
    sname
    ai_onResult
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.groovy.GroovyAction
    smethodName
    ai_onResult
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sid
    ai_onResult
    @/@actions/@ai_getContent
    sname
    ai_getContent
    sattributeName
    code
    snotNull
    false
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.ActionUtil/@GetString
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sai_needGenerate
    false
    sai_promptContainsVars
    false
    sid
    ai_getContent
    @/@actions/@create
    sname
    create
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.groovy.GroovyAction
    smethodName
    run
    sdisableGlobalContext
    false
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Global
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sai_needGenerate
    false
    sai_promptContainsVars
    false
    sid
    create
    @/@actions/@ai_getChatService
    sname
    ai_getChatService
    schatServiceType
    coding
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sdescriptors
    xworker.ai.AIActions/@GetChatService
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sgroupDescriptor
    false
    sai_needGenerate
    false
    sai_promptContainsVars
    false
    sid
    ai_getChatService
  @/@name1
  sname
  name
  slabel
  名称
  sgroup
  Code
  sgroupIndex
  -100
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  Name
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  name1
  @/@label
  sname
  label
  slabel
  标签
  sgroup
  Code
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sen_label
  Label
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  label
  @/@isSynchronized1
  sname
  isSynchronized
  slabel
  是否同步
  sinputtype
  truefalse
  sgroup
  Action
  sreadOnly
  false
  sdefault
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  Synchronized
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  isSynchronized1
  @/@throwException1
  sname
  throwException
  slabel
  抛出异常
  sinputtype
  truefalse
  sgroup
  Action
  sreadOnly
  false
  sdefault
  true
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  ThrowException
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  throwException1
  @/@useOtherAction1
  sname
  useOtherAction
  slabel
  引用其他动作
  sinputtype
  truefalse
  sgroup
  Action
  sreadOnly
  false
  sdefault
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  UseOtherAction
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  useOtherAction1
  @/@otherActionPath1
  sname
  otherActionPath
  slabel
  引用动作路径
  sinputtype
  dataSelector
  ssize
  60
  scolspan
  2
  sgroup
  Action
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  OtherActionPath
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  otherActionPath1
  @/@varScope
  sname
  varScope
  sinputtype
  inputSelect
  ssize
  60
  scolspan
  2
  sgroup
  Action
  sreadOnly
  false
  sdefault
  Local
  sinheritDescription
  false
  Sdescription
#$@text#$@
<p>变量的输出范围。</p>
<p>脚本中可能含有一些脚本的全局变量，这些脚本的全局变量可以通过varScope参数设定输出到哪一个变量范围里，如果选择Local那么输出到当前的动作变量范围中，如果选择Global那么输出到全局变量范围里（ActionContext的底层变量范围），如果输入是动作路径，那么输出到相应动作的变量范围，如果是数字，那么输入到指定变量范围中，正数表示从0往上数，负数表示从顶部往下数。</p>
<p>Groovy脚本默认的变量输出范围是全局。</p>
#$@text#$@
  svalidateAllowBlank
  true
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  Sen_description
#$@text#$@
<p>The output range of the variable. </p>
<p>The script may contain some global variables of the script. The global variables of these scripts can be output to which variable range through the varScope parameter. If you select Local, then output to the current action variable range, if you select Global, then output In the global variable range (the underlying variable range of ActionContext), if the input is an action path, then output to the variable range of the corresponding action, if it is a number, then input to the specified variable range, a positive number means counting from 0, a negative number Means counting down from the top. </p>
<p>The default variable output scope of Groovy script is global. </p>
#$@text#$@
  sid
  varScope
    @/@varScope/@Local
    sname
    Local
    slabel
    Local
    svalue
    Local
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sid
    Local
    @/@varScope/@Global
    sname
    Global
    slabel
    Global
    svalue
    Global
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sid
    Global
  @/@disableGlobalContext
  sname
  disableGlobalContext
  slabel
  禁止全局上下文
  sinputtype
  truefalse
  sgroup
  Action
  sreadOnly
  false
  sdefault
  false
  sinheritDescription
  false
  sdescription
  <p>如果一个动作是全局上下文的动作，那么应该禁止，否则会造成递归的无限循环。</p>
  svalidateAllowBlank
  true
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  DisableGlobalContext
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sen_description
  <p>If an action is a global context action, it should be prohibited, otherwise it will cause an infinite recursive loop. </p>
  sth_mark
  false
  sid
  disableGlobalContext
  @/@outterClassName
  sname
  outterClassName
  slabel
  使用外部Groovy
  ssize
  60
  sgroup
  Other
  sshowLabel
  true
  sreadOnly
  false
  sinheritDescription
  false
  sdescription
  <p>如果不为空说明Groovy代码是在XWorker之外编写的，是已经编译成Java类的，有可能是编译后打包到jar中的，这里需要执行Groovy类的全名。</p>
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sen_label
  UseOuterGroovy
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sen_description
  <p>If it is not empty, it means that the Groovy code is written outside of XWorker and has been compiled into a Java class. It may be packaged into a jar after compilation. Here you need to execute the full name of the Groovy class. </p>
  sth_mark
  false
  sid
  outterClassName
  @/@innerClassName
  sname
  innerClassName
  slabel
  使用内部Groovy
  ssize
  60
  sgroup
  Other
  sshowLabel
  true
  sreadOnly
  false
  sinheritDescription
  false
  Sdescription
#$@text#$@
<p>如果不为空表面Groovy代码是编写到当前事物的事物管理中的，说明Groovy代码并不是写到Groovy动作中。</p>

<p><strong>注意</strong></p>

<p>只有FileThingManager才能够把Groovy脚本以文件的形式放到事物管理器下，其他事物管理者都没有此功能。</p>
#$@text#$@
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sen_label
  UseInnerGroovy
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  Sen_description
#$@text#$@
<p>If it is not empty, it means that the Groovy code is written in the transaction management of the current thing, which means that the Groovy code is not written in the Groovy action. </p>

<p><strong>Attention</strong></p>

<p>Only FileThingManager can put Groovy scripts in the form of files under the thing manager, and no other thing managers have this function. </p>
#$@text#$@
  sth_mark
  false
  sid
  innerClassName
  @/@code1
  sname
  code
  slabel
  代码
  sinputtype
  codeEditor
  scolspan
  2
  sgroup
  Code
  sinputattrs
  codeName=groovy codeType=groovy wrap=false fillBoth=true cols=70 rows=10
  sshowLabel
  true
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  snotXmlAttribute
  false
  sen_label
  Code
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  code1
  @/@description
  sname
  description
  slabel
  描述
  sinputtype
  html
  scolspan
  2
  sgroup
  Description
  sgroupIndex
  -90
  sinputattrs
  Width='80';Height='50';ToolbarSet="SwtEdit"
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  false
  LallowDecimals
  false
  LallowNegative
  false
  sen_label
  Description
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  description
  @/@Variables
  sname
  Variables
  sdescriptors
  xworker.lang.MetaDescriptor3/@thing
  sextends
  xworker.lang.actions.Actions
  smany
  true
  seditCols
  2
  sinitialization
  false
  smodifier
  private
  sinheritDescription
  false
  Sdescription
#$@text#$@
<p>Variables下的子节点会当作动作分别执行，动作的执行结果作为变量放入到变量上下文中，其中变量名是动作的名字。</p>

<p>创建的变量范围仅限于GroovyAction的执行。</p>
#$@text#$@
  snotXmlAttribute
  false
  sjson_isArray
  false
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  Sen_description
#$@text#$@
<p>The child nodes under Variables will be executed separately as actions, and the execution result of the action will be put into the variable context as a variable, where the variable name is the name of the action. </p>

<p>The scope of the variables created is limited to the execution of GroovyAction. </p>
#$@text#$@
  sth_mark
  false
  sid
  Variables
    @/@Variables/@name
    sname
    name
    sshowLabel
    true
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    name
    @/@Variables/@label
    sname
    label
    sshowLabel
    true
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    label
    @/@Variables/@description
    sname
    description
    sinputtype
    html
    sshowLabel
    true
    sreadOnly
    false
    sinheritDescription
    false
    svalidateAllowBlank
    true
    LvalidateOnBlur
    true
    LallowDecimals
    true
    LallowNegative
    true
    snotXmlAttribute
    false
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    description
  @/@generate
  sname
  ai_needGenerate
  slabel
  生成
  sinputtype
  truefalse
  sgroup
  AI
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sreadOnly
  false
  sdefault
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sxmlJsonIncludeDefault
  false
  sen_label
  Generate
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_noThingRegistViewer
  false
  sth_fileMonitor
  false
  sth_deprecated
  false
  sth_mark
  false
  sth_registQueryOnlySelf
  false
  sjson_isArray
  false
  sgroupDescriptor
  false
  sid
  generate
  @/@ai_fullContent
  sname
  ai_rootThingXml
  slabel
  是否包含模型XML
  sinputtype
  truefalse
  sgroup
  AI
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sreadOnly
  false
  sdefault
  true
  sinheritDescription
  false
  sdescription
  <p>在编辑模型时，prompt是否包含整个模型的xml。</p>
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sxmlJsonIncludeDefault
  false
  sen_label
  RootThingXML
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_noThingRegistViewer
  false
  sth_fileMonitor
  false
  sth_deprecated
  false
  sth_mark
  false
  sth_registQueryOnlySelf
  false
  sjson_isArray
  false
  sgroupDescriptor
  false
  sai_needGenerate
  false
  sai_promptContainsVars
  false
  sid
  ai_fullContent
  @/@ai_promptRequirement
  sname
  ai_promptRequirement
  slabel
  需求
  sinputtype
  textarea
  sgroup
  AI
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sreadOnly
  false
  sinheritDescription
  false
  sdescription
  <p>这里一般是用户的需求，放在提示词的中间。</p>
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sen_label
  Requirement
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_noThingRegistViewer
  false
  sth_fileMonitor
  false
  sen_description
  <p>This is usually the user's needs, placed in the middle of the prompt word. </p>
  sth_mark
  false
  sth_registQueryOnlySelf
  false
  sjson_isArray
  false
  sgroupDescriptor
  false
  sid
  ai_promptRequirement
  @/@ai_promptContainsVars
  sname
  ai_promptContainsVars
  sinputtype
  hidden
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sreadOnly
  false
  sdefault
  true
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sxmlJsonIncludeDefault
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_noThingRegistViewer
  false
  sth_fileMonitor
  false
  sth_mark
  false
  sth_registQueryOnlySelf
  false
  sjson_isArray
  false
  sgroupDescriptor
  false
  sid
  ai_promptContainsVars
