企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
![sub-execution元素](https://gitee.com/mianshenglee/datastorage/raw/master/md-photo/deploy-tool/sub-execution%E5%85%83%E7%B4%A0.jpg) `sub-execution`元素用于对当前execution的分解,若此操作可分解为多个子操作,可在这里进行设置。`sub-execution`元素下可有>=1个`execution`元素。`execution`元素的定义与前面介绍的`execution`元素一致。 部署工具会对子操作自动添加序号,规则与`execution`的序号一致。如假设当前`execution`是2.1,`sub-execution`在中的有2个`execution`,则它们的序号分别是2.1.1及2.1.2。在交互界面中,当用户选择2.1.1时,即会执行对应的子操作。 一般有子操作时,会把当前`execution`元素设置为`OperRunDependency`操作类型,然后使用`dependencies`元素,把此操作依赖它的`sub-execution`,这样,即可在用户选择2.1时,自动执行2.1.1和2.1.2。如下面示例,安装消息服务,就是"安装Erlang与RabbitMQ"和"安装MsgService",因此把`installMessageService`设置为`OperRunDependency`,然后依赖这两个操作: ```xml <execution name="安装消息服务" id="installMessageService" display="true" class-name="deploy.OperRunDependency"> <dependencies> <dependency ref-id="installErlangAndRabbitMQ"> <result skip="true" /> </dependency> <dependency ref-id="installMsgService"/> </dependencies> <sub-execution> <execution name="安装Erlang与RabbitMQ" id="installErlangAndRabbitMQ" display="true" class-name="deploy.OperRunCommand"> <configuration> <commands> <command> <exec><![CDATA[scripts/windows/test/message/install_message_erlang_mq.bat]]></exec> </command> </commands> </configuration> </execution> <execution name="安装MsgService" id="installMsgService" display="true" class-name="deploy.OperRunCommand"> <configuration> <commands> <command> <exec><![CDATA[scripts/windows/test/message/install_msg_service.bat]]></exec> <args> <arg><![CDATA[$${server_msg_tcp_port}]]></arg> </args> </command> </commands> </configuration> <dependencies> <dependency ref-id="updateConfigFiles"/> </dependencies> </execution> <sub-execution> </execution> ``` [14]: http://ww2.sinaimg.cn/large/72d660a7gw1fbn6x1paruj20c806074a.jpg