zoukankan      html  css  js  c++  java
  • Event Handler Content must support at least one class.

    这个问题出现在 oracle CPM 要绑定在自定义对象上的操作引起的

      官方文档 :https://cx.rightnow.com/app/answers/detail/a_id/6971/kw/Event%20Handler%20Content%20must%20support%20at%20least%20one%20class.%20

    /*
    * CPMObjectEventHandler: demo
    * Package: OracleServiceCloud
    * Objects: Contact, COTestCustomObject   PS:如果只是操作oracle 自身的  Contact直接写,但是操作定义的要加上 CO
    * Actions: Create, Update
    * Version: 1.3
    */

    - the header is required, even though it is commented
    - it will be read and used by the runtime
    - it contains information on the objects and actions supported by the script
    - the CPMObjectEventHandler name must match the class name and the test harness class (see examples below)

    2. The implementation

    - contains the required custom business logic to manipulate objects that are passed in at runtime
    - the apply() method does most of the work
    - the API version must match the one specified in the header
    - the class name must match the name specified in the header
    - the apply() function has 4 parameters: $run_mode (indicates if the script is running in a test harness or in production), $action (the event that triggered the execution - create, update or destroy), $object - the object executed on (e.g. Incident), $n_cycles (the number of execution loops the script has entered)
    - sample:

    use RightNowConnectv1_3 as RNCPHP;
    use RightNowCPMv1 as RNCPM;
     
    class demo implements RNCPMObjectEventHandler {
        
    public static function apply($run_mode, $action, $obj, $n_cycles){ 
        switch($action) {
        case RNCPMActionCreate:
            $verb="created";
            break;
        case RNCPMActionUpdate:
            $verb="updated";
            break;
        }
    }
    }

     

  • 相关阅读:
    js html table转json 反向生成数据源
    用命令提示符 打开 asp.net Development Server
    asp.net 'Sys'未定义 解决方案
    js form转换成Hash格式
    【转】NSIS 常用安装路径
    Linq lamdba GroupJoin外连接示例
    CDN简单了解
    获取android入口activity
    解决IE6下 li 的 float:left 自动换行
    WinForm窗口基础配置
  • 原文地址:https://www.cnblogs.com/yezi1116/p/15071519.html
Copyright © 2011-2022 走看看