添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
绅士的围巾  ·  护腰不止靠“挺直” ...·  1 月前    · 
星星上的斑马  ·  每日车闻:宋PLUS ...·  1 年前    · 
  • Rest End point is called .We start the workflow using runtime.startbykey
  • Then order is saved in DB.If some issue occurs we thrown an exception which is returned as response to the client.Order is not saved.
  • If Order was saved in DB in step 2 ,then we call send order.If any issue occurs in this step(Send Order)
  • then we thrown an exception which is returned as response to the client by Rest end point.
  • My question is how do i rollback Step 2 in case my Step 3 fails

    Hi @my_camunda_profie_1 ,

    it sounds like you have to handle distributed transactions. BPMN 2.0 supports them with Compensations. You write an explicit task to delete the data from the Oracle DB and invoke it as a compensation task.

    grafik 693×283 12.9 KB

    You can find the technical details here: Cancel and Compensation Events | docs.camunda.org

    Hope this helps, Ingo

    @fml2 I want to send synchronous Response to REST .Can you help how to acheive it.Response can come from any other Workflow.

    Halt the workflow and return the response to Controller - Camunda Platform 7 Topics / Camunda Platform 7 Process Engine - Camunda Platform Forum

    generally, yes. It depends on the rollback operation, if you want to delete a dataset that is not yet committed to your business database you will get an issue there. If you invoke two synchronous rest calls to add and remove a dataset, all is fine.

    The compensation will be invoked in the same thread of the engine if no asynchronous continuation is set.

    Hope this helps, Ingo

    So there are two ways to have the consistency:

  • a purely technical way (ACID transaction, requires a distributed tx manager)
  • eventual consistency, via compensation events
  •