Question
Performing a Save (Write Now) in a system queue activity
I am performing a save of a data instance with write Now enabled with a System Queue in the activity that is called by the Standard Agent.. I am setting Step Status to Fail however because I need the system queue to be re-queued and retry to occur. The Save I am speaking about is to log the failure as a data instance. Can I not do this because the agent will perform a rollback?
I am getting Save, Delete or Commit has failed because lock "UHG-FW-TCMM-DATA-SERVICELOG SYSTEM-QUEUE-BOUNCEDUNOPENED 14495840126460001999FC74FAA73F5352523C7649EBC29D" is not held error. I believe it is called by CheckRequiredLocks. Using PRPC 6.2 SP2
I don't know enough about your context to know whether what you are doing is advisable, but I do know that you definitely need to have a lock in order to do your save. One way is to do an obj-open or obj-open-by-handle with the "lock" checkmark. Make sure you use something like "StepStatusFail" on your post condition to detect if you can't lock it because someone else already has the lock. Once you get the lock, after your save with "write now", do an unlock. One way of doing the unlock is by stepping outside the guard rail into a java step that performs something like 'tools.getDatabase().getLockManager().unlock(tools.findPage("theWork")' . /Eric