cancel
Showing results for 
Search instead for 
Did you mean: 

Foreign Key Violation after forking to an 'unassigned' task

malgalad
Champ in-the-making
Champ in-the-making
hi,

i am trying to fork to a manual task after calling a call-activity - subprocess.

error:

01110014 Wrapped Exception (with status template):
   ### Error updating database. Cause: org.h2.jdbc.JdbcSQLException: Referentielle Integrität verletzt: "ACT_FK_TASK_EXE: PUBLIC.ACT_RU_TASK FOREIGN KEY(EXECUTION_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_)"
   Referential integrity constraint violation: "ACT_FK_TASK_EXE: PUBLIC.ACT_RU_TASK FOREIGN KEY(EXECUTION_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_)"; SQL statement:
   insert into ACT_RU_TASK (ID_, REV_, NAME_, DESCRIPTION_, PRIORITY_, CREATE_TIME_,
    ASSIGNEE_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, TASK_DEF_KEY_)
    values (?,
    1,
    ?,
    ?,
    ?,
    ?,
    ?,
    ?,
    ?,
    ?,
    ?
    ) [23002-132]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:316)
    at org.h2.message.DbException.get(DbException.java:167)
    at org.h2.message.DbException.get(DbException.java:144)
    at org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:325)
    at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:267)
    at org.h2.table.Table.fireConstraints(Table.java:766)
    at org.h2.table.Table.fireAfterRow(Table.java:783)
    at org.h2.command.dml.Insert.insertRows(Insert.java:122)
    at org.h2.command.dml.Insert.update(Insert.java:82)
    at org.h2.command.CommandContainer.update(CommandContainer.java:70)
    at org.h2.command.Command.executeUpdate(Command.java:198)
    at org.h2.server.TcpServerThread.process(TcpServerThread.java:298)
    at org.h2.server.TcpServerThread.run(TcpServerThread.java:135)
    at java.lang.Thread.run(Unknown Source)
  
   ### The error may involve org.activiti.persistence.insertTask-Inline
   ### The error occurred while setting parameters
   ### Cause: org.h2.jdbc.JdbcSQLException: Referentielle Integrität verletzt: "ACT_FK_TASK_EXE: PUBLIC.ACT_RU_TASK FOREIGN KEY(EXECUTION_ID_) REFERENCES


for process details see attachment: example.zip

kind regards
4 REPLIES 4

tombaeyens
Champ in-the-making
Champ in-the-making
do you have a stacktrace of the thread that includes activiti? perhaps on tomcat?

malgalad
Champ in-the-making
Champ in-the-making
hi tom,

which kind of information do you mean ? …."tomcat-stack-trace"

is'nt it the catalina.log?  (see attachment)

tombaeyens
Champ in-the-making
Champ in-the-making
that's the logs i need.

### Cause: org.h2.jdbc.JdbcSQLException: Referentielle Integrit√§t verletzt: "ACT_FK_TASK_EXE: PUBLIC.ACT_RU_TASK FOREIGN KEY(EXECUTION_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_)"
Referential integrity constraint violation: "ACT_FK_TASK_EXE: PUBLIC.ACT_RU_TASK FOREIGN KEY(EXECUTION_ID_) REFERENCES PUBLIC.ACT_RU_EXECUTION(ID_)"; SQL statement:
insert into ACT_RU_TASK (ID_, REV_, NAME_, DESCRIPTION_, PRIORITY_, CREATE_TIME_,
                      ASSIGNEE_, EXECUTION_ID_, PROC_INST_ID_, PROC_DEF_ID_, TASK_DEF_KEY_)
    values (?,
            1,
            ?,
            ?,
            ?,
            ?,
            ?,
            ?,
            ?,
            ?,
            ?
           ) [23002-132]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:316)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.message.DbException.get(DbException.java:144)
at org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:325)
at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:267)
at org.h2.table.Table.fireConstraints(Table.java:766)
at org.h2.table.Table.fireAfterRow(Table.java:783)
at org.h2.command.dml.Insert.insertRows(Insert.java:122)
at org.h2.command.dml.Insert.update(Insert.java:82)
at org.h2.command.CommandContainer.update(CommandContainer.java:70)
at org.h2.command.Command.executeUpdate(Command.java:198)
at org.h2.server.TcpServerThread.process(TcpServerThread.java:298)
at org.h2.server.TcpServerThread.run(TcpServerThread.java:135)
at java.lang.Thread.run(Unknown Source)

at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:100)
at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:87)
at org.activiti.engine.impl.db.DbSqlSession.flushInserts(DbSqlSession.java:388)
at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:315)
at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:157)
at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:113)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:44)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.TaskServiceImpl.complete(TaskServiceImpl.java:113)
at org.activiti.rest.api.task.TaskOperationPut.executeWebScript(TaskOperationPut.java:56)
at org.activiti.rest.util.ActivitiWebScript.executeImpl(ActivitiWebScript.java:68)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)
at org.springframework.extensions.webscripts.PresentationContainer.executeScript(PresentationContainer.java:69)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)

Though I can't tell yet a lot from the stacktrace alone. Can you provide the process and a test case?  That would be best.  Or if you're able to configure so that I can see the fine logs leading up to the error?

malgalad
Champ in-the-making
Champ in-the-making
hi tom,

ok…

enclosed please find a simplified process (P3.zip) with a parallel gateway wich is forking
into an usertask and a manual task.

same error as the process earlier discussed in this thread.

the problem always occurs if there is no user task (after forking) before arriving the end event.

regards
Leo
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.