ReadOnlyCollection<WorkflowQueueInfo> subActivities = stateMachineInstance.WorkflowInstance.GetWorkflowQueueData();
Collection<string> MessagesAllowed = new Collection<string>();
foreach (WorkflowQueueInfo queueInfo in subActivities)
{
// Cast the Queue Name to the class Event Queue Name to get the event name string
EventQueueName queuename = queueInfo.QueueName as EventQueueName;
if (queuename != null)
{
MessagesAllowed.Add(queuename.MethodName);
}
}
When WorkflowState Changed, do above to retrieve the event names of current state (MessagesAllowed has them), then update UI, it is ok. hope it can help you!