Task assignment fails with Cannot insert NULL into (""PEOPLEASSIGNMENTS_POTOWNERS"."ENTITY_ID") error

Solution Verified - Updated -


The actors assignment for a task is defined as a combination of fixed string and a variable. During process execution, the var1 variable could be set to an empty String due to business logic. Depending on the order of the string/variable in the actors assignment, this could work or lead to a failure during process execution:

    This works:
    This fails:

Example failure when using Oracle:

12:28:11,344 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http- SQL Error: 1400, SQLState: 23000
12:28:11,344 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http- ORA-01400: cannot insert NULL into ("PEOPLEASSIGNMENTS_POTOWNERS"."ENTITY_ID")

12:28:11,344 INFO  [org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl] (http- HHH000010: On release of batch it still contained JDBC statements
12:28:11,344 WARN  [org.jbpm.services.task.persistence.TaskTransactionInterceptor] (http- Could not commit session: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement


  • Red Hat JBoss BPM Suite
    • 6.4

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In