Skip to main content

Hi,

 

For a customer, we would like to run a process flow based on Event (not query) in order to update the Orig. Due Date of ALL material lines. 

The customer process follows the process below :


1/ Create SV

2/ Update ETA date on the activity (not in the order but in the activity level)

3/ Run a process flow to set the same date on ALL  Orig. Due Date of ALL materials lines (for example if we have 2 or 3 lines)

(This process is a workaround as we don’t have the ETA date on the general queue) 
 

We suceed to make an API that update only one material line, but not all.

Do you know a way to update multiple lines in API for a Service Order with multiple lines (in this case it’s for material line, but it could be relevant for multiples service line, etc..)

 

Thanks and Regards

 

anthony

 

Hi Anthony,

 

You can update multiple material lines with a process flow.
You just can't get the ETA date from an activity in this case.

 

To update multiple lines select as condition Material in the process flow.
In the mapping to API in the excecute action you can only select fields at order level or from material line and not from an activity, since there can be multiple activities on an order.

Make sure that in your API, you set the followed, in the state element to update multiple lines.

<state bc_name="Service_Order" is_allow_save_changed="true" is_retry_on_optimistic_error="true">

This prevents bu_ProcessFlow user from being locked when updating multi lines in loop in same order.

Because material is selected as a condition, when an event occurs all material lines on that order will be updated in a loop.

Example of an API for updating a material line. (This excecute action is called for each material line.)

<root xmlns:dt="urn:schemas-microsoft-com:datatypes">
<session email="" alias="">
<state bc_name="Service_Order" is_allow_save_changed="true" is_retry_on_optimistic_error="true">
<action name="data">
<main>
<row number="1">
<order_id dtype="string" in_var="" out_var="">{order_id}</order_id>
</row>
</main>
<demand_material>
<row number="1">
<demand_id dtype="int" in_var="" out_var="">{demand_id}</demand_id>
<due_dt in_var="" out_var="">{eta_dt}</due_dt>
<due_tm in_var="" out_var="">{eta_tm_</due_tm>
</row>
</demand_material>
</action>
</state>
</session>
</root>

 

If you really want to have the eta date and time out of a activity, a separate Process flow will have to be created that update a customized field at order level, this customized field could then be mapped for updating due date and time in excecute action inside the material condition.

 

Regards,

Robin(centric)


Hi @robinsch 

sory for the delay (vacation) ., Thanks for your explanation. Very helpful.

 

Regards

anthony


Reply