Yes i confirm i got only one Alfresco instance and the workflow engine is only the one embedded. I've added my bpmn definition file.
I also confirm that Activiti doesn't complaints anything as i can see from my alfresco log.
After some other attempts i can say that the lock appears IF and only IF:
there's an active timer (so task outcome from "Alfresco Script Task" was "Reject" at least one time), which is looping every 2 hours, AND when it fires AND find the condition to set the "bpm_outcome" to "Approve" it moves to the next task "Verify Complete Doc" (which has similar debugging sentences…so i firstly thought to a double action of job executor but it really wasn't..) AND the javascript's sets again the outcome as "Approve" …. it dies.
Nothing happens, or appears any error in the logs.
The last thing i can see in alfresco log is originated here:
<javascript><activiti:string>logger.log('Task Controllo di completezza…')</activiti:string></javascript>
I can see the Job Executor retries every 5 minutes.
trademak, as u said before i desume it can't workout from here on, so Job Executor truly get no real error…or it would retry three times than stops and doens't loop again, while now it adds the "rev_" integer in db every time he re-fire up.
When the Job Executor retries, it rollbacks at the beginning of the event of the timer, because i now can easily manage to workout the lock this way:
i temporaly delete the Alfresco file that the "Alfresco Script Task" has to find in the task's javascript loop, so endend again with "Reject". Than after 5 minuts or the remaining of this 5 minutes from what i've just done, i got 2 hours to prepare my move cause i can see the lock has vanished: so i simply put back the file with the property "Incompleto" so i force the Reject the "Verify Complete Doc" task.
After 2 hours the "Alfresco Script Task" exit to gateway with "Approve", then the Next task doesn't go to endevent1 as expected.
Then everything works like a charm for the rest of the flow (except for the case the flow would return to timer-approve-approve point…).
The strange thing is that IF the workflow starts…first time timers starts found everything, and the property is the one it expected to close to endevent…it works like a charm (So Start-Approve-Approve-Endevent1).
I'm really stuck!
Thanks in advance and…happy 2014!!