Delete all case instances & processInstances active and completed

Dear Team,

I have 1000+ case instance ids and want to delete all which are active and completed. While from cockpit deleting deployment through error.
Could you please help and do the need ful.

Regards,
Kedari

what is the error you are getting in cockpit while deleting?

Hi @aravindhrs,

Thanks for the reply. Below is the error.

inished : Could not delete deployment: ENGINE-03004 Exception while executing Database Operation 'DELETE_BULK deleteHistoricVariableInstanceByteArraysByIds {caseInstanceIds=[8575ec72-ad44-11e9-a08d-525400234e22, 89d994e0-ad44-11e9-a08d-525400234e22, 8ac4df6e-

And server logs below.

Cause: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000

    at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:200)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.delete(DefaultSqlSession.java:213)
    at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.executeDelete(DbSqlSession.java:199)
    at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.deleteBulk(DbSqlSession.java:213)
    at org.camunda.bpm.engine.impl.db.AbstractPersistenceSession.executeDbOperation(AbstractPersistenceSession.java:48)
    at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:329)
    ... 68 more

Caused by: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)

Cockpit level showing:

Regards,
Kedari

@kedarik seems community edition of cockpit doesn’t allows bulk deletion with higher number of instances. Alterntively you can try with camunda batch deletion which you can invoke via rest api. And try configuring less than the number for which you got exception.