[go: nahoru, domu]

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

Call more UserTask in a foreach loop #310

Open
Mythos1979 opened this issue May 16, 2019 · 3 comments
Open

Call more UserTask in a foreach loop #310

Mythos1979 opened this issue May 16, 2019 · 3 comments

Comments

@Mythos1979
Copy link

Hi,
I'm using a foreach condition to iterate a collection by a certain step (LivOperativo1_RicOfferte). For each iteration I want to add the current element of iteration (1,2,3 or 4) in the 'prompt' variable of the UserTask create. It's possible?

Under my test code:

public void Build(IWorkflowBuilder builder)
{
builder
.StartWith()
.ForEach(list => new List() { 1,2,3,4})
.Do(then =>
then.StartWith<LivOperativo1_RicOfferte>()
.Input(step => step._processo, data => data)
.Input(step=> step.Item, (list, context) => context.Item)
.UserTask( "Task number:" + "[1] or [2] or [3] or [4]" , assigner: data => "USER/User1")
.WithOption("YES", "Complete").Do(then2 => then2
.StartWith(context => Console.WriteLine("Task Complete" + Environment.NewLine)))
)
.Then();
}

Thanks
Massimo

@danielgerlag
Copy link
Owner

Currently, the parameter for the prompt does not take an expression... that is something we'd have to add.

@sunilsoniudaipur
Copy link
sunilsoniudaipur commented Apr 8, 2021

is there any way by which we can achieve multi user tasks, I tried to create, multiple tasks in the loop, tasks are created, but user remain same, unable to understand, I assign the user.
also I am getting mails for two different user, when I see pending user tasks there are two tasks but all the values are same so it is bit confusing.
@danielgerlag need your help

@ihuangxing
Copy link

@danielgerlag

I also need your help on this issue.

How to generate multiple user tasks in a loop, and the assigner is from foreach item.
`
.ForEach(x=> x.Users)
.Do(x=> x
.StartWith(_=> ExecutionResult.Next() )
.UserTask("approve", d=> context.item)
)

`

Tks.

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

4 participants