Roman_D
Roman_D

Reputation: 13

CS0103 error in Workflow Engine

I’m trying to integrate my own business logic into Workflow Engine .NET. In particular, I want to get the responsible employee from my business logic and send him an email. Here’s a piece of code in Code Action where the problem is:

var responsibleEmployee = AsperIo.EmployeeProvider.GetResponsibleEmployee(processInstance.ProcessId);

When I click compile I get the following error:

(1:27): error CS0103: The name 'AsperIo' does not exist in the current context

I was wondering whether anyone can help me figure out what seems to be the problem. Thanks.

Upvotes: 1

Views: 171

Answers (2)

Devanathan.S
Devanathan.S

Reputation: 1472

I also come across these kind of errors.In my case the target frame get conflicted. I had "netstandard2.0" After changing the target frame to the below it started working.

<TargetFramework>netcoreapp2.0</TargetFramework>

Upvotes: 0

Jan Guardian
Jan Guardian

Reputation: 313

Looks like you forgot to register your type with the engine. Try calling the following method from the WorkflowRuntime object.

_runtime.RegisterAssemblyForCodeActions(Assembly.GetAssembly(typeof(AsperIo.EmployeeProvider)));

Upvotes: 1

Related Questions