I've created new workflow that works just like Solution Starter Dynamic Workflow ( I need to have two instances of the same wf). Problem is, in new workflow, when I click on "Submit", workflow breaks.
Error is in the following function:
protected override System.Workflow.ComponentModel.ActivityExecutionStatus Execute(System.Workflow.ComponentModel.ActivityExecutionContext executionContext)
{
var psiService = executionContext.GetService<IProxyPSIService>();
Approvers = psiService.GetGroupMembers(
ApprovalInfo.GroupsUids,
ProjectWorkflowContext,
ApprovalInfo.FilterByDepartment);
Approvers.AddRange(
psiService.GetUsers(
ApprovalInfo.UsersUids,
ProjectWorkflowContext,
ApprovalInfo.FilterByDepartment));
Approvers = Approvers.Distinct().ToList();
InitEmailService(executionContext);
return base.Execute(executionContext);
}
executionContext.GetService<IProxyPSIService>() returns null.
I haven't defined any of Service References in project (because I don't know what to define, I can not open Service Reference in old workflow).
Any idea what could be the problem?