In my process flow, I have completed filling in the parameter of load and unload activity, and is now writing the conditional expressions in the beginning of token start. I query from the list and table firstly, then use if statement to determine which TaskType will AGV going to execute. I use token.agv.TaskType to record the task number agv gets. I assign the task agv is going to execute in Custom Code: Get Task activity. Now my AGV only do I/O to EQ(Input port to Processor), then it stops. However, it should chooese to execute I/O to Queue (TaskType2) next base on my if statement. Since the material from Inputport has two possible destination. I hope to push the material to 2 different lists in the Custom Code: Get Task line 39, 40, 53, 54, but fail to push material to list using code. The token is not successfully assigned the TaskType value it is going to execute later. For materials from I/O to Processor will be pushed to itemlist2; for materials from I/O to Queue will be pushed to itemlist4. I didn't use push to list activity to do this, because I don't have tokens in process flow that represent materials, otherwise perhaps it would be simpler to use activity.
The if statement part of my code is used to query if Processor/Queue is available. My script to query from list and table are at the left hand side custom code: Query, the conditional expressions are written in the middle below the Source: AGV token activity.
Also, the following error exception was from Process Flow in the activity called "custom code: Update EQ Table". The problem seemed to be coming from line 56 where I try to have "n/a" assigned to a number field. But I cannot understand why String cannot be written into the table.
time: 582.000000 exception: FlexScript exception: MODEL:/Tools/ProcessFlow/ProcessFlow_02/Custom Code: Update EQ Table>variables/codeNode
Thank you!