Question

Roll back Array of tasks

  • 26 October 2022
  • 3 replies
  • 44 views

Badge +6

Receiving array tasks from external system . if any exception in one of the task while creating , all tasks should rollback . Expectation either create “ALL” or “NONE”  .

XML Map is rollback particular task and not all

 

Ex:

  1. IFS receiving two tasks, skills ,address and etc.
  2. Second tasks if any skill don’t match with in IFS. Only second transaction roll back and first task still exist in IFS  

 

Is there any way to achieve this


3 replies

Userlevel 7
Badge +22

awaiting for your input @ruben.maas 

Userlevel 5
Badge +13

Hi @Saranga Amaraweera \ @seeda ,

Using an XML map all primary records are processed sequential independently, we can’t change that behavior with configuration. 

so if TASK is the primary table of the XML map it is not possible to rollback all tasks in case of an exception.

 

The only way to accomplish this requirement is to change the primary table of the XML to a parent object, e.g. REQUEST and process the associated tasks as child transactions. 

That way, if one task failed to update the other related to the same parent object (REUQEST) will be rolledback. 

 

Cheers, 

 

Ruben

 

 

 

Badge +6

here we are using request table also . Example i mentioned Tasks  only .

as per my undersetting .Need to follow 

  1.  we can create one custom table as parent table of request 
  2.  use customer table reference id in all child request table in one of the user_def column.  this way if any one of the child request/task fails , entire transaction rolled back .

let me test on this scenario 

Reply