2

I'd like to be able to query all details from our automation script launch points, such as (but not limited to) conditions, event types, and save settings. The problem is, these are non-persistent fields and I'm not sure where to get the information from. We have Object, Attribute, Action, and Integration scripts and I'd like similar details for the action and integration scripts.

Example: enter image description here

We're running Maximo 7.6.0.5 using Oracle 12.1.

Thanks in advance for any guidance!

BoydDensmore
  • 181
  • 12

3 Answers3

3

The values corresponding to the Events are captured as codes in the Scriptlaunchpoint object. The attribute Object Event holds the key. See below are a list of valid values, (Compiled only for Save action)

  • Fantastic, thank you! Based on this I was able to use BITAND operations on the objectevent attribute and extract most of the data I was looking for. – BoydDensmore Mar 16 '18 at 19:38
3

Based on input from Balakumaran and from other sources I've come up with these Oracle SQL scripts to pull the event details.

/*******************************************************************************
* 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
;
BoydDensmore
  • 181
  • 12
1

You can hit Alt+F1 on some of those fields to find the objects that back the various sections (though it works better on the fields and tabs of the application itself instead of on the creation dialog). From there you can go to the Database Configuration app within Maximo to see what tables are involved.

I'm going off of memory right now, but I know tables named something like Autoscript, ScriptVars, (Script?)LaunchPoint, (Script?)LaunchPointVars are involved.

Dex
  • 1,241
  • 6
  • 13