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.

Elsa 2 - Custom activity error

See original GitHub issue

Hello,

I copied/pasted the code from the documentation and I have the following error : image

The code is from : https://elsa-workflows.github.io/elsa-core/docs/extensibility/extensibility-custom-activities#hello-world-activity

I think the problem may come from this sentence that says I have to implement the OnExecute method but I do not know how.

Implement/override the OnExecute/OnExecuteAsync and if necessary the OnResume/OnResumeAsync methods.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
riatdylcommented, May 11, 2021

Perfect, it works ! Thank you a lot 😃

1reaction
sfmskywalkercommented, May 11, 2021

What you can do is create a class library where you define all of your activity classes, e.g. MyActivity1 and MyActivity2. Then all you need to do is take one of these class names, e.g. MyActivity1 and do the following:

services.AddElsa(elsaOptions => elsaOptions.AddActivitiesFrom<MyActivity1>());

That will register both MyActivity1 and MyActivity2 (and any other activities you may have present in your class library).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Custom "signal received" activity not working
So I implemented Signal Custom activity based on SignalReceived default activity. using System; using Elsa.Activities.Signaling.Models; using ...
Read more >
Elsa workflow designer errors
Everything works as expected except the intellisense in the designer window. Ive noticed a couple of errors in the browser console as below....
Read more >
Elsa Workflows Community Meeting 25 - YouTube
Topics - Workflow query - CI/CD - Bookmark system Demos - Workflows as activities - Run child workflow Bugs: - Workflow with two...
Read more >
Writing Blocking Activities · ELSA
In this guide, we will learn how to create blocking activities by implementing a sample activity that acts as a workflow trigger.
Read more >
Journey Builder error: 'One or more custom activities failed ...
The following error may appear when you load or create a Journey:"One or more custom activities failed to load. Verify that custom activity...
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