前回の続きのようになりますが、「WorkflowWithParameters」。
WFSamples\Technologies\BasicWorkflows\WorkflowWithParameters

条件判断で使う値をパラメタとして渡したいと言う場合に、CreateWorkflowメソッドに名前付き引数を渡すことができますと。

‘ Set up the parameters
‘ “amount” is an “in” parameter and specifics the order amount
‘ if the amount is < 500 the status will be “approved” “rejected” otherwise
Dim parameters As Dictionary(Of String, Object) = New Dictionary(Of String, Object)()
parameters.Add(“Amount”, Convert.ToInt32(args(0), CultureInfo.InvariantCulture))

‘ Get the workflow type
Dim type As Type = GetType(SequentialWorkflow)

‘ Create and start an instance of the workflow
currentWorkflowRuntime.CreateWorkflow(type, parameters).Start()

こんな感じで、ワークフローが持っている「Amount」プロパティに値がセットされているのと同様になると言う感じです。Genericってまだあまりよく分かっていないんですよね。使えそうな雰囲気は伝わってきました。