Camunda custom transaction rollback

Hi,Is it possible to rollback after a successful transaction in camunda end if the rest part of my java project is not perform successfully after completing the task in camunda end? I used camunda from my java project by calling the REST API .In my java project I can rollback the transaction after error occurred but can’t do this in camunda end.If there any process to do this please tell me and help to do this.
Thanks.