Idea

Kyle P avatar image
3 Likes"
Kyle P suggested Regan Blackett commented

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.

create objectlabel assignmentmessage trigger
· 3
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

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

0 Likes 0 ·
Kyle P avatar image Kyle P Joerg Vogel commented ·

@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

0 Likes 0 ·
create-labels.fsm (21.1 KiB)
Regan Blackett avatar image Regan Blackett ♦ Kyle P commented ·

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.

2 Likes 2 ·

No Comments

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.