Hey Team , Iam a beginner we are migrating from camunda 7 to camunda 8.5 so for POC we are testing few API’s , so I want to delete a process Instance programatically using operate API
private void operateClient() throws OperateException {
SelfManagedAuthentication sma = new SelfManagedAuthentication().clientId(clientId).clientSecret(clientSecret).keycloakUrl(“http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token").keycloakRealm("camunda-platform”);
this.clientO = new CamundaOperateClient.Builder().authentication(sma)
.operateUrl(“http://localhost:8081/”).build();
}
ProcessDefinitionFilter processDefinitionFilter = new ProcessDefinitionFilter.Builder().name(“Customer Onboarding”).build();
SearchQuery procDefQuery = new SearchQuery.Builder().filter(processDefinitionFilter).size(20).sort(new Sort(“version”, SortOrder.ASC)).build();
List<ProcessDefinition> list = clientO.searchProcessDefinitions(procDefQuery);
ProcessInstance process = clientO.getProcessInstance("2251799813685353l");
but I’m unable to find the method to delete ,Could anyone please help to confirm in case you have idea about this.
Appreciate your kind understanding