question

Jonathan avatar image
0 Likes"
Jonathan asked Jonathan commented

How do I resume item on message trigger?

Using either a decision point or a conveyor station, how do I resume item on message trigger without process flow?

FlexSim 20.2.3
flexsim 20.2.3message trigger
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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jonathan commented

I might pass in the item to resume as the sending object. The question then is which object is receiving the message, and from where is it sent?

· 8
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Here's an example using the DP arrival (to stop and send a delayed message) and DP messagetrigger to resume.

DPstopMessageResume.fsm

1 Like 1 ·
Jonathan avatar image Jonathan Jason Lightfoot ♦♦ commented ·

In your example the decision point is sending the message to itself. So

conveyor.itemData[fromObject].resume();

resolves correctly. But if another object is sending the message then it does not. I get:

time: 4.958494 exception: FlexScript exception: MODEL:/Pos1>variables/Custom/onMessage


In another thread the reply used some kind of label on the object to point to the flow item. But I can't figure out how to do that. Here's that thread:

https://answers.flexsim.com/questions/40783/code-to-resume-conveyor.html


Why aren't there more pick list options for on message triggers? It seems like it would be incredibly useful.

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Jonathan commented ·

Here's an example where the top conveyor's DP sends a message to the lower DP (centerObjects reference).

The lower DP ignores it if it doesn't have an item - which I set as a label on arrival and clear on message.remoteDPmessageResume.fsm

1 Like 1 ·
Show more comments