Shark中的ToolAgent用法-JavaScriptToolAgent

Shark文档介绍了JavaScript工具的两种用法。当application mode设为0时,javascript代码以.js文件形式保存于指定路径的jar包中,AppName须与文件名一致;当设为1时,直接将代码写在AppName参数行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Shark的文档中叙述如下:

  • JavaScriptToolAgent - Executes java script. If you set application mode to 0 (zero), tool agent will search for a java script file given as applicationName parameter (this file has to be in the class path), and if it founds it, it will try to execute it. Otherwise, it will consider applicationName parameter to be the script itself, and will try to execute it. So far, we defined few java script files that execute simple arithmetic operations, generation of random number, and one that performs waiting.

    This tool agent is able to "understand" the extended attributes with the following names:

    • AppName - value of this attribute should represent the name of script file to execute (this file has to be in class path)

    • Script - the value of this represents the script to be executed. I.e. this extended attribute in XPDL can be defined as follows:

      <ExtendedAttribute Name="Script" Value="c=a-b;"/>

      (a, b and c in above text are Formal parameter Ids from XPDL Application definition)

  • JavaScript工具有两种用法:

    1、当application mode设为0时,javascript代码以文件的形式给出。文件需以.js形式保存并放在:安装路径/C:/Shark-1.0/lib/engine/sharktoolagent-standard.jar中。假设文件名javascript.js,给出的AppName必须为javascript。

    2、当application mode设为1时,直接将要执行的代码写在AppName的参数行中。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值