04-10-2018 11:00 AM
Hello, Sequence No. 1 calls sequence No. 2 and sequence No. 2 calls sequence No. 3. I want to retrieve the name of the calling sequence (sequence N ° 1) from sequence N ° 3 without modifying the sequence N ° 1. If anyone can give me a method to retrieve this information. Thank you in advance.
---------------------------------------------------------------------------------------------------------------------------
Bonjour,
La séquence N°1 appelle la séquence N°2 et la séquence N°2 appelle la séquence N°3.
Je souhaite récupérer le nom de la séquence appelant (séquence N°1) depuis la séquence N°3 sans modifier la séquence N°1.
Si quelqu'un peut me donner une méthode pour récupérer cette information.
Merci d'avance.
Solved! Go to Solution.
04-10-2018 02:18 PM - edited 04-10-2018 02:23 PM
RunState.Caller.RunState.Caller.Sequence.Name or maybe
RunState.Caller.RunState.Caller.SequenceFile.Path
04-11-2018 02:41 AM - edited 04-11-2018 03:09 AM
Thank you for your answer #James_Grey,
Your solution function if we know the number of sub-sequence but I want a method that goes back automatically until the sequence call
04-11-2018 09:38 AM
@Yannick69,
You could also use Thread.CallStackSize to get the size of the call stack and then Thread.GetSequenceContext to get the SequenceContext that you need.
Cheers,
Ryan C.
04-12-2018 02:37 AM
@RandallCrandall'sCandleHandle RandallCrandall'sCandleHandle
Thank you for your answer. it works very well