question

Alexis B avatar image
0 Likes"
Alexis B asked Matt Long commented

Problem with Wait for Event

Hello.

In my processflow, in right side, my "wait for event" triggers when I have 4 items in my Queue1 but above this event I put a custom code with variable batch which move to 5

I have 2 questions :

1 - Why my token continue his route while current item in my Queue1 is 4 ?

2 - Left side, my FlowItems is tranche1. I want tranche2 during proces in my right side. How can I change that ?

Thank you



ex3.fsm

FlexSim 18.1.1
processflowbatchvariable
4.png (310.5 KiB)
ex3.fsm (39.4 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Matt Long avatar image
1 Like"
Matt Long answered Matt Long commented

1) Your Create Object activity is creating a flowitem inside of Queue1. This starts off a new batch. Then the other 4 flowitems that entere Queue1 give you a completed batch of 5.

2) Is the only difference the color of the flowitem? or are you planning on making additional changes? If it's just a color change, the easiest way to do it would be to set the color when the item is created. There are picklist options in the On Creation or On Exit trigger of the Source for setting an items color.

Alternatively, you could create two Sources, one that creates tranche1 and one that creates tranche2. Then close and open the output ports of the sources to create the correct flowitem type.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Alexis B avatar image Alexis B commented ·

@Matt Long

Thank you for answer.

1) Ok so, I just need to +1 batchsize in my custom code for 5 flow items + 1 creat item

2) I'll take a planning productions with differents size and color

0 Likes 0 ·
Matt Long avatar image Matt Long Alexis B commented ·

1) That would be one way to do it. Or don't create a flowitem in that queue, create it elsewhere.

2) If it's going to be best to use two different flowitem types, then the dual source option will be the best way to go. Or, you could get rid of the source and replace it with process flow. Use a Event Triggered Source and a Create Object. The Create Object could use a label value on the token or some other means to dynamically decide which flowitem to create.

0 Likes 0 ·