ForEach and While missing Iterator in designer?
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 { ... }
Yeah that would make sense. Not sure how that got removed.
@sfmskywalker even I am able see the OutcomeNames.Done but not OutcomeNames.Iterate in the workflow designer. But it suppose to be both outcomenames.

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);
}
It Resolved the issue.Thank You.
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' ]")]
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.

@jayachandra21 . Thanks a lot for helping. The issue is resolved now. Many thanks
#285 #303 at those pull request it's done, i think this issues can close.
Indeed. Thanks @mertyildiz41
Thanks for the fix guys.
Cheers, Martin
Kind regards, Martin Martin Clarke Index eBusiness Ltd +44 1252 636060 [email protected] www.indexeb.co.uk Index eBusiness Ltd is a company registered in England and Wales under number 07337877. Registered office: 182-184 Fleet Road, Fleet, Hampshire, GU51 4BS, United Kingdom. Index eBusiness Ltd accepts no liability for the content of this email, or for the consequences of any actions taken on the basis of the information provided, unless that information is subsequently confirmed in writing. Any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. From: Sipke Schoorstra [email protected] Sent: 29 October 2020 08:32 To: elsa-workflows/elsa-core [email protected] Cc: Martin Clarke [email protected]; Author [email protected] Subject: Re: [elsa-workflows/elsa-core] ForEach and While missing Iterator in designer? (#339)
Indeed. Thanks @mertyildiz41https://github.com/mertyildiz41
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/elsa-workflows/elsa-core/issues/339#issuecomment-718477341, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AM7CV3PGY7233FZB3SKXKYDSNESBLANCNFSM4OWPIRXA.