Maximo List Archive

This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.



Autoscript - Attribute Launch Point - won't launch

From: (2014-03-26 15:52)


Hi guys: I'm writing an autoscript that is supposed to launch from the bin fields in ISSUECURITEM, TRANSFERCURITEM, and RECEIPTINPUT (we're trying to ensure no transactions have been done while the bin is unreconciled, since we've been having problems with negative balances in spite of having negative current balances turned off).

the script works fine on the bin fields in ISSUECURITEM and TRANSFERCURITEM, and for returns in RECEIPTINPUT, but for some reason it won't trigger for receipts in RECEIPTINPUT. The log says "
The total time taken to execute the INVENTORY-BINVALID script for the RECINPUT-TOBIN launch point is 0 ms." and that's all.
Can anyone figure out why? Below is the script.


TIA

Shannon Rotz
-----------------------
from psdi.util.logging import MXLogger
from psdi.util.logging import MXLoggerFactory
from psdi.mbo import MboConstants
logger = MXLoggerFactory.getLogger("maximo.script");
logger.debug("==================== INVENTORY-BINVALID." + launchPoint + ": START =====================")

if itemType == "ITEM" and store is not None and bin is not None and reconciled == 0:
logger.debug("INVENTORY-BINVALID: Item Type is " + itemType)
logger.debug("INVENTORY-BINVALID: Item # is " + item)
logger.debug("INVENTORY-BINVALID: Storeroom is: " + store)
logger.debug("INVENTORY-BINVALID: Bin is " + bin)
logger.debug("INVENTORY-BINVALID: Reconciled is: " + str(reconciled))
errorgroup = 'inventory'
errorkey = 'unreconciled'
params = [item, bin]
logger.debug("==================== INVENTORY-BINVALID." + launchPoint + ": END =====================")

Launch Point Variable Bindings:
- bin: TOBIN
- store: TOSTORELOC
- item: ITEMNUM
- itemType: ITEM.ITEMTYPE
- reconciled: INVBALANCES_COND.RECONCILED (new relationship)


From: (2014-04-01 22:10)

Hi Shannon,
Usually the main reason why you don't see anything in the log is that the script failed somewhere. You can engage catching exception (https://wiki.python.org/moin/HandlingExceptions) to get more info...
Regarding your code:
check all variables (e.g. ITEM relationship doesn't exist on RECEIPTINPUT object in my environment)
also make sure that INVBALANCES_COND relationship works as expected.


Cheers,
Alexey