I have a process task with a sentry in my case plan. Since repetition rules are not supported when using sentry, I have a custom repetition rule in my ifPart expression that checks that no “active” caseExecution is present (meaning I can only enable the task again when the predecessor has finished).
However, when I complete the process (and by that completing the process task) I can verify in a test, that the activity is no longer active, but the “available” next execution does not become “enabled” automatically.
I have to manually trigger a reevaluation of state via CaseVariableListener.
Question: From what I got (see CMMN: when are sentry conditions evaluated) the sentry should get re-evaluated for every “lifecycle transition” … which in my world would include the completion of a task.
Ideas? How is the transaction handling in such a case? Could it be, that my “caseService.createCaseExecutionQuery()…” that I use to find if the predecessor is completed works on the “outdated” information before the actual transaction commits?