IBM Support

An assertion violation error occurs when the notification event handler is run for WebSphere Process Server (WPS)

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":{"code":"SSQH9M","label":"WebSphere Process Server"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Business Process Choreographer","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"7.0.0.5;7.0.0.4;7.0.0.3;7.0.0.2;7.0.0.1;7.0","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Product Synonym

WPS

Document Information

Modified date:
15 June 2018

UID

swg21598951