Create transaction among several commands

I call several flowable service api together like below:

taskService.claim(taskId, userId);
taskService.complete(taskId, vars);

if taskService.complete fails, i need to rollback taskService.claim which called before. As document says that

When you make a Flowable API call, by default, everything is synchronous and part of the same transaction. Meaning, when the method call returns, a transaction will be started and committed.

How to solve this problem, can i control the transaction in my own?