public void deleteHistoricTaskInstancesByProcessInstanceIds ( List < String > processInstanceIds , boolean deleteVariableInstances ) { CommandContext commandContext = Context . getCommandContext ( ) ; if ( deleteVariableInstances ) { getHistoricVariableInstanceManager ( ) . deleteHistoricVariableInstancesByTaskProcessInstanceIds ( processInstanceIds ) ; } getHistoricDetailManager ( ) . deleteHistoricDetailsByTaskProcessInstanceIds ( processInstanceIds ) ; commandContext . getCommentManager ( ) . deleteCommentsByTaskProcessInstanceIds ( processInstanceIds ) ; getAttachmentManager ( ) . deleteAttachmentsByTaskProcessInstanceIds ( processInstanceIds ) ; getHistoricIdentityLinkManager ( ) . deleteHistoricIdentityLinksLogByTaskProcessInstanceIds ( processInstanceIds ) ; getDbEntityManager ( ) . deletePreserveOrder ( HistoricTaskInstanceEntity . class , "deleteHistoricTaskInstanceByProcessInstanceIds" , processInstanceIds ) ; }
Deletes all data related with tasks which belongs to specified process instance ids .