Extract Activity End Time From Token In a Delay

Extract Activity End Time From Token In a Delay

nmzenke
Enthusiast Enthusiast
177 Views
2 Replies
Message 1 of 3

Extract Activity End Time From Token In a Delay

nmzenke
Enthusiast
Enthusiast

nmzenke_0-1749070592977.png

nmzenke_1-1749070654886.png

I'm having trouble figuring out the correct flexscript to pull data out of the tree when it's stored like shown. I'd like to be able to pull out the sim exit time from the current delay activity as shown in the pictures. Thanks!

 

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

xavier_low
Contributor
Contributor
Accepted solution

As the token node is a SimpleDataType, you will need to use the command getsdtvalue() to get values in the node. For your case, this code should give you the value you want:

treenode token = Model.find("Tools/ProcessFlow/ProcessFlow>stats/instances/ProcessFlow/tokens/Widget");
getsdtvalue(token, "data[1]");

 

0 Likes
Message 3 of 3

nmzenke
Enthusiast
Enthusiast

Thanks Xavier. That does work...only thing I'll mention for others reading this is that in the help for the getsdtvalue() command it looks like one should be careful as the command might not work at some point in the future

nmzenke_0-1749138433865.png

 

0 Likes