cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Labels on FlowItem creation

Labels on FlowItem creation

Whenever a flowitem is created via the 'OnMessage' trigger in a Queue, if a label is assigned in the trigger the assignment is not executed until the flowitem reaches the next processor. Having the labels be assigned at the same location the flowitem is created could prevent routing/logic issues and model bloating.

3 Comments

@Kyle P, can you please attach a model, that demonstrate your issue? Thanks! Regards Jörg

kyle_p1
Not applicable

@Jörg Vogel This model demonstrates the issue. It seems as though the labels are not updated until time has passed in the model.

create-labels.fsm

regan_blackett
Autodesk

This is appears to be a quirk with the way events of objects are scheduled and executed. If you create the flowitem directly into the queue then all of the OnEntry/Send to Port/OnExit events for the objects in that line get to execute before you get to the label assignment part of the code.

If instead you set the destination of the flowitem to model(), assign the label and then use moveobject() to put the flowitem into the queue that received the message, the label value is set before the Queue executes Send to Port/OnExit/etc.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea