question

G C avatar image
0 Likes"
G C asked G C commented

wait for event increase to exact value by token label

I have a waitForEvent activity which I want to have a change rule "Increase to Exact Value" but I want it to only count specific token labels at another activity. Should I write code for the Event? How do I accomplish this?

Choose One
process flowlabelswait for eventtokens
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

Matt Long avatar image
2 Likes"
Matt Long answered G C commented

The first thing you'll need to do is make sure the label on the token is a Tracked Variable. This can be accomplished by using the Add Tracked Variable pick option in the Assign Labels activity.

Once the label is a tracked variable, the Wait for Event activity can listen to it change. Run the model until you have a token with a Tracked Variable label on it. Go to your Wait for Event and use the Sampler (either in the Process Flow view or next to the Object field) and mouse over the token.

You'll see a Token: On Label Value Change option. Click on the token and then select this option. The Wait for Event properties will now look like this:

Change the Label Name field to the name of your tracked variable label. Then you just have to update the token.Unassigned! to reference the correct token. The easiest way to do this would be to have a label on the token that enters the Wait for Event that references the correct token. Then you would just put

  1. token.TokenRefLabelName

into the Object field of the Wait for Event. Otherwise you can use the command gettoken().


listentotv.png (23.7 KiB)
· 9
5 |100000

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