Shark中的ToolAgent用法-JavaScriptToolAgent

2008-02-23 09:33:10来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

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的参数行中。

    上一篇: java.util.Map翻译
    下一篇: osworkflow descriptor 解析片断

    标签:

    版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
    特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

    上一篇:DIY有创意的网站错误信息

    下一篇:java.util.Map翻译