Inputs and outputs for script types
Different script types have different inputs and outputs.
Object | Type | Inputs to script | Outputs expected |
---|---|---|---|
Attribute | Validation |
attribute - Name of attribute being validated (String); newValue - Value entered by the user (String) offeringAttributes - All the attributes for this offering (PMSCCRSPEC) offering - The offering displaying the dialog (Offering) cart - The cart this offering is currently in (PMSCCR)
scriptHome - A pointer to Maximo objects |
True (1) - script returned successfully and data update False (0) followed by an error message or message group/message key - Script failed, and error message will be displayed
No return code - if the script is being used for data update, do not return a return code |
Offerings | Prepopulation |
offeringAttributes - All the attributes for this offering (PMSCCRSPEC) offering - The offering displaying the dialog (Offering) cart - The cart this offering is currently in (PMSCCR)
scriptHome - A pointer to Maximo objects |
The prepopulation script does not process a return code |
Add to cart |
offeringAttributes - All the attributes for this offering (PMSCCRSPEC) offering - The offering displaying the dialog (Offering) cart - The cart this offering is currently in (PMSCCR) scriptHome - A pointer to Maximo objects |
True (1) - script returned successfully
False (0) followed by an error message or message group/message key - Script failed, and error message will be displayed |
|
Submit cart |
offeringAttributes - All the attributes for this offering (PMSCCRSPEC)
offering - The offering displaying the dialog (Offering) cart - The cart this offering is currently in (PMSCCR) scriptHome - A pointer to Maximo objects |
True (1) - script returned successfully False (0) followed by an error message or message group/message key - Script failed, and error message will be displayed |
|
Cart | Submit cart |
cart - The cart this offering is currently in (PMSCCR) itemsInCart - array of items in the cart (an array of SRs) itemAttributes - an array of attributes (an array of PMSCCRSPECs) scriptHome - A pointer to Maximo objects |
True (1) - script returned successfully False (0) followed by an error message or message group/message key - Script failed, and error message will be displayed |
Returning from the script
print True (or print 1)
print False (or print 0)
print 'This script failed' Error messages always start with a '0'.
The text can be returned directly by the script, or a msggroup-msgkey format can be used to pull a message from the MAXMESSAGES database table.
If the message comes back in the format MSGGROUP#MSGKEY[#parm1#parm2...] then the MAXMESSAGES db will be search for the message. Optionally, any parameters included in the return message are applied to the message from the database before it is displayed.