Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] metadata.[showDescription] not working programatically #210

Open
Muhammad-1990 opened this issue May 24, 2024 · 1 comment
Open

[BUG] metadata.[showDescription] not working programatically #210

Muhammad-1990 opened this issue May 24, 2024 · 1 comment

Comments

@Muhammad-1990
Copy link

Description

When programmatically adding 'showDescription = true' to the metadata of a custom activity, the nodes in the workflow designer do not display the description. However 'showDescription' under the common properties is checked. Further more, interacting with any custom activity card 'showDescription' checkbox has no effect, yet system activity cards function as normal. Am i implementing it correctly?

Steps to Reproduce

var myDoActivity = new DoActivity
myDoActivity.Metadata = new Dictionary<string, object>
{
    ["showDescription"] = true
};
public class DoActivity : CodeActivity
{
    protected override async ValueTask ExecuteAsync(ActivityExecutionContext context)
    {
        Console.WriteLine("Doing activity...");
        context.TransitionTo(ActivityStatus.Completed);
    }
}

im using this docker image: elsaworkflows/elsa-studio-v3:latest

docker pull elsaworkflows/elsa-studio-v3:latest
docker run -t -i -e ASPNETCORE_ENVIRONMENT='Development' -e HTTP_PORTS=8080 -e ELSASERVER__URL=https://localhost:7036/elsa/api -p 14000:8080 elsaworkflows/elsa-studio-v3:latest
Copy link

glime-ai bot commented May 24, 2024

To address the issue you're experiencing with the showDescription metadata not taking effect in the Elsa Workflow designer, it's important to ensure that you are setting the metadata correctly and that the designer supports the feature you are trying to use.

Based on the information provided, it seems like you are attempting to programmatically set the showDescription property on the activity metadata. However, the Elsa Workflow documentation does not explicitly mention a showDescription property that can be set in this manner. The metadata for activities is typically used for categorization and description purposes, and it's not clear if showDescription is a supported key for controlling UI behavior in the designer.

If you want to add a description to your custom activity that shows up in the designer, you should use the ActivityAttribute to annotate your activity class with the appropriate metadata. Here's an example of how to do this:

[Activity(
    Category = "Custom",
    Description = "This activity does something important."
)]
public class DoActivity : CodeActivity
{
    // Your activity implementation
}

This will ensure that your activity has a description in the designer. However, if you want to control whether the description is shown or hidden in the designer UI, this might not be supported directly through activity metadata. You may need to look into the designer's code or documentation to see if there's a way to control this aspect of the UI.

If the showDescription property is a custom feature you are trying to implement, you would need to modify the designer's source code to support this functionality. This could involve contributing to the Elsa Workflow project or maintaining your own fork with the desired changes.

Since you are using a Docker image for Elsa Studio, make sure that the version of Elsa Workflow you are using aligns with the documentation and that the feature you are trying to use is available in that version.

For more detailed guidance, you may want to check the official Elsa documentation, ask for help on the Elsa GitHub discussions, or create an issue if you believe there is a bug or missing feature.

This comment was generated by Glime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant