Jump to content

Destroying an entity if a failure occurs during service


reedrsmith
 Share

Recommended Posts

Hello, I am modeling a range wherein if a workstation encounters a failure while processing an entity, that entity needs to be destroyed and can't simply wait for the workstation to be repaired and then continue processing.


The real world application models a failure of a critical piece of gear on boat, which would have to cancel the mission and return to port for repairs. In my case the mission (the entity) cannot wait for the repair, it must be canceled and start the whole process again later.


I am really struggling to implement a process where the entity encountering the failure is destroyed when the failure occurs instead of just waiting around.


Thanks for any help anyone can offer!

Link to comment
Share on other sites

Hi,


In the on-failed event of the server,

Search the contents of the processing queue, in the found step place a release step in order to release the applicable server. Directly after that place a destroy step to delete the entity, otherwise you can transfer it back to the start.


Hope this helps...

Link to comment
Share on other sites

@willem , thanks for your reply! That sounds like what I'm trying to do.


Are you referring to creating an Add-On Process with Search, Release, Destroy steps? I'm playing around with that but haven't figured it out yet.


I looked for an 'on failed event' event, but under my Definitions>Events window, I only have 1 inherited event and then three others that I created for other functions. Can you guide me a little further?


Thank you!

Link to comment
Share on other sites

@willem, after working a little more, I created an add on process when the workstation fails with a search, release, and destroy step like you suggested and it seems to be doing the trick. I had to try a few things before figuring out I needed to release the specific workstation object in question, but it seems to be humming along now. Thank you for the suggestion!

Link to comment
Share on other sites

  • 2 years later...

What are the settings that Search, Release and Destroy must have? The station I wish to delete things from is called Station1. I know that for Search the Collection Type must be Queue State. Am I to search for Station1.AllocationQueue, Input@Station1.AllocationQueue or Input@Station1? For Release my object type is currently set to specific and the object name is Server1. Is this correct and do I need to do anything under the advanced settings? For Destroy which destroy type should I use?

Thanks

Link to comment
Share on other sites

×
×
  • Create New...