Before Maximo allows you to save a condition (similar for data restrictions) it evaluates the condition against the database with a zombie MBO (think advanced search where all values are null) and will fail in these scenarios since Oracle won't let you truncate a string or null value like that. We requested IBM loosen these to a warning so you can proceed even if it fails validation and they agreed to change it in 7.6.1.3 (APAR
IJ27258) in our scenario at least. It's helpful to know it doesn't successfully evaluate but there are situations where you know it would in the actual application (such as something depending on needing an owner) and want to still allow it.
On data restrictions, what we had to do was set the condition to be 1=1, associate the condition to the data restriction, and then adjust the condition after which would then allow it. With workflow it's trickier since you're not referencing a condition. You could utilize a custom condition automation script as you mentioned, though I would have a check in your script like:
if mbo.isZombie():
evalresult=True
else:
# NORMAL LOGIC here
We had to do that to avoid errors when we try to retrieve sets and such in our normal logic that aren't allowed on a zombie record.
------------------------------
Steven Shull
Projetech Inc.
------------------------------
Original Message:
Sent: 05-03-2021 13:44
From: Mahadevan Ramakrishnan
Subject: Issue in the workflow validation
Yes,it didnt get through in the workflow validation stage and the workflow process revision failed to get validated.As the need was pressing,my colleague had performed the back end update and tested the entire flow in UAT which worked as he had mentioned.
Is there any alternative to trunc function we can use in the workflow condition node or we have to handle the comparison separately through an automation script or a java code.
Regards,
Mahadevan
------------------------------
Mahadevan Ramakrishnan
Tata Consultancy Services
------------------------------
Original Message:
Sent: 05-03-2021 09:23
From: Travis Herron
Subject: Issue in the workflow validation
When you tried it within Maximo, did it ALWAYS fail/throw an error, or was it just sometimes?
If sometimes, I would look for any patterns within the records where it failed.
If always: TRUNC is an Oracle-exclusive command, I believe. I have had occasions where Maximo mis-handled commands that weren't ANSI compliant. We use SQL Server so I can't test to see if what you are encountering is because of this, but it's a decent guess that Maximo just can't interpret the TRUNC command.
------------------------------
Travis Herron
Pensacola Christian College