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

ForEach and While missing Iterator in designer? #339

Closed
martin-indexeb opened this issue Jul 10, 2020 · 10 comments
Closed

ForEach and While missing Iterator in designer? #339

martin-indexeb opened this issue Jul 10, 2020 · 10 comments
Labels
activity This issue relates to a workflows activity bug Something isn't working

Comments

@martin-indexeb
Copy link

Should the ForEach and While activity classes have 'Iterate' and 'Done' outcomes set in the attribute declaration? At the moment I'm not seeing the Iterate option in the designer.

e.g.

[ActivityDefinition(
    Category = "Control Flow",
    Description = "Iterate over a collection.", 
    Icon = "far fa-circle", 
    Outcomes = new[] { OutcomeNames.Iterate, OutcomeNames.Done })]
public class ForEach : Activity { ... }

instead of

[ActivityDefinition(Category = "Control Flow", Description = "Iterate over a collection.", Icon = "far fa-circle")]
public class ForEach : Activity { ... }

@martin-indexeb martin-indexeb changed the title ForEach and While missing Iterator? ForEach and While missing Iterator in designer? Jul 10, 2020
@sfmskywalker
Copy link
Member

Yeah that would make sense. Not sure how that got removed.

@sfmskywalker sfmskywalker added bug Something isn't working activity This issue relates to a workflows activity labels Jul 11, 2020
@jayachandra21
Copy link

@sfmskywalker even I am able see the OutcomeNames.Done but not OutcomeNames.Iterate in the workflow designer. But it suppose to be both outcomenames.
image

@martin-indexeb
Copy link
Author

Jayachandra21, depending on how you are using the designer, you can always patch this manually for now with something like this:

public Task<ActivityDescriptor[]> GetActivityDefinitions() {
      var patchControlFlows = new List<string>() { "For Each", "While" };
      var definitions = _options.Value.ActivityDefinitions.ToArray();
      definitions
        .Where(x => patchControlFlows.Contains(x.DisplayName))
        .Each(x => x.Outcomes = new[] { OutcomeNames.Iterate, OutcomeNames.Done });
      return Task.FromResult(definitions);
}

@jayachandra21
Copy link

jayachandra21 commented Jul 14, 2020

It Resolved the issue.Thank You.

@nimishdesai1989
Copy link

Hello. I have a similar problem. Can someone tell me where to paste this above code to solve the issue ? I can see this in the attribute declaration for the dev branch that I pulled in today.

[ActivityDefinition(
Category = "Control Flow",
Description = "Iterate over a collection.",
Icon = "far fa-circle",
Outcomes = "[ 'Done', 'Iterate' ]")]

@jayachandra21
Copy link

Hello. I have a similar problem. Can someone tell me where to paste this above code to solve the issue ? I can see this in the attribute declaration for the dev branch that I pulled in today.

[ActivityDefinition(
Category = "Control Flow",
Description = "Iterate over a collection.",
Icon = "far fa-circle",
Outcomes = "[ 'Done', 'Iterate' ]")]

@nimishdesai1989 Paste the above code in the Activity Definition section. Please refer screen below for your reference.

image

@nimishdesai1989
Copy link

@jayachandra21 . Thanks a lot for helping. The issue is resolved now. Many thanks

@mertyildiz41
Copy link
Contributor

#285 #303 at those pull request it's done, i think this issues can close.

@sfmskywalker
Copy link
Member

Indeed. Thanks @mertyildiz41

@martin-indexeb
Copy link
Author

martin-indexeb commented Oct 29, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
activity This issue relates to a workflows activity bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants