I'm implementing a WF4 service. I want to see the correlation Id of my workflow instance in app-fabric event log. Basicaly I want to write custom message to app fabric. So far I have used this code but no results,
protected override Contract1 Execute(CodeActivityContext context)
{
//...........
CustomTrackingRecord record=new CustomTrackingRecord(context.WorkflowInstanceId,"test record...",TraceLevel.Info);
context.Track(record);
//..........
}
I was able accomplish my requirement by configuring tracking profile. In tricking profile I have added tracking variables. Here is how I did it.
<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>
More details about the implimntation. http://codetuner.blogspot.com/2012/02/workflow-foundation-4-app-fabric.html