Visual Tracking of Executing WF Workflows - workflow

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

Related

Workflow 4 tracking records viewer

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.

What is a good tool for Build Pipelines?

I need a tool that will graphically represent our build pipeline. The below screenshots of ThoughtWorks Go and the Jenkins Pipeline plugin illustrate almost exactly what I want it to look like.
The problem is that we already use Jenkins for our builds and deployments, along with a few other custom tools for orchestration type duties. We don't want a pipeline tool to do the builds or deployments itself, it just needs to invoke Jenkins! I tried out Go, and the first thing it asked for is where my source code is and how to build it. I couldn't get Go to work in a way where Jenkins does the builds but Go creates the pipeline.
I've also experimented with the Jenkins Pipeline plugin, but it's very limiting. For one, it doesn't work with the Join plugin (so we can't have jobs run in parallel, which is a requirement). It also assumes that all of our tasks happen in Jenkins (Jenkins can't see outside of our test lab and into our production environment). I don't know if this is a viable option either.
So, does anyone have any recommendation for some pipeline tools that will do what I'm looking for?
Edit (03/2018)
Since writing this question in 2012 and answering it in 2014, numerous tools have come online to support what I originally wanted. Jenkins now supports scripted pipelines natively and has an excellent UI (Blue Ocean) for rendering them. Those stumbling on this question should consider using these for their pipeline needs.
https://jenkins.io/doc/book/pipeline/
https://jenkins.io/projects/blueocean/
End edit
(Old answer)
It didn't exist when I asked the question, but Jenkins' Build Flow Plugin does exactly what I needed, and creates pipeline views very well.
https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin
Jenkins/Hudson can certainly be used to achieve a real pipeline.
You could use Go if you used a dummy material (an empty git repo, for example), and then used the API to trigger a pipeline and upload artifacts.
But, that's quite some effort, and you should probably only do that if you have a very good reason otherwise to use Go.
You can try with GoCD pipeline. It has very nice features for continuous delivery and has nice dashboard also which shows real time flow and status. Give a try.

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.

Workflow Tools Comparison?

There is a pretty strong need for us to design some workflows around various processes. The problem is none of us actually know any workflow technology yet, and finding good data to compare the available options has been tedious and not entirely fruitful.
So I figured I'd ask you guys.
The main technologies we are looking at are Windows Workflow Foundation and eDocs Workflow. What other options are there? Sharepoint 2007 has workflow functionality too, right? Is that just based on WF?
What are the pros and cons of the various technologies? How do they compare?
EDIT: Also, one feature the administrative types like with eDocs Workflow is that it provides a method for them to edit it themselves. I believe Sharepoint '07 does as well. Is there some other way to allow that with a straight WWF implementation?
Sharepoint and WF more like complementary technologies, designed as two different workflow authoring tools in the same ecosystem. There's a Sharepoint workflow designer, and a WF (Windows Workflow Foundation) workflow designer.
The Sharepoint designer is meant to be an Office-like workflow editing experience, easier to get started with, geared for non-technical types, and generates all the web forms automatically.
The 'WF' workflow designer on the other hand is actually a component of Visual Studio (by default - as Bernie says you can rehost it), and designed to allow programmers to be able to fully customize workflow, and integrate it with any other code/systems desired. Building and deploying sharepoint sites this way is still possible, through the use of 'Sharepoint Activities', but more complex.
If you take the former route, you can hopefully let the administrative types do their own basic customizations (up to the limits of that environment) without causing total chaos.
It is possible to 'rehost' the WF designer (the one from Visual Studio) in your own application, so that users can author workflows. There are a number of code examples on the web, the most important one from MS itself: http://msdn.microsoft.com/en-us/library/aa480213.aspx).
At some point, when evaluating WF, I implemented a demo application that did this and added some features and found that although it works, not everybody can understand and use the more difficult activities (like the policy activity) that require understanding of how the rules engine works.