Вопрос

I am getting error when using invoke method in c# WWF

Here is my code:

namespace WorkflowConsoleApplication2
{
    public class TClass1
    {
        public  static String  update1(String name)
        {
            return  
            "Hello"+ name ;
        }
    }
}

and here is my invoke method with error: enter image description here

How to fix this problem?

Thank you.

Это было полезно?

Решение

You must pass the 'name' paramter to the Parameters property. http://msdn.microsoft.com/en-us/library/system.activities.statements.invokemethod.parameters(v=vs.110).aspx There is a code example but you are doing your stuff through the WF designer (which is easier than code). Look at the properties for the activity for the Parameters property.

Другие советы

You have to declare that "update1" in the "Arguments" field present in the Workflow designer right below the workflow to pass that arguments to you Invoke Process. Once you declare that argument in the "Argument" field it won't show any error and you can use it to pass that argument to the invoke process. For reference You can use this link....

For passing arguments in Windows Workflow using designer

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top