how to delete operator's item

how to delete operator's item

heenamQVTKU
Participant Participant
127 Views
4 Replies
Message 1 of 5

how to delete operator's item

heenamQVTKU
Participant
Participant

 

Hi

I want the operator to unload the first item and delete the remaining items

I tried the destroy(), but the unload continues and a task error occurs.

What can I do?

0 Likes
Accepted solutions (1)
128 Views
4 Replies
Replies (4)
Message 2 of 5

moehlmann_fe
Enthusiast
Enthusiast
Accepted solution

It sounds like you are using standard task sequences (3d port-connection logic) to transport items. Deleting the items without also removing the pending task sequences for them would explain the error.

I would recommend to handle the transport logic in Process Flow in this case. That way you can simply not add unload tasks for items past the first.

If that is not an option, you can iterate through the pending task sequences of the operator delete all of those that involve the items you are about to destroy. The attached model does in the OnUnload trigger. The code assumes that the operator only receives standard transport task sequences (consisting of Travel, Load, Break, Travel, Unload).

0 Likes
Message 3 of 5

krzysztof_jurczykF5GXD
Enthusiast
Enthusiast

Please specify - it's not a big deal. Or attach the model.

0 Likes
Message 4 of 5

heenamQVTKU
Participant
Participant

Thank you. I succeeded!!

0 Likes
Message 5 of 5

heenamQVTKU
Participant
Participant

Sorry, I couldn't upload the full model in the office. I will upload it with the model next time.

0 Likes