Workflow undeployment from Workflow Console failed

cancel
Showing results for 
Search instead for 
Did you mean: 
yash_patel_c2
Established Member

Workflow undeployment from Workflow Console failed

Hi all,

I am trying to undeploy workflow from workflow console by command undeploy definition activiti$workflow103:11:26803 I am getting following error in admin console. I am able to undeploy other versions of the same workflow but this particular version is having some problem which has blocked my Worflows I have started page as well.

org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "ACT_FK_EXE_PROCDEF: PUBLIC.ACT_RU_EXECUTION FOREIGN KEY(PROC_DEF_ID_) REFERENCES PUBLIC.ACT_RE_PROCDEF(ID_) ('workflow103:11:26803')"; SQL statement: delete from ACT_RE_PROCDEF where DEPLOYMENT_ID_ = ? [23503-190] ### The error may involve org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity.deleteProcessDefinitionsByDeploymentId-Inline ### The error occurred while setting parameters ### SQL: delete from ACT_RE_PROCDEF where DEPLOYMENT_ID_ = ? ### Cause: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "ACT_FK_EXE_PROCDEF: PUBLIC.ACT_RU_EXECUTION FOREIGN KEY(PROC_DEF_ID_) REFERENCES PUBLIC.ACT_RE_PROCDEF(ID_) ('workflow103:11:26803')"; SQL statement: delete from ACT_RE_PROCDEF where DEPLOYMENT_ID_ = ? [23503-190] at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:172) at org.apache.ibatis.session.defaults.DefaultSqlSession.delete(DefaultSqlSession.java:185) at org.activiti.engine.impl.db.DbSqlSession$BulkDeleteOperation.execute(DbSqlSession.java:249) at org.activiti.engine.impl.db.DbSqlSession.flushRegularDeletes(DbSqlSession.java:924) at org.activiti.engine.impl.db.DbSqlSession.flushDeletes(DbSqlSession.java:890) at org.activiti.engine.impl.db.DbSqlSession.flush(DbSqlSession.java:615) at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:212) at org.activiti.engine.impl.interceptor.CommandContext.close(CommandContext.java:138) at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:66) at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:131) at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45) at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31) at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40) at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35) at org.activiti.engine.impl.RepositoryServiceImpl.deleteDeployment(RepositoryServiceImpl.java:82) at org.alfresco.repo.workflow.activiti.ActivitiWorkflowEngine.undeployDefinition(ActivitiWorkflowEngine.java:1167) at org.alfresco.repo.workflow.WorkflowServiceImpl.undeployDefinition(WorkflowServiceImpl.java:308) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) at org.alfresco.service.cmr.workflow.WorkflowPermissionInterceptor.invoke(WorkflowPermissionInterceptor.java:64) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:53) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:166) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96) at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy90.undeployDefinition(Unknown Source) at org.alfresco.repo.workflow.WorkflowInterpreter.executeCommand(WorkflowInterpreter.java:754) at org.alfresco.repo.admin.BaseInterpreter$1$1.execute(BaseInterpreter.java:162) at org.alfresco.repo.admin.BaseInterpreter$1$1.execute(BaseInterpreter.java:1) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:333) at org.alfresco.repo.admin.BaseInterpreter$1.doWork(BaseInterpreter.java:165) at org.alfresco.repo.admin.BaseInterpreter$1.doWork(BaseInterpreter.java:1) at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:555) at org.alfresco.repo.admin.BaseInterpreter.interpretCommand(BaseInterpreter.java:154) at org.alfresco.repo.web.scripts.admin.DynamicInterpreterExtension.interpretCommand(DynamicInterpreterExtension.java:111) at org.alfresco.repo.web.scripts.admin.DynamicInterpreterExtension.executeCmd(DynamicInterpreterExtension.java:74) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126) at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225) at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32) at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_admin_consoles_admin_workflowconsole_post_js_14._c_main_8(classpath*:alfresco/templates/webscripts/org/alfresco/repository/admin/consoles/admin-workflowconsole.post.js:191) at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_admin_consoles_admin_workflowconsole_post_js_14.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/admin/consoles/admin-workflowconsole.post.js) at org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:74) at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_admin_consoles_admin_workflowconsole_post_js_14._c_script_0(classpath*:alfresco/templates/webscripts/org/alfresco/repository/admin/consoles/admin-workflowconsole.post.js:199) at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_admin_consoles_admin_workflowconsole_post_js_14.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/admin/consoles/admin-workflowconsole.post.js) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091) at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_admin_consoles_admin_workflowconsole_post_js_14.call(classpath*:alfresco/templates/webscripts/org/alfresco/repository/admin/consoles/admin-workflowconsole.post.js) at org.mozilla.javascript.gen.classpath__alfresco_templates_webscripts_org_alfresco_repository_admin_consoles_admin_workflowconsole_post_js_14.exec(classpath*:alfresco/templates/webscripts/org/alfresco/repository/admin/consoles/admin-workflowconsole.post.js) at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:509) at org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:207) at org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:219) at org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:181) at org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:109) at org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1376) at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86) at org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:519) at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:464) at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:587) at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:656) at org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:428) at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:308) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:399) at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:210) at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132) at javax.servlet.http.HttpServlet.service(HttpServlet.java:770) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.springframework.extensions.webscripts.servlet.CSRFFilter.doFilter(CSRFFilter.java:315) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "ACT_FK_EXE_PROCDEF: PUBLIC.ACT_RU_EXECUTION FOREIGN KEY(PROC_DEF_ID_) REFERENCES PUBLIC.ACT_RE_PROCDEF(ID_) ('workflow103:11:26803')"; SQL statement: delete from ACT_RE_PROCDEF where DEPLOYMENT_ID_ = ? [23503-190] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:179) at org.h2.message.DbException.get(DbException.java:155) at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:426) at org.h2.constraint.ConstraintReferential.checkRowRefTable(ConstraintReferential.java:443) at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:318) at org.h2.table.Table.fireConstraints(Table.java:932) at org.h2.table.Table.fireAfterRow(Table.java:950) at org.h2.command.dml.Delete.update(Delete.java:100) at org.h2.command.CommandContainer.update(CommandContainer.java:78) at org.h2.command.Command.executeUpdate(Command.java:253) at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:198) at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172) at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172) at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172) at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:45) at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:73) at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:49) at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:115) at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:170) ... 105 more

Thanks 

3 Replies
afaust
Master

Re: Workflow undeployment from Workflow Console failed

You could probably undeploy the other versions of the process because they had no running processes associated with them. But this constraint violation error clearly states that there is an active process using the BPMN model. So you'd need to delete this/these process(es) first and then try to undeploy.

yash_patel_c2
Established Member

Re: Workflow undeployment from Workflow Console failed

Unfortunately I am unable to open Workflows I've started page from where I can delete the particular running process. I have even tried deleting the document on which workflow was started. Not able to load trashcan content as well.

douglascrp
Advanced II

Re: Workflow undeployment from Workflow Console failed

Hello.

You can delete all the workflow instances by using the following command in the workflow console:

delete all workflows imeanit