如何查询自动化脚本启动点事件条件,事件类型和保存设置?

时间:2018-03-02 00:20:21

标签: sql maximo

我希望能够从我们的自动化脚本启动点查询所有详细信息,例如(但不限于)条件,事件类型和保存设置。问题是,这些是非持久性字段,我不知道从哪里获取信息。我们有对象,属性,动作和集成脚本,我想了解动作和集成脚本的类似细节。

实施例: enter image description here

我们使用Oracle 12.1运行Maximo 7.6.0.5。

提前感谢任何指导!

3 个答案:

答案 0 :(得分:2)

与事件对应的值将作为Scriptlaunchpoint对象中的代码捕获。 Object Event属性保存密钥。请参阅下面的有效值列表,(仅针对“保存”操作编译)

答案 1 :(得分:1)

您可以在某些字段上按Alt + F1来查找支持各个部分的对象(尽管它在应用程序本身的字段和选项卡上工作得更好,而不是在创建对话框上)。从那里,您可以转到Maximo中的Database Configuration应用程序,查看涉及的表格。

我现在正在关闭内存,但是我知道像Autoscript,ScriptVars,(脚本?)启动点,(脚本?)LaunchPointVars这样的表格。

答案 2 :(得分:1)

根据Balakumaran和其他来源的意见,我提出了这些Oracle SQL脚本来提取事件详情。

/*******************************************************************************
* Launch points, bitwise comparison
* Object Launch Point
*******************************************************************************/
SELECT scriptlaunchpoint.autoscript, 
    scriptlaunchpoint.launchpointtype,
    scriptlaunchpoint.launchpointname,
    scriptlaunchpoint.objectname,
    scriptlaunchpoint.active,
    scriptlaunchpoint.objectevent,
    TRIM(CASE WHEN scriptlaunchpoint.objectevent BETWEEN 2 AND 1023 THEN ' onSave' ELSE NULL END ||
        decode(bitand(scriptlaunchpoint.objectevent,1), 1, ' Initialize', NULL)||
        decode(bitand(scriptlaunchpoint.objectevent,1024), 1024, ' App Validate', NULL) ||
        decode(bitand(scriptlaunchpoint.objectevent,2048), 2048, ' Can Add', NULL) ||
        decode(bitand(scriptlaunchpoint.objectevent,4096), 4096, ' Can Delete', NULL)) AS "EVENT",
    TRIM(decode(bitand(scriptlaunchpoint.objectevent,2), 2, ' Add', NULL) ||
        decode(bitand(scriptlaunchpoint.objectevent,4), 4, ' Update', NULL) ||
        decode(bitand(scriptlaunchpoint.objectevent,8), 8, ' Delete', NULL) ||
        decode(bitand(scriptlaunchpoint.objectevent,16), 16, ' Add', NULL) ||
        decode(bitand(scriptlaunchpoint.objectevent,32), 32, ' Update', NULL) ||
        decode(bitand(scriptlaunchpoint.objectevent,64), 64, ' Delete', NULL) ||
        decode(bitand(scriptlaunchpoint.objectevent,128), 128, ' Add', NULL) ||
        decode(bitand(scriptlaunchpoint.objectevent,256), 256, ' Update', NULL) ||
        decode(bitand(scriptlaunchpoint.objectevent,512), 512, ' Delete', NULL)) AS "SAVE",
    TRIM(CASE WHEN (bitand(scriptlaunchpoint.objectevent,2) +
                    bitand(scriptlaunchpoint.objectevent,4) +
                    bitand(scriptlaunchpoint.objectevent,8) > 0) THEN ' Before Save' ELSE NULL END ||
        CASE WHEN (bitand(scriptlaunchpoint.objectevent,16) +
                    bitand(scriptlaunchpoint.objectevent,32) +
                    bitand(scriptlaunchpoint.objectevent,64) > 0) THEN ' After Save' ELSE NULL END ||
        CASE WHEN (bitand(scriptlaunchpoint.objectevent,128) +
                    bitand(scriptlaunchpoint.objectevent,256) +
                    bitand(scriptlaunchpoint.objectevent,512) > 0) THEN ' After Commit' ELSE NULL END) AS "TIMING"
FROM scriptlaunchpoint
WHERE scriptlaunchpoint.launchpointtype = 'OBJECT'
ORDER BY autoscript, launchpointtype, objectname
;

/*******************************************************************************
* Launch points, bitwise comparison
* Attribute Launch Point
*******************************************************************************/
SELECT scriptlaunchpoint.autoscript, 
    scriptlaunchpoint.launchpointtype,
    scriptlaunchpoint.launchpointname,
    scriptlaunchpoint.objectname,
    scriptlaunchpoint.active,
    scriptlaunchpoint.objectevent,
    TRIM(CASE WHEN scriptlaunchpoint.objectevent = 0 THEN ' Validate ' ELSE NULL END ||
        decode(bitand(scriptlaunchpoint.objectevent,1), 1, ' Run action', NULL) ||
        decode(bitand(scriptlaunchpoint.objectevent,2), 2, ' Initialize Value', NULL) ||
        decode(bitand(scriptlaunchpoint.objectevent,8), 8, ' Initialize Access Restriction', NULL) ||
        decode(bitand(scriptlaunchpoint.objectevent,64), 64, ' Retrieve list', NULL)) "EVENT"
FROM scriptlaunchpoint
WHERE scriptlaunchpoint.launchpointtype = 'ATTRIBUTE'
ORDER BY autoscript, launchpointtype, objectname
;