Jump to content

Extract entities from a server (storage) based on one of the entity states


Javiera

Recommended Posts

Hi! can you help me please?

In my model I have a server that I want to function as storage, this server is linked to a combiner which will combine the member entities that leave the server with a parent entity that will arrive at it from another node.

Each member entity has a state with a unique number linking it to a parent entity (there may be more than one member entity with the same state number).

How can I extract from the server only the member entities whose state is equal to the state of the parent entity that arrives at the parentinput of the combiner?

Thank you so much!

18.10.spfx

Link to comment
Share on other sites

Well, first thing, you don't need your entities to be bouncing between the output and the input of your server like that. If you want to use it as sort of storage, set both the processing time and the capacity to infinity.

After that, at the moment that the parent entity enters the combiner "Parent Entered" you could search the queue of your storage using a search step with something like "Server1.Processing.Contents", with the condition of "Candidate.ModelEntity.State == ModelEntity.State", release the server and transfer what have been found to the output.

You need to take some care on some situations, like what if the parent entity arrives first at the combiner then the member at the storage? And some care with batching quantities aswell. But I think you can handle it.

  • Like 1
Link to comment
Share on other sites

You need to put the search, release and transfer steps into the Add-on Process Triggers "Parent Entered" of the Combiners.

For example, for the "Juntar_secos" combiner, at the "Parent Entered" Addon process, you would search for Slots.Processing.Contents, matching "Candidate.ModelEntity.Id_Del_Pedido == ModelEntity.Id_del_pedido". After that you should use a release step, to release Server "Slots", and a transfer step to transfer what have been found to Output@Slots.

Link to comment
Share on other sites

Thank you very much for your help, but simio says I can't use the Release step with the server because I don't have any resources to release. In addition, although the Search step works very well, since I don't have any step that keeps the entities inside the server even if they are not called, they continue to leave the server and merge with entities that should not be merged. :( 

If I set the processing time to infinity, despite calling entities with the Search process, the entity does not leave the server. I tried to condition the processing time of each entity according to the "Ventana_de_entrega" state, but as expected, it is not the most appropriate.

21.10.spfx

Link to comment
Share on other sites

×
×
  • Create New...