While looking at the debug logs of Maximo I noticed queries fired against the dummy_table. I wondered what is it that Maximo needs to query against the dummy_table. After looking at the sql and some digging in, I found that Maximo uses the dummy_table for evaluating the conditions.
The condition of a condition node in a workflow is evaluated in 2 ways –
- The condition is validated using the Parser (standard way, on the object).
- If the parser fails, the condition is validated using SqlFormat on dummy_table.
To explain it further, consider a workflow on the PO having one of the following conditions-
- Condition: poid=:poid -this will pass the Parser, so validation would be successful.
- Condition: exists (select * from ADDRESS where orgid = :orgid and addresscode = :shipto) – this will fail the parser, but will pass the SqlFormat checking on dummy_table using this sql: Select count(*) from dummy_table where (exists (select * from address where orgid = ‘org01’ and addresscode = ‘add01’));
So validation would be successful.
- Condition: poid = :poid and exists (select * from ADDRESS where orgid = :orgid and addresscode = :shipto) will fail the parser, will also fail the SqlFormat check because dummy_table doesn’t have a column named poid :
sql: Select count(*) from dummy_table where poid = 32767 and exists (select * from address where orgid = ‘org01’ and addresscode = ‘add01’ );
So validation would fail.
In this case the poid = :poid doesn’t really make any sense in the sql.
So while writing a condition make sure that you are not writing a sql that would fail.