In a workflow an externaltask that calls unlock.ipl fails. (It happens on certain files)
As stated in the ts.552.wf.pdf. on page 178...
When a locking task tries to acquire a lock for a file it checks first to see if that file is locked by some other task in its own job. If it is, the locking task "steals" the lock from the other task.
In some instances this does not seem to happen. So an externaltask is called for which will unlock the files in 1 wa so that it can lock them again in another wa.
If it fails the WF sits there with "Trying to Lock Files"
I went as far as to write a log file out in unlock.ipl and had found out that it is returning an error code of 256.
What is Error code 256?
Here is the code All users and groups have permissions to run the external task.
#########################
<!-- ======================= Attach Files ======================= -->
<usertask name="Attach Files"
owner="__TAG__('iw_user');"
description="Select 'Update Files' from 'Operation' dropdown to attach files and complete task"
start="t" lock="t">
__INSERT__("<areavpath v='$area_vpath'/>");
<successors>
<successorset description="Update Files">
<succ v="Unlock Creator Lock"/>
</successorset>
</successors>
<template_script>
<![CDATA[
# insert file list if we have it
if (__ELEM__('iw_file'))
{
__INSERT__("<files>");
for (my $i=0; $i <
@submit_file; ++$i) {
__INSERT__("
<file path='$submit_file[$i]' comment='task file'/>");
}
__INSERT__("\n\t</files>");
}
]]>
</template_script>
</usertask>
<!-- ======= Unlock files in initial workarea, so editor can lock ====== -->
<!-- ======= Must run as administrator ====== -->
<externaltask name="Unlock Creator Lock"
owner="ADMIN"
description="Unlock files in initial workarea so they can be locked in editor workarea by updatetask"
start = "f">
__INSERT__("<areavpath v='$area_vpath'/>");
<successors>
<successorset>
<succ v="Update Editor Workarea"/>
</successorset>
</successors>
<command v='__INSERT__("$iwhome");/iw-perl/bin/iwperl __INSERT__("$iwhome");/local/bin/unlock.ipl'/>
<activation>
<pred v="Attach Files"/>
</activation>
</externaltask>
<!-- ============================================================= -->
<!-- ======== Move task files to iw_editor's work area ========== -->
<!-- ============================================================= -->
<updatetask name="Update Editor Workarea"
owner="__INSERT__($iw_editor);"
overwritemod="t"
start="f" lock="t">
__INSERT__("<areavpath v='$editor_wa'/>");
<successorset description="">
<succ v="Author Work"/>
</successorset>
__INSERT__("<srcareavpath v='$area_vpath'/>");
</updatetask>
The Professor-