Skip to main content

Hi,

I am trying to create a task with mass insert and then want to use the newly created task id from mass insert to update the existing the record.

But when i am taking the newly created task id reference in mass update through xpath_node, xml is running but field is not updating.

<perform_batch>

<perform_mass_insert result name = “New task”>

//Task creation code

</perform_mass_insert>

<mass_update_table_name>

<user_def1 xpath_node = “//Newtask/task/task_id” /> --Here this field not updating

</mass_update_table_name>

 

Please suggest.

Hi @Jainayushi 

mass insert is a custom MPM, I don’t think is supports the result name functionality.

you can trigger another BR after the insert.

Cheers!


Thanks @Shneor Cheshin  for the information.

 

But it will be good if i can get the confirmation for this functionality not supported by application.


@ruben.maas 

Can you please share your thoughts?

Cheers!


Hi, 

 

perform_mass_insert is a custom MPM indeed. 

 

from a solution standpoint you use an hierarchy select to return the proposed data for the new tasks that you want to create. whatever the hierarchy returns you need to ensure it returns the data for the new task as well as reference to the parent task. 

 

in the update section of the perform_mass_insert you will run a perform_batch that will create the new task an update the parent task.

 

But I would like to rasie some concerns about the solution:

  1. task_id is a numeric data type, you should not store it in a text field (varchar)
  2. when you do a mass_insert it implies there are cases where you insert multiple tasks,  its a one to many relation from the parent to the new task. I don't think it makes sense to store the new task_id on the parent task in that case. why not the other way around? storing the parent task_id on the child task? 

Cheers,

 

Ruben

 


Reply