How to Set Removal Time for those Existing Data in Camunda History Table

Hi, I am newbie as camunda user and I just wanted to ask the following camunda archiving related questions below -

  1. My goal is to set Removal Time for those existing transaction in the history table and I saw this code snippet from camunda documentation. My question is this possible to write this code directly in BPMN without using Java springboot? If yes, can you provide instruction/article on how to do it, please?

HistoricProcessInstanceQuery query =
historyService.createHistoricProcessInstanceQuery();

Batch batch = historyService.setRemovalTimeToHistoricProcessInstances()
.absoluteRemovalTime(new Date()) // sets an absolute removal time
// .clearedRemovalTime() // resets the removal time to null
// .calculatedRemovalTime() // calculation based on the engine’s configuration
.byQuery(query)
.byIds(“693206dd-11e9-b7cb-be5e0f7575b7”, “…”)
// .hierarchical() // sets a removal time across the hierarchy
.executeAsync();

  1. Related with Question #1, Is that specific code can be run in C#? if yes, what libraries and packages i need to install so that this code will run successfully in C#.

Thank you.