The only way I found was to wrap the sequence into a DynamicActivity and to pass parameters to the WorkflowApplication (or WorkflowInvoker) :
Activity1 act1 = new Activity1();
act1.Arg1 = new InArgument<collection><string>>(new VisualBasicValue<collection><string>>("MyVals"));
Sequence seq = new Sequence
{
Activities = { act1 };
}
DynamicActivity da = new DynamicActivity()
{
Name = "test",
Implementation = () => seq,
Properties =
{
new DynamicActivityProperty()
{
Name = "MyVals",
Type = typeof(InArgument<collection><string>>),
Value = null
},
}
};
WorkflowInvoker.Invoke(da, new Dictionary<string,> { { "MyVals", new Collection<string>{ "a", "b", "c" } } });</string></string></collection></string></collection></string></collection>
So much code just to pass a list...