WF4 GetBuildDetail Result is null
I have the following code:
WorkflowInvoker invoker=new WorkflowInvoker(new GetBuildAgent{
DisplayName = "Agent abrufen"});
var buildAgentOutputs =invoker.Invoke();
var detail = WorkflowInvoker.Invoke(new GetBuildDetail { DisplayName =
"GetBuildDetail" });
invoker = new WorkflowInvoker(new GetAssemblyVersion {
DisplayName = "Aktuelle Assembly-Version",
AssemblyInfoFileMask = "AssemblyInfo.*",
BuildDetail = new InArgument<IBuildDetail>((ctx) => detail)
});
invoker.Extensions.Add(detail);
var assemblyVersionOutputs = invoker.Invoke(); // <-- null exception
Ath the bottom line an error is thrown because of the fact that detail is
null (line 3).
In the workflow designer I am able to put the GetBuildDetail-Activity onto
the designer. But now I want to do this via c#-code. What I am doing
wrong? I have to say that in the designer the GetBuildDetail-Activity is
inside an agent-scope. And the agent scope is insight a sequence. But I do
not know how to realisze that in the code.
One more information: GetAssemblyVersion is an custom activity that works.
Is used in other workflow templates. That error is that GetBuildDetail is
somehow not working out of the code :(
Am I missing sth.? I am stuck with this problem since 3 days and can't get
through this. Please help.
No comments:
Post a Comment