壹佰网|ERP100 - 企业信息化知识门户

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2022|回复: 5

(已有思路)有没有办法通过命令行或者shell脚本来批量调用执行业务规则呢

[复制链接]
发表于 2010/1/4 20:25:33 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622  。

您需要 登录 才可以下载或查看,没有帐号?注册

x
有没有办法通过命令行或者shell脚本来批量调用执行业务规则呢
通过odi批量调用 计算脚本去执行是测试通过的,大家有没有知道,假设在windows服务器下面,或者linux服务器下面,有没有办法通过cmd或者linux服务器下面的shell脚本来批量调用执行呢?

  1. 用实用程序启动业务规则<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
  2. 使用 CalcMgrCmdLineLauncher.cmd 实用程序,管理员可以从“命令提示”启动用 Calculation Manager 创建的业务规则或规则集。
  3. 注意:
  4. ·         在启动业务规则或规则集前,使用 /Validate 选项检查命令语法。
  5. ·         不能用该实用程序启动交叉应用规则集。
  6. ·         如果启动的业务规则有运行时提示,请在运行 CalcMgrCmdLineLauncher.cmd 前创建一个包含运行时提示值的文件。您可以手动创建一个包含运行时提示值的 ASCII 文件,也可以通过在“运行时提示”页面上选择“创建运行时提示值文件”选项,自动生成值文件。
  7. ·         如果启动的规则集有运行时提示,则使用默认值,您不用指定一个运行时提示值文件。
  8. <?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" />  要用 CalcMgrCmdLineLauncher.cmd 启动一个业务规则或规则集:
  9. 1.     当启动一个有运行时提示的业务规则(不是规则集)时,通过下列任意一种方法生成一个包含运行时提示值的文件:
  10. ·         指定您在“运行时提示”页面上生成运行时提示值文件的名称(请参阅 Oracle Hyperion Planning User's Online Help)。
  11. ·         创建一个运行时提示 ASII 文件,该文件在不同行上包括了每个运行时提示的名称和值,这些名称和值用双冒号分开 (::)。例如:
  12. CopyDataFrom::Jan
  13. CopyDataTo::Apr
  14. 这个文件指定名为 CopyDataFrom 的运行时提示的值为 1 月,而名为 CopyDataTo 的运行时提示的值为 4 月。
  15. 将文件保存到 HYPERION_HOME/products/Planning/bin 目录下。您也可以在执行实用程序时指定运行时提示文件的完整路径。
  16. 2.     直接从 bin 目录在“命令提示”中输入该命令,然后输入一个空格,再输入参数,每个参数用一个空格分开:
  17. CalcMgrCmdLineLauncher.cmd [-f:passwordFile] /A:appname /U:username /D:database [/R:business rule name | /S:business ruleset name] /F:runtime prompts file [/validate]
  18. 如果您在默认目录安装了 Planning,则 CalcMgrCmdLineLauncher.cmd 安装在 HYPERION_HOME/products/Planning/bin 目录上。
  19. 表 52. CalcMgrCmdLineLauncher 参数




  20. 参数

  21. 用途

  22. 是否必需?



  23. [-f:passwordFile]

  24. 如果设置了加密的密码文件,便可以把该选项作为命令行的第一个参数连同所有在 passwordFile 中指定的整个文件路径和名称来运行实用程序。请参阅隐藏 Planning 实用程序中的密码提示。




  25. /A:appname

  26. 指定 Planning
  27. 从中启动了业务规则的应用程序




  28. /U:username

  29. 指定管理员的用户名称




  30. /D:database

  31. 指定为其启动了计算的规划类型名称




  32. [/R:business rule name |/S:business ruleset name]

  33. 指定要启动的业务规则和规则集名称

  34. 是。指定一个业务规则或一个规则集,但不能同时指定。


  35. /F:runtime prompts file

  36. 指定包含业务规则的运行时提示名称和值的文件的名称。

  37. 是,当启动一个有运行时提示的业务规则时。启动规则集的同时使用了默认启动值。如果您在启动规则集时指定了一个运行时提示文件,则运行时提示文件被忽略。


  38. [/validate]

  39. 只检查命令语法,不启动业务规则或规则集。所有的错误都显示在控制台上,并记录在 Calculation Manager 的日志文件中。如果 CalcMgrLog4j.properties 文件在 Classpath 路径中,则日志文件在 HYPERION_HOME/logs/Planning 目录中生成。
  40. 规则集中的每个规则都是经过验证的。




  41. /?

  42. 为 CalcMgrCmdLineLauncher.cmd 打印语法和选项。


  43. 例如,要启动名为 Depreciate 的规则,使用名为 Values.txt 的文件中的运行时提示值,输入:
  44. CalcMgrCmdLineLauncher.cmd /A:planapp /U:admin /D:plan1 /R:Depreciate /F:Values.xml
  45. 3.     如遇提示,请输入密码。

复制代码
发表于 2010/1/5 14:13:42 | 显示全部楼层
Launching Business Rules With a Utility



Using the CalcMgrCmdLineLauncher.cmd utility, administrators can launch—from the Command Prompt—business rules or rulesets created with Calculation Manager.
Notes:

  • Use the /Validate option to check the command syntax before you launch the business rule or ruleset.

  • You cannot launch cross-application rulesets with this utility.

  • If the launched business rule has a runtime prompt, before running CalcMgrCmdLineLauncher.cmd, create a file containing the runtime prompt values. You can either manually create an ASCII file that contains the runtime prompt values, or you can automatically generate the values file by selecting the Create Runtime Prompt Values File option on the Runtime Prompts page.

  • If the launched ruleset has a runtime prompt, default launch values are used, and you do not specify a runtime prompt values file.

  To launch a business rule or ruleset with CalcMgrCmdLineLauncher.cmd:


  • When launching a business rule (not a ruleset) having runtime prompts, generate a file containing the runtime prompt values by either:

    • Specifying the name of the runtime prompt values file that you generated on the Runtime Prompts page (see the Oracle Hyperion Planning User's Online Help).

    • Creating a runtime prompt ASCII file that contains, on separate lines, each runtime prompt name and its value, separated by a double colon (:. For example:
      CopyDataFrom::Jan
      CopyDataTo::Apr
      This file specifies that the value for the runtime prompt named CopyDataFrom is Jan, and that the value for the runtime prompt named CopyDataTo is Apr.
      Save the file in the HYPERION_HOME/products/Planning/bin directory. Alternately, when executing the utility, specify the full path to the runtime prompt file.

  • From the bin directory, enter this command at the Command Prompt, one space, and the parameters, each separated by a space:
    CalcMgrCmdLineLauncher.cmd [-f:passwordFile] /A:appname /U:username /D:database [/R:business rule name | /S:business ruleset name] /F:runtime prompts file [/validate]
    If you installed Planning to the default directory, CalcMgrCmdLineLauncher.cmd is installed in HYPERION_HOME/products/Planning/bin.

    Table 53. CalcMgrCmdLineLauncher Parameters

    ParameterPurposeRequired?

    [-f:passwordFile]
    If an encrypted password file is set up, you can use this option as the first parameter in the command line to run the utility with the full file path and name specified in passwordFile. See Suppressing Password Prompts in Planning Utilities.
    No
    /A:appname
    Specify the Planningapplication from which the business rule is launched
    Yes
    /U:usernameSpecify the administrator's user name
    Yes
    /D:databaseSpecify the name of the plan type against which the calculation is launched
    Yes
    [/R:business rule name |/S:business ruleset name]Specify the name of the business rule or ruleset to be launched
    Yes. Specify either a business rule or a ruleset, but not both.
    /F:runtime prompts fileSpecify the name of the file containing business rule's runtime prompt names and values
    Yes, when launching a business rule having a runtime prompt. When launching a ruleset, default launch values are used. If you specify a runtime prompts file when launching a ruleset, the runtime prompts file is ignored.
    [/validate]Checks the command syntax only; does not launch the business rule or ruleset. Any errors are displayed on the console and written to the Calculation Manager log file. If the CalcMgrLog4j.properties file is in the Classpath, the log file is generated in the HYPERION_HOME/logs/Planning directory.
    Each rule in a ruleset is validated.
    No
    /?Print the syntax and options for CalcMgrCmdLineLauncher.cmd
    No

    For example to launch the rule named Depreciate, using runtime prompt values in a file called Values.txt, enter:
    CalcMgrCmdLineLauncher.cmd /A:planapp /U:admin /D:plan1 /R:Depreciate /F:Values.xml

  • If prompted, enter your password.
发表于 2010/1/5 14:21:36 | 显示全部楼层
 楼主| 发表于 2010/1/5 16:37:45 | 显示全部楼层
谢谢楼上的兄弟,看来我没有好好看ug就来问,大家来鄙视我一下吧。
 楼主| 发表于 2010/1/5 17:24:43 | 显示全部楼层
仔细一看,这个办法是要启用EPMA 的cala manager 才ok,我们这里没有启用EPMA,有bug。
epma 的clca manager 不好用。
发表于 2010/1/27 01:55:44 | 显示全部楼层
通过odi批量调用

能通过odi执行规则?我们能够实现在windows下调用bat文件执行ODI.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|手机版|壹佰网 ERP100 ( 京ICP备19053597号-2 )

Copyright © 2005-2012 北京海之大网络技术有限责任公司 服务器托管由互联互通
手机:13911575376
网站技术点击发送消息给对方83569622   广告&合作 点击发送消息给对方27675401   点击发送消息给对方634043306   咨询及人才点击发送消息给对方138011526

GMT+8, 2025/11/29 06:24 , Processed in 0.017493 second(s), 16 queries , File On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表