Troubleshooting
Problem
A notification event handler is created for a task escalation and assertion errors occur when you use event handler code that is similar to the following code: LocalHumanTaskManager htm = getHTM(); htm.complete(tkiid, cow);
Symptom
When the task is escalated, assertion errors, such as the following errors, occur:
TraceBPE E com.ibm.bpe.util.Assert.assertion(Assert.java:64) -------------------------- Assertion Failure ----------------------------
TraceBPE E com.ibm.bpe.util.Assert.assertion(Assert.java:65)
TraceBPE E com.ibm.bpe.util.Assert.assertion(Assert.java:66) Assertion violation !(don't call this method is repetition is not valid) in method >> com.ibm.task.core.EscalationManager.scheduleRepetition(EscalationManager.java:1445) <<
TraceBPE E com.ibm.bpe.util.Assert.assertion(Assert.java:67)
TraceBPE E com.ibm.bpe.util.Assert.assertion(Assert.java:68)
Cause
The problem was a result of the event handler code. For more details, see the Creating notification event handlers for Business Process Choreographer topic in the product documentation. A note in the product documentation topic states:
"If you want to call the HumanTaskManagerService interface from this class, do not call a method that updates the task that produced the event. This action might result in inconsistent task data in the database."
The action might also result in a failure with assertions and exceptions.
The code completes the following steps:
- The task is escalated.
- The notification eventhandler does a complete() on the task that is currently escalated.
The code shown below calls a method that updates the task; that is, it completed it, which is
not allowed according to the information center.
LocalHumanTaskManager htm = getHTM();
htm.complete(tkiid, cow);
Resolving The Problem
As stated in the product documentation, in the event handler code, do not call a method that updates the task that produced the event.
Product Synonym
WPS
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21598951