question

Leona E avatar image
0 Likes"
Leona E asked Emily Hardy commented

close the input of a processor - error

Hello,

I created a model to test the closeinput command model-close-input.fsm, but I get the following error "FlexScript exception: Property Reihe not available for Variant with value NULL. Must by a treenode type Variant. at MODEL:/Tools/ProcessFlow/ProcessFlow/Custom Code>variables/codeNode".

I added the output port number in a label called "Reihe" and a second label called "Stoerung" (with 95 % = 1 and 5 % = 2). If an item enters the list with value 2 in the label "Stoerung", it is pulled from list "Boxen im System" and is pushed to the list "Auslagerung". The next step is to evaluate the label "Reihe" and to close the input of the processor, which processed the Box.

How can I eliminate the error?

Thank you very much!


FlexSim 17.2.4
close input
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

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Emily Hardy commented

Hello Elona,

there are problems to cope with.

  1. The Pull From List activity might not pull anything from the list. Then There is nothing that can be pushed. An conditional Decide activity between Push To and Pull From List filters the empty pulled data tokens.

    token.pulled.length > 0
    
    or shorter
    token.pulled.length
    

    a value > 0 is logical true.

  2. In the second Process you need a reference or pointer to the item. The Event Triggered Source reactes in the push to list activity on the On Entry event. The token, which triggers the event, is the entering token in Pull From List activity.

    I set a label to get access to this token (I call the label "pullerToken"). pullerToken contains a label, too, pointing to the item. Its name is "pulled" which is set in the Pull From List activity. Because the pull from List activity can return an array; I have to decide which item I want to get a reference to. First reference in the array is token.pullerToken.pulled[1] . The last can use a method: token.pullerToken.pop().
    In a script could this be:
    Array releasingItems = token.pullerToken.pulled;
    Object item = releasingItems.pop();
    

At the end there is missing a label at the item. It is the Label "Reihe". You can add a Set Label template in the source of the 3D model.

model-close-input-1-jv.fsm


· 1
5 |100000

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

Emily Hardy avatar image Emily Hardy ♦ commented ·

@Leona E, did this resolve your question?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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