Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top