There are sometimes circumstances (ahem, ServiceDesk) which require that we open a published Workflow file. By deleting or otherwise adjusting the “project.deployed” file name that sits in the published project directory, we are able to “unlock” that project for editing in the Workflow designer.
Workflow Basics
“Object reference not set…” – Salvaging a Busted Project
It’s been a while since the last post – I’ve been busy with an Endpoint Summit (I’ll post the likely embarrassing video after Symantec does) and several customers, and my free time has been consumed with family and Dark Souls II. So it’s past time that I post something.
During a working session with a customer two weeks back, I ran into something I haven’t seen in a while. After making some major changes with data types and mapping in the project, I attempted to spool the debugger, and got this:
Now, once upon a time, this error meant to me that “oh crap, there goes an hour’s worth of unsaved progress”, because this problem prevents saving the project as well. While I don’t have a sincere diagnosis for the problem, I certainly figured out the hammer as a solution.
Workflow Short – Personalizing Workflow Component Defaults
I use the Embedded Rule Model a lot. Excessively so. Although configuring it takes only a few actions, after personalizing the component, all I need to do is drag and drop and it’s ready to use.
In my environment, I’ve done the same for the Hanging Path Trigger component, among others.

Workflow Short – Validating Whether Values Exists

Whether this is a great, or extensible, or lazy, or short-sighted solution is likely quite debatable. However, I use this method for nearly every variable evaluation, and have never had a terrible issue with it.
Let’s set up a situation — say you’re doing a search for a set of values in a SQL table. The results need to be mapped to another variable, but if there are no results (null), the mapping component fails. We need to verify that a value exists prior to leading the data to the mapping component.
Keeping a Tidy Workflow Canvas
Have a look at two examples of sprawling processes, and imagine trying to make sense of them. The first I can take credit for; the second, I can only take credit for grabbing a screenshot when I saw it.

Let’s take a look at how to keep a readable, usable Workflow canvas, and untangle that spaghetti.
Workflow Basics – Modular Workflows

After I gained a bit of experience with Workflow, I began to attempt to tackle more complex processes. While developing these, I ended up with a sprawling mess of a canvas, duplicate evaluations and actions, and path lines jumping all over the place and each other. It was at that point that another, more experienced Workflow developer showed me the importance of modular processes, how to configure them, when to use them, and the difference between model types.

First helpful rule: if using the “fit to screen” zoom button renders the Workflow tiny and indecipherable, then you could likely benefit from some linked or embedded models. We’ll go over the different types shortly.
Second helpful rule: the easiest way to simplify the sprawl of a workflow is to group components into Embedded Rule Model components. Embedded Rule Models are like using folders to sort a stack of random documents on your desk into a nice, neat filing system.
Workflow Basics – Form Validation

So you’ve built a form, and you want to validate the user’s input? I decided a long time ago that I’m not satisfied with Workflow’s use of the standard window.alert dialog:

In this article, I’m going to go over the methods I use for Workflow popup boxes, and in particular, validation error messages. An example of a validation error message box:

Concepts Primer – Using Javascript in Workflow Forms
The first exposure I had to implementing javascript actions in Workflow processes was when claus66 posted a solution in this post on Symantec Connect. The question that was posed was, how is the “Enter” keystroke captured and used to automatically click a specific button? The answer in that post:
if (event.keyCode == 13){ event.returnValue=false; event.cancel = true; btnEnter.click(); }
At the time, I had no idea how it worked, just that it did. Afterwards, I looked for opportunities to test other ways I could use javascript to enhance the user experience for my forms.
Concepts Primer – Integrating SQL Data with Symantec Workflow
SQL integration of some sort has been involved in almost every project I’ve done. Saving and fetching data is just part of it; the SQL engine can be used to quickly do calculations and filtering for your data with the right scripting. If I’m able to fetch and filter the appropriate data from SQL to begin with, I don’t have to then run through a Configurable Collection Filter to get the results I want.
Basics – Variable Efficiency: Declaration and Source
Buried in this process are way too many static values (not to mention that this screenshot will be a great illustration for my “Making Modular Workflows” article I’m working on).

When I first started developing Workflows, especially processes that integrated with other systems (SQL in particular), I would occasionally run into this:
“Hi Andrew, we need to move the SQL server you’ve integrated with. Here’s the new connection info. Hope it’s not a big deal. You declared your connection string variable up front, right?”
Oops. Well, dozens of components buried in layers of embedded models later, I had updated all the SQL components. Except this time, I used a project property. The next time the SQL connection string needed to change, I updated a single value, published, and enjoyed the success.