locked
Conceptual Question: Persistence and Tracking RRS feed

  • Question

  • Hello everyone,

    I have a question that I'm hoping will clear a lot of things up for me.  In WF 4, we have tracking and persistence.  I understand that these are supposed to be very different concepts, but maybe because of my own terminology, I am having trouble getting the responsibilities of the two straight in my head.

    Given a simple example like a vacation request workflow that requires one or more approvals from management... 

    I understand that at its foundation, the persistence built into WF is to give us the capability to have long running workflows...we send an email to someone and give them X days to respond.  Persistence allows us to do this without the need to keep everything in memory. 

    However, to satisfy a requirement such as "The vacation requests and the workflows associated with the requests should be stored for long-term retrieval and reporting".  Does this use persistence, tracking, or both?  In addition, how would I save the version of the XAML workflow process used for this long-term retrieval and reporting?  Would it be persistence or tracking?

    Thanks a lot,
    Greg Andora
    Thursday, December 17, 2009 5:36 PM

Answers

  • Hi Greg, 

    tracking and persistence are 2 different things. 

    Persistence is exactly as you said above, meaning the you can make a snapshot of your activity on a storage to unload it from memory, free up resources and make the serialized instance available to other nodes for scalability as well as survive system restarts, and so on.

    Tracking, on the other side, refers to the ability to hook the runtime execution and "understand" when a specific event occoured. You can for instance write on a "log" and make a history of what is happening on your workflows... for instance to build a sort of "dashboard" where you see the status of your workflows... -or- to make a statistic and display a dashboard.

    I use tracking to show the list of all the workflows with their real-time status. I am able to see what is the last activity they completed, when, and also you can track additional records on the tracking partecipant by adding custom records... take a look at the samples"WF\Basic\Tracking".

    Hope it helps,
    Cheers.

    Adriano
    • Proposed as answer by Adriano Trevisan Thursday, December 17, 2009 10:28 PM
    • Marked as answer by Greg V Andora Thursday, December 17, 2009 10:33 PM
    Thursday, December 17, 2009 10:28 PM

All replies

  • Hi Greg, 

    tracking and persistence are 2 different things. 

    Persistence is exactly as you said above, meaning the you can make a snapshot of your activity on a storage to unload it from memory, free up resources and make the serialized instance available to other nodes for scalability as well as survive system restarts, and so on.

    Tracking, on the other side, refers to the ability to hook the runtime execution and "understand" when a specific event occoured. You can for instance write on a "log" and make a history of what is happening on your workflows... for instance to build a sort of "dashboard" where you see the status of your workflows... -or- to make a statistic and display a dashboard.

    I use tracking to show the list of all the workflows with their real-time status. I am able to see what is the last activity they completed, when, and also you can track additional records on the tracking partecipant by adding custom records... take a look at the samples"WF\Basic\Tracking".

    Hope it helps,
    Cheers.

    Adriano
    • Proposed as answer by Adriano Trevisan Thursday, December 17, 2009 10:28 PM
    • Marked as answer by Greg V Andora Thursday, December 17, 2009 10:33 PM
    Thursday, December 17, 2009 10:28 PM
  • Thanks a lot Adriano, that is how I figured it was, but I keep using "persist" to describe that I want the data about the incidents long after the fact and it was just messing things up in my head.

    Thanks again,
    Greg Andora
    Thursday, December 17, 2009 10:36 PM