Jump to content

Assign different states to members of a batch


Luu Khanh Minh
 Share

Recommended Posts

In my model, there is a combiner that generates a batch of 30 entities. After the combiner, I want to assign exactly 30% of the bach population (i.e: 9 members in a 30-member batch)  to state "A" and the remaining 70% of the batch population (i.e: 21 members in a 30-member batch) to state "B". May I have some suggestions as to how to do so? Note that the number of members in a batch is varying for different batches

Thank you! 

Link to comment
Share on other sites

you can use a search step in an appropriate process (you can create a new process or use an add-on process where needed). In the search step you should search the queustate of modelentity.batchmember. Here you can set a match condition if required. If you do not want to set a match condition the search step will search the first 9 entities in the batch (I assume that the batch quantity is 30. If it is a different value Math.Ceiling(Combiner.BatchQuantity*0.3) expression will be evaluated and will be round up the next integer. (You can use math.floor function as well.) Then in the assign step set the required statevariable of modelentity to the new value. 

Assign different states to members of a batch.PNG

  • Thanks 1
Link to comment
Share on other sites

Hello

I would like to revive this thread. So In my model, there is a combiner that generates a batch by batching 1 parent entity and 29 member entities together. After the combiner, I want to assign exactly 30% of 30 entities(i.e: both the parent and the member entities) to state "A" and the remaining 70% of the 30 entities to state "B".

May I have some suggestions as to how to do so? 

Thank you!

 

Link to comment
Share on other sites

×
×
  • Create New...