Workflow 4 tracking records viewer - workflow

there was an application called 'WorkflowMonitor' that was included with the samples kit for workflow 3 which gave you a visual playback through previously run workflows.
The tracking records that app works against appear to be a different shape to those in workflow 4, is there a similar viewer that anyone knows of that can give me an insight into previously run workflows in workflow 4?
I am really just looking for the best way to interpret the data, the Workflow Monitor would have been perfect, but appears to be incompatible now.
Thanks,
Dave.

I know near to nothing about WF3 but, based on your request, you might want to start by downloading this WCF/WF Examples package.
Take a look at WF\Application\VisualWorkflowTracking solution to see a visual tracking system in action.
See also the concept of Workflow Tracking Participants on WF4, on these links:
Workflow Tracking and Tracing
Tracking Participants in .NET 4 Beta 1
A small introduction from the first link:
Windows Workflow tracking is a .NET Framework version 4 feature
designed to provide visibility into workflow execution. It provides a
tracking infrastructure to track the execution of a workflow instance.
The WF tracking infrastructure transparently instruments a workflow to
emit records reflecting key events during the execution. This
functionality is available by default for any .NET Framework 4
workflow.
The examples package contains a bunch of example code about tracking on WF_WCF_Samples\WF\Basic\Tracking folder.

#Jota's answer is a good one, you should look at those examples. The visual tracking example is kind of a mess though. A few of us of done some different variations that separate the running of the workflow from the viewing of the tracking data.
http://geekswithblogs.net/JoshReuben/archive/2011/06/07/workflow-4.0.1-statemachine—distributed-tracking-visualization.aspx
https://github.com/PeteGoo/Workflow-Service-Tracking-Viewer
and my own version with signalR but based on the visual tracking sample
http://panmanphil.wordpress.com/2012/11/05/slides-and-sample-from-the-chippewa-valley-code-camp/
Looks like you have some reading on your hands.

Related

Visual Tracking of Executing WF Workflows

My workflows are hosted within a windows service. I like to know how to visually track the execution of these workflows. The Visual UI should update when the workflow has moved from one state to another, I have looked at the sample provided by msdn which visualize the workflow that it is actually executing which is not what I am looking for. Any help would be much appreciated.
Unfortunately you have to roll your own. I've had some success reading from the AppFabric tracking database and producing a display using Graphviz (http://graphviz.org).
There's some information here on trying to use the WF designer to visualise a remote workflow - basically trying to rehydrate the Activity objects. http://blogs.msdn.com/b/tilovell/archive/2011/06/08/wf4-visual-workflow-tracking-and-workflowinspectionservices.aspx

How to divide up a complex workflow into a template of Sub Tasks?

Our company is moving over to Jira for all project management and issue resolution
We have a few major uses that i am trying to build templates for. One being a typical issue found and fixed and can easily be handled with a single issue with basically the included jira workflow.
A more complex one is following a Waterfall workflow where Requirements are gathered including an estimate. Then Development kicks off, and in parallel test scripts are made. After Development is done the project is tested and handed off to the client. And finally once all is tested we release the change and re-test. In total I have 30 different steps built across 5 Sub-Tasks (However this is all just mapped out in Visio and not actually in jira yet).
The splitting across Sub-Tasks I hope can accomplish 2 things. First is that we want to track open-close times and efforts (hours works and days needed). And we should have the workflow split to multiple people so the Developer can work while a Tester can build their testing plan. That is able to save a few days, however is not a deal breaker.
So a few questions that I hope can help make this possible, although I am quite new to the various add-ons for Jira, I have no idea if we will get everything we want.
1, Is there an add-on that builds templates of Sub-Tasks, since each Sub-Task needs its own workflow. Currently the rules for Jira is to assign a workflow based on Project+Issue Type. So I believe I can have the proper piece of the workflow assigned to each Sub-Task by creating many Issue Types, like "Custom-Dev-Analsys" for the Sub-Task called Analysis
2, Is it possible to have only 1 or a few of all Sub-Tasks being the "current" one? When the issue starts the first Sub-Task should be the only one worked on, with only 1 of the steps being assigned to someone. After sign-off there should be 2 Sub-Tasks, the Development one and building Test Scripts. But all 5 sub-tasks should not be started since the very beginning, but it seems thats what Jira will do. I have looked at the add-on "Structure" and while that has unlimited hierarchy, I do not think it will let the sub-tasks open up in order. There might be a simple way to make the workflow open the next task (I am very new to workflows and trying to learn as much as possible before messing with our site)
3, If anyone can think of some way to do what I need differently, I am all ears.
Thanks!
I don't know any plugin that does all what asked for, but I had to deal with similar issues, and managed to sort most of them out with the Jira Scripting Suite, but it did require some development (using python).
It's easy to add to your workflow transitions that will create or close a new issue or a new subtask. I use it to create subtasks just by filling some required fields in one of the issue's screens. After the sub-tasks are created, only the automated scripts can close the issue, and that can be done by closing all of the subtasks.
If this kind of solution suits you I will be happy to help with any further inquires.
JIRA doesn't support nested workflows but one useful thing to remember is that if you change the issue type of a JIRA issue, it can have a different workflow. So an issue could start as TEST-123 which is a Requirement. Then after it reaches the end of its workflow it could be Moved to be a Task issue type.
Subtasks should stay as before.

Persisting an Approval Process to SQL

I'm starting work on a small web based request system which needs to implement a two-step approval process (C# mainly, most likely MVC3).
I have come up with a simple workflow diagram and can easily come up with code to move from step to step. However, I'm having trouble coming up with a way to persist workflow related "tasks" or "steps" in the database.
For a request, an admin would approve/deny it when it comes in, then it's goes into "working" state. At compeletion, user is requested to approve/deny "QA" step.
Can anyone provide some directions on this?
I don't want to use Windows Workflow Foundation, since I don't have time to learn yet another new framework. And Google is not being too helpful, any mention of the word "workflow" keeps bringing results for WF.
Learn WF.
Why? All you're doing by inventing your own new framework is forcing the next people to maintain your code (or those who work with you) to "learn yet another new framework," as you so put it. Do you want to write all that new documentation or do you just want to point someone to MSDN?
WF4 is actually pretty easy to learn, way better than WF3. Before you throw away the idea completely, at least read this:
A Developer's Introduction to Windows Workflow Foundation (WF) in .NET 4
http://msdn.microsoft.com/en-us/library/ee342461.aspx
If you're looking at a web based system, you may use Windows Server AppFabric to provide the persistence and monitoring layer and a WCF workflow service to host the workflow. The time you spend learning the basics of this will be far less than the time you spend inventing your own system. I guarantee it. You can install AppFabric via the Web Platform Installer tool along with SQLEXpress to persist.

Workflow Foundation suitability

I need to build a workflow based solution and need some advice.
First of all, there should be a canvas style editor where a user can create workflows. Then, they will be used in a form based workflow process, where the user answers questions and the system will guide them through the steps based on the workflow. There can also be actions, such as sending emails.
The question is: can WF be used for this? I need to use the MS stack.
Any idea would be appreciated.
Yes, you can use workflow to do this.
For the execution part it seems a very good fit.
For the end user designing workflows it depends. The workflow designer used in VS2010 can be rehosted in your own applications without to much work. It is a WPF control though so the client application needs to be able to load and display WPF controls. This rules ASP.NET and Silverlight out but will work fine with WinForms and obviously a WFP app.
Another thing with the designer is that you have to enter VB expressions and in the rehosted designer there is no IntelliSense making this a lot harder. Well there is a workaround for that but it requires VS2010 DLL's. And the expressions can be anything you can do in .NET so that includes potential nasty things like Process.Start().
The rehosted designer is actually very to use, and since all the artifacts for constructing your workflow are provided.

Please confirm: Is Windows Workflow Foundation a good horse to be backing right now?

We are in the process of selecting a workflow solution for a company that uses Microsoft products end to end. Given the news on WF4, in that it seems to be essentially a rewrite of previous versions, is it a wise move to back the current version or should we be looking elsewhere?
Ie - is the current version so bad that we would not be wise to try and use it?
Haiving just launched a project which .NET 3.5 and workflow I'd say that the current release of WF is good enough to use and run with. It has helped us to get a product out quickly (we have the usual feature creep and requirements changing weekly). However, I have a list of complaints with it:
The workflow designer will drive you insane because it is so slow (in certain circumstances) and re-arranges your state machines as it sees fit.
There is no built in upgrade strategy for keeping your old workflows running once you do a bug fix release. If you are going to use WF think carefully how to do upgrades early.
Itegrating with WCF (the send and recieve activity) hide the WorkflowRuntime from you this makes it very difficult to understand what is going on on the hood.
Its not easy to unit test them. There are ideas out there but none seemed particulary easy when we started this WorkFlow Unit Testing
I like the ideas and potential of Workflow based development, however I am not in a hurry to repeat this experience and would probably stick without it for long running processes. One place I would use it again would be in a short, complicated process (like a rules engine for working out prices).
Maybe it is a little late for you, but now that WF 4.0 is released in beta, other people thinking the same question can consider backing the 4.0 horse instead of 3.5 horse.
This goes some way to fixing the following problems:
•The workflow designer will drive you insane because it is so slow (in certain circumstances) and re-arranges your state machines as it sees fit.
[Designer Perf Improved]
•Its not easy to unit test them. There are ideas out there but none seemed particulary easy when we started this WorkFlow Unit Testing
[I think it's a little easier now, some of the introduction to workflow samples include plenty of unit testing]
My understanding is that Microsoft will provide backwards compatibility and/or a migration strategy to the new WF, so I would guess that you are safe to use it. However, I have heard from other developers in my organization that the current version of WF is extremely painful to use. If you have the budget (and depending on the complexity of your workflows), you may want to consider K2: http://www.k2.com/en/index.aspx
I, as a workflow developer, think that current version is painful to use. This is not surprising as this is a v1.0 software out from microsoft :)
I think you should first consider your expectations from a workflow software. Do you have a well defined list of expectations from WF? Acutally I am wondering content of such a list. Maybe we can help more detailed on each topic.
I don't know why people have such negative impressions about WF. Sure it has it drawbacks, but I thought it was pretty useful. The one major issue I have about it is the lack of support for upgrading existing workflow (bullent #2 in gbanfill's list).
Another point to use the current version is that "Dublin" (Microsoft new App Server) will be built on WCF & WF .NET 4.0 but will gladly host 3.5 WF's. So you will be able to migrate to that without a rewrite.
Just a quick note to mention that Visual Studio 2010 CTP contains a new updated WF designer as part of the Oslo objective.