0

我正在實施WF4服務。我想在app-fabric事件日誌中查看我的工作流程實例的關聯ID。 Basicaly我想寫自定義消息到應用程序結構。到目前爲止,我已經使用這個代碼,但沒有結果,將相關處理程序事件寫入AppFabric

protected override Contract1 Execute(CodeActivityContext context) 
{ 
     //........... 
      CustomTrackingRecord record=new CustomTrackingRecord(context.WorkflowInstanceId,"test  record...",TraceLevel.Info); 
      context.Track(record);  
     //..........   
} 

回答

0

我能通過配置跟蹤配置文件來完成我的要求。在tricking配置文件中,我添加了跟蹤變量。這是我如何做到的。

  <activitystatequery activityname="Process New Order"> 
       <states> 
        <state name="Closed"> 
       </state></states> 
       <variables> 
        <variable name="StatusText"> 
        <variable name="NewPurchaseOrder"> 
        <variable name="PurchaseTotal"> 

       </variable></variable></variable></variables> 
       </activitystatequery> 

更多有關impintantation的信息。 http://codetuner.blogspot.com/2012/02/workflow-foundation-4-app-fabric.html

1

我會在這裏賭的代碼發射跟蹤就好了,但你需要配置的AppFabric是一個跟蹤參與者挑選那些了。