New pics are up: http://tinyur…
Posted on May 6th, 2009New pics are up: http://tinyurl.com/clpv6w, Hong Kong, Thailand, and Tokyo
work smarter, not harder
New pics are up: http://tinyurl.com/clpv6w, Hong Kong, Thailand, and Tokyo
Checking out old Hong Kong today
One more day in Hong Kong & then off to Thailand for some diving!
Fung Wah to NYC to kick off the Asia trip. Staying up until the 10am flight to Hong Kong. http://twitpic.com/3fi97
During my stay in St. Thomas last year I had the opportunity to do a bunch of diving and was able to take some underwater shots. However, due to the way light is absorbed underwater at different depths colors fade to grey in the pictures. For example red disappears at only 15 ft. To compensate for this you can use lights, however, this is probably not an option for the casual underwater photographer. Another, less natural, solution is to simply add some of the color back in using Photoshop. While the pictures are not perfect (and you should do this manually) the action I’ve included at the bottom of this post can make a dramatic improvement on the images and at least allows you to quickly pick out the best shots. Also, I’ve included a link to a backscatter action as well which helps remove some of the noise caused by particles in the water.
Here are a few before/after pics:
Grey Angelfish
Ooooooh, barracuda (btw, these guys do NOT your camera flash, so photogs be warned– this one was 3+ feet long)
Awesome. Sometimes a letting go of the social contract is a good thing. I think he nails it in regards to the technology lifecycle, these things take time and it’s pretty amazing what Tesla has done so far.
http://www.techcrunch.com/2009/04/10/teslas-elon-musk-grows-a-pair-good-for-him/
If you’re using Advanced Workflows / jBPM within Alfresco you probably already know about the Alfresco workflow console (/alfresco/faces/jsp/admin/workflow-console.jsp, for a full list of “hidden” consoles check out Jeff’s great post Trouble with Alfresco? Console yourself). However, very quickly I realized that the Eclipse / deploy / workflow console cycle to create and tweak my workflow definitions wouldn’t work. Instead we can use junit tests to develop and debug the workflow definitions.
First make sure you’ve installed the Graphical Process Designer (GPD), while I haven’t found the graphical part very helpful it does setup a nice way to build and test workflows. One problem I did encounter was that the 3.3 version of jBPM and GPD have a required library defiition that shouldn’t be there, one quick trip to google and here’s the solution. Just restart Eclipse and you’re on your way.
Next take a look at the sample unit test that the GPD creates for you when you start a new jBPM project. From here you have full access to parse the definition, start a workflow, and traverse nodes. Have fun.
NOTE: Forgot to mention that you need to put a log4j.properties in the /src/main/config to see anything useful on the console.
Over the next few posts I’ll be including some basic information you should have when starting a new Alfresco or Surf framework project. Tips and tricks from the trenches.
Development Environment & Build
First things first, follow the instructions on the Alfresco wiki to get yourself setup: http://wiki.alfresco.com/wiki/Alfresco_SVN_Development_Environment
If you’re mostly creating JavaScript webscripts I’ve found that TextMate (OSX only) is a pretty light alternative to Eclipse (I run both). I use the Ant Bundle and the Subversion Bundle to manage the environment.
Speaking of Ant, after a couple builds clicking on the “Refresh webscripts” button gets really old. To speed up the process I tweaked my build.xml to include a cURL POST into the repository and/or Surf webapps to refresh the webscripts. ( thanks to my colleague Ray for moving the urls into build.properties):
Deploy Surf Webscripts Ant target:
<target name="deployWebscripts" depends="deploy"
description="Unzips the ${package.file.zip} into
${surf.web.dir} and refreshes webscripts">
<exec executable="curl">
<arg value="-d"/>
<arg value="reset=on"/>
<arg value="http://${surf.web.url}/service/index"/>
</exec>
</target>
I’m currently working on an Alfresco / jBPM workflow for a project and decided to start simple, always a good idea. My workflow consists of a start, ‘pending’ node, and an end with no task-nodes.
<?xml version="1.0" encoding="UTF-8"?><process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="mywf:publish"><start-state name="start"><transition name="submit" to="pending"></transition></start-state><node name="pending"><transition name="" to="end"><action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"><script><expression>logger.log("pending");</expression></script></action></transition></node><end-state name="end"></end-state></process-definition>
However, after deploying using the Graphical Process Designer (GPD) I was getting an error when kicking off the workflow with the Alfresco UI. In order to help debug I added the following line to the Alfresco /WEB-INF/classes/log4j.properties:
log4j.logger.org.alfresco.web.bean.workflow=debug
which then led me to the following error in the log file:
11:15:30,346 User:admin DEBUG [bean.workflow.StartWorkflowWizard] Selected workflow: WorkflowDefinition[id=jbpm$10321920, name=jbpm$mywf:publish,version=1,title=mywf:publish,startTask=undefined]11:15:52,101 User:admin DEBUG [bean.workflow.StartWorkflowWizard] Starting workflow: jbpm$1032192011:15:52,101 User:admin ERROR [ui.common.Utils] A system error happened during the operation: nulljava.lang.NullPointerExceptionat org.alfresco.web.bean.workflow.WorkflowUtil.prepareTaskParams (WorkflowUtil.java:190)
within StartWorkflowWizard.java on line 179 I noticed a comment “// TODO: Deal with workflows that don’t require any data”, hmm.
Long story short it looked like since my workflow wasn’t collecting any data the startTask was failing. Here’s my new workflow and associated workflow model:
<?xml version="1.0" encoding="UTF-8"?><process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="mywf:publish"><start-state name="start"><task name="mywf:submitTask"/><transition name="submit" to="pending"></transition></start-state><node name="pending"><transition name="" to="end"><action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript"><script><expression>logger.log("pending");</expression></script></action></transition></node><end-state name="end"></end-state></process-definition>
Model:
<types><type name="mywf:submitTask"><parent>bpm:startTask</parent><properties><property name="mywf:myComment"><type>d:text</type><mandatory>false</mandatory><multiple>false</multiple></property></properties></type></types>
After updating the model and workflow the workflows are launching just fine and can be viewed using the Alfresco workflow console (/alfresco/faces/jsp/admin/workflow-console.jsp)
Courtesy of Dopplr I just received my 2008 travel annual report:
112 days at home
254 days of travel ( or 70% of the year )
28 trips totaling 113,927 km or 31% of the distance to the moon
Most frequent locations were St. Thomas USVI, Sunrise, FL, Santa Monica, and St. Martin