cancel
Showing results for 
Search instead for 
Did you mean: 

Inconsistency between the Java and REST APIs

mishamo
Champ in-the-making
Champ in-the-making
Hi,

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 (https://github.com/Activiti/Activiti/commit/61182262f1af35f71dcd6c926647d36602a4e117).

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?

Thanks,
Misha
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi Misha,

Yes that makes a lot of sense. Could you create a JIRA issue for this?

Thanks,

mishamo
Champ in-the-making
Champ in-the-making