Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7442691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:12:51+00:00 2026-05-29T11:12:51+00:00

I have a task to add logging functionality to the existing workflow based solution.

  • 0

I have a task to add logging functionality to the existing workflow based solution. There is a layered architecture : BusinessLayer->AgentLayer->StoreLayer. At the business layer there is a xaml activity which consists from a one or more agent activities. Agent activity consists from one or more store activities. Agent and Store activities are inherited from CodeActivity.

Activities are executed by

WorkflowInvoker.Invoke(activity);

My task is to log the execution of each activity. The log output. should be e.g.

BusinessActivity1 has been started at 11:00 8.2.2012
AgentActivity1 has been started at 11:01 8.2.2012
StoreActivity1 has been started at 11:02 8.2.2012
StoreActivity1 has been ended at 11:03 8.2.2012
AgentActivity1 has been ended at 11:04 8.2.2012
BusinessActivity1 has been ended at 11:05 8.2.2012

So my question is what is the best practise to log something like this. I don’t want to write the LogMessage to the each activity. I prefer the unified solution. Is there exists any clever solutions?

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:12:52+00:00Added an answer on May 29, 2026 at 11:12 am

    WF already supports a logging structure which it calls WF Tracking. You would be wise to just follow the existing infrastructure so you don’t incur any unnecessary performance overhead.

    You need to look at how to incorporate TrackingParticipants. You will need to replace the WorkflowInvoker.Invoke() with WorkflowApplication (or create an instance of WorflowInvoker) so that you can add your custom TrackingParticipant via WF Extensions. By defining a TrackingProfile you can restrict the tracking messages to only those which you are interested by trace level, event type, and tracking record.

    If you wish to log your own custom TrackingRecords, you can derive from the base TrackingRecord.

    Alternatively – you could build a wrapping custom activity as suggested by @Gabocat, but this will incur additional performance overhead that WF Tracking would not.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very simple task: add the contents of a textField to an
I have recently been given a task to add the ability to interact with
I have a task - add round corners to HtmlPanelGrid. Now I am trying
my current project is based on Entity Framwork code-first. I have three types: Task,
I have this code: Dim Tasks As New List(Of Task) Tasks.Add(Task.Factory.StartNew(Sub() 'Do whatever End
I have a task to add a composite widget into the main ui.xml file,
I have one command button for task add to cart, it means when items
I am new this sharepoint development and i have task in hand to do
I have this Task model: class Task < ActiveRecord::Base acts_as_tree :order => 'sort_order' end
I have a task and I want to generate some code using the CodeDom.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.