question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom Action Events arrive in wrong order

See original GitHub issue

When emitting events from a custom action, they arrive in the wrong order;

image image image

namespace Microsoft.BotFramework.Composer.CustomAction
{
    public class EventEmitter : Dialog
    {
        [JsonConstructor]
        public EventEmitter([CallerFilePath] string sourceFilePath = "", [CallerLineNumber] int sourceLineNumber = 0)
            : base()
        {
            this.RegisterSourceLocation(sourceFilePath, sourceLineNumber);
        }

        [JsonProperty("$kind")]
        public const string Kind = "EventEmitter";

        public async override Task<DialogTurnResult> BeginDialogAsync(DialogContext dialogContext, object options = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            await dialogContext.EmitEventAsync("Event1", null);
            await dialogContext.EmitEventAsync("Event2", null);

            return await dialogContext.EndDialogAsync();
        }
    }
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
boydc2014commented, Oct 20, 2020

At a first glance, looks like not related to the order of event itself, this looks like to be the trigger firing order (ie: Selector) isn’t as ordered as you might see, and that’s by design.

@stevengum @mrivera-ms free feel to assign to me or @Danieladu.

0reactions
boydc2014commented, Dec 2, 2020

@boydc2014 thanks for that. A bit unfortunate it cannot be properly fixed. I now have simply reversed the order and it seems stable. Can you confirm that the order is always just reversed as I could work with that.

At current implementation, it is, and it’s not likely to be changed soon. But i can’t really say it’s guaranteed.

The alternative suggested above, using multiple EmitEvent actions outside this single customized action, is a guaranteed behavior.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting CustomActionData in deferred custom action
I try to get data from the CustomActionData property in a c++ dll, but it's always empty during the deferred sequence. If I...
Read more >
Troubleshooting Actions
Troubleshoot Common Custom Domain Issues · Custom Domain Terminology · Extend the Reach of Your Organization · Provide Actions, Buttons, and Links.
Read more >
Custom Actions List
Description of all predefined custom actions available in Advanced Installer.
Read more >
Troubleshoot the event setup tool for web in Meta ...
The event setup tool in Meta Events Manager helps you set up events and parameters on your website without code. Learn how to...
Read more >
Troubleshooting Amazon EventBridge
If the policy is incorrect, you can edit the rule in the EventBridge console by removing and then adding it back to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found