Haven’t had much chance to update this site recently….Teaching a workflow development class tomorrow through wednesday in Vianen, Netherlands after two straight weeks of Alchemy classes, also in the Vianen office. I am hoping to get some more traveling into the schedule soon, but for the next month or so all my classes are close to home in the Netherlands.
One of my other colleagues thought my suggestion was a bad idea. I agree…for the exact scenario I described, I may have over engineered the problem and solution. An easier way to solve this particular problem would be to simply assign the task to two people. The first one to approve finishes that task and the workflow moves on. But what if you actually want one of two paths of tasks to complete. Whoever finishes first negates the need for the other path. Or maybe you want to use the canvas to visually see which path was taken. Perhaps the most value out of my example should come from learning about the Business Rule action. Using this action, you can easily allow another action to fire if a condition is met, otherwise fire another action. Anyway, keep it in mind for a workflow problem you may have in the future.
Yesterday a colleague asked me a question about a simple scenario in Captaris Workflow. Here it is: You have a simple workflow with 4 steps. The first leads to two in parallel, then both of those lead to the fourth. The two in parallel are approvers, perhaps of a document. You only need one approval to move forward. By default, Workflow requires approval from both to move forward, so how can you arrange it so only the one approval is required? It all comes down to the Business Rule Action.
First of lets create our test workflow. I drag and drop four webform tasks onto the canvas and name them First Task through Fourth Task. Now link all the tasks as shown:
Now create two webforms. One should just be the basic default form with the submit buttons. For the other, add a pair of radio buttons in the same group, and label them True and False. Create a single XML element called Approved, then bind that to the True Radio Button. Drag and drop the basic webform to the First and Fourth tasks and the other one to the Second and Third tasks. Note that so far we have done NO coding, just drag and drop, and clicking a few times.
If we run the workflow now, nothing special will happen. When we approve the second task, the workflow will wait for the third task to complete, but that’s not what our scenario demanded. So now we need to add an action to both the Second and Third tasks. From the Toolbox, drag and drop the Business Rule Action to the Complete event on those two tasks. Specify that the Business Rule should check to see if the Approved XML element has been set to True. Now here comes our one line of code. Right-click on the canvas and choose the script view. For the code block for the Second Task Complete event, add the following line:
Add the corresponding line for the ThirdTask Complete event as well (OK, there are two lines of code, but it’s pretty much the same line so it doesn’t really count).
Now if we run the workflow and choose False on the Second (or Third Task), the other of the two will have to run. If we choose True, then the other task doesn’t have to run and it goes straight to the Fourth task.
This is a simple use of the Business Rule Action. If you look closely at the action that gets dropped on your canvas, you’ll notice a check mark and an x in that little diamond. Try dragging and dropping another action onto either the check or x. If the Business Rule evaluates to True, then it runs the actions under the check (or in our case, runs our single line of code). Otherwise it runs the actions under the x. Pretty cool and so damned easy…
It turns out there is a secret toll you need to pay when you move to the Netherlands. This is a toll they never tell you about until you get the bill. The toll that I am referring to is how much the Customs people are going to charge you in bogus VAT charges. Customs will go through your stuff to verify that you are only shipping household goods and are not shipping stuff to be resold: fair enough. Everything I sent was stuff that had been used in my apartment in San Francisco for several months at least and I wanted to continue using in my apartment in Amsterdam. My mistake though was to keep the original boxes for any valuable electronics.
I have a unit from Sonos for distributing music around my apartment. I had gotten so used to having them in SF that the last three months in my pad without them has been difficult. But the movers notified me a few weeks ago that Customs found the box and would be charging me over 100 Euros for VAT (That’s the European abbreviation for tax for you Yanks out there). The fact that I had them for several months didn’t really matter. If I had a receipt for them I could avoid having to pay, but how many of you move to a new location with 3 suitcases of everything you need for 3 months, and carry all of your receipts for everything you own in those bags too???
I guess it could have been worse. They could have charged me for the LCD monitors I have had for a year, or the slide scanner I have had for 4 years, or all the books or CDs I shipped. I guess I wouldn’t have minded if they just called it a Customs Search Fee and charged everyone a flat rate of 100 Euros. My problem is that this is because according to them I bought these units then shipped them with a mover to simply avoid paying VAT in the first place. Ugh.
So I guess the moral of the story is, if you are moving to the Netherlands or maybe to Europe in general, throw away the original boxes for all electronics and let the movers pack everything in their own boxes.
I use Virtual PC for my job all the time. I have spent quite a lot of time using the tool both at Captaris and during my time at Microsoft. But in all that time, I never noticed that you could right-click on the little icons on the bottom left of the window. Right-click on the first icon, and you get HD options. On the CD you get CD options, the floppy gets floppy options, etc. Yeah, all of this is also accessible from the Options menu, but this is one click. Very cool…