AnsweredAssumed Answered

Inconsistency between the Java and REST APIs

Question asked by mishamo on Oct 9, 2014
Latest reply on Oct 10, 2014 by mishamo

I have just noticed an inconsistency between the Java and REST APIs that has become apparent with a change introduced in Activiti 5.16.1 (

The Java API call to delete a process instance is:
public void deleteProcessInstance(String processInstanceId, String deleteReason)

The REST call to delete a process instance is:
DELETE runtime/process-instances/{processInstanceId}

The linked commit above adds "ACTIVITI_DELETED" as a default placeholder for the delete reason if it is empty. The issue is that when a process is deleted via REST, there is no argument available for a reason and thus it is always empty (hence it always defaults to the placeholder). This has become apparent as the "ACTIVITI_DELETED" placeholder String has made it up to our UI layer after an Activiti update.

Would it make sense to add a deleteReason argument to the REST call or does this have to be handled by a (hacky) String comparison against the placeholder?