문제

I can create arguments through the designer using the Arguments tab when editing activity XAML files. I can then pass arguments when invoking the workflow. This works fine.

However, in a rehosted WorkflowDesigner we do not have the Arguments tab (I wouldn't like my users modifying the arguments list anyway). So I'd like to WorkflowDesigner.Load() a workflow that has the arguments already set up, as a template from which to build workflows. Users could then still access the arguments while designing the workflow, perhaps on which to base FlowDecision conditions etc.

Is that at all possible? Should I rather be using Dynamic Arguments for this purpose?

Am I missing something here?

도움이 되었습니까?

해결책

Thanks to post: Show an activity into the designer? I was able to create an ActivityBuilder with properties:

Properties = 
{ 
    new DynamicActivityProperty { Name = "Account", Type = typeof(InArgument<AccountModel>) }
}

And Load() it in a WorkflowDesigner.

This this means that I can now force the AccountModel argument into any user created workflow.

I hope this comes in handy to anyone stuck with the same problem.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top