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
Original Message:
Sent: 04-28-2021 13:09
From: Mahadevan Ramakrishnan
Subject: Issue in the workflow validation
Dear All,
There was a requirement to compare two dates on the Service Request application upto the minutes level and I used the oracle trunc function for the same.The system is not allowing to proceed with the database error 932 related to invalid query but the same query when executed in the database works well.
This comparison upto the minutes level is needed as we are stopping the system from proceeding if the reported date is less than the problem date.Is there any suggestions as to how the same has been achieved and if the logic has to be done outside the workflow if the same is not feasible to achieve in the workflow designer.
Regards,
Mahadevan
#MaximoUserGroups
------------------------------
Mahadevan Ramakrishnan
------------------------------