Error with Automatically Removing Objects from Process Flow

Error with Automatically Removing Objects from Process Flow

bradleymensah
Explorer Explorer
273 Views
2 Replies
Message 1 of 3

Error with Automatically Removing Objects from Process Flow

bradleymensah
Explorer
Explorer

I saw on this discussion board post that it is possible to use FlexScript to add and remove attached objects from an object process flow: https://forums.autodesk.com/t5/flexsim-forum/is-there-a-way-to-attach-an-object-as-a-process-flow-in...

 

There seems to an issue with removing objects from a process flow using FlexScript as described in the discussion post. In the attached model, I use a User Event that runs on reset to remove from or attach objects to a process flow based on a parameter value, StaffingLevel. If I remove objects from the process flow by changing the staffing level parameter from a higher to a lower value (for example, from 100% to 50% or 50% to 25%), I get the following error in the System Console when I run the model:

 

time: 0.000000 exception: Exception caught in Executive::processeventinlist().

 

I want to be able to add and remove objects from the process flow on reset. How can I accomplish this without running into this error?

0 Likes
Accepted solutions (1)
274 Views
2 Replies
Replies (2)
Message 2 of 3

FelixMoehlmann
Mentor
Mentor
Accepted solution

I rewrote the logic in the OnSet event of the parameter and don't get any error after that. This leaves two possible causes:

- The timing of the User Event somehow interferes with other logic.

- Setting the ProcessFlow property to the value it already has causes the error (in my code I check if the object in question needs to be removed/added).

0 Likes
Message 3 of 3

bradleymensah
Explorer
Explorer

Thank you for your response. I added your logic to a User Event and got the same error. Therefore, I think that as you suggested, the issue lies with the timing of the User Event and some other logic. I will proceed with your solution of using the On Set logic on the parameter. Thank you!

0 Likes