Custom Action Events arrive in wrong order
See original GitHub issueWhen emitting events from a custom action, they arrive in the wrong order;
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:
- Created 3 years ago
- Comments:13 (11 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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.