Careful with failed set state robots that remain in the workflow queues.
This can happen when you set all changeables to a different state as
part of an ECN workflow. If an item is checked out, that job will fail.
Its almost impossible to look at a queue job that says SEVERE and trace
it back to a specific failed robot (Enhancement request PTC). Any way,
if those jobs are set back to ready, they will rerun and reset the
lifecycle state. Well, if they are really old, changes are the items
are already released and now they are reverted back to Under Review.
Here is a query that can identify those affected ECNs. You can change
the state names to match your lifecycle.
SELECT DISTINCT ECN.WTCHGORDERNUMBER
FROM WTCHANGEORDER2 ECN, WTCHANGEACTIVITY2 CA, WTPART P, CHANGERECORD2
R, INCLUDEDIN2 I,
(SELECT P2.STATESTATE, P2.BRANCHIDITERATIONINFO
FROM WTPART P2
WHERE P2.LATESTITERATIONINFO = 1) P3
WHERE
I.IDA3A5 = ECN.IDA2A2 AND
I.IDA3B5 = CA.IDA2A2 AND
ECN.STATESTATE = 'RELEASED' AND
R.IDA3A5 = P.IDA2A2 AND
R.IDA3B5 = CA.IDA2A2 AND
P3.STATESTATE = 'UNDERREVIEW' AND
P.BRANCHIDITERATIONINFO = P3.BRANCHIDITERATIONINFO
ORDER BY ECN.WTCHGORDERNUMBER