Is there a way to deploy a workflow (programmatically) only when the latest definition is different or doesn't exist yet?
So something like:
if (!newProcessDefinition.equals(latestDeployedDefinition)){ s_logger.info("Deploy Process Definition"); context.deployProcessDefinition(newProcessDefinition); }
yes, by checking yourself. jBPM has no option (in 3.x) for this. In 4 this will change.
http://www.jboss.org/feeds/post/rfc_process_deployment_use_cases
http://www.jboss.org/feeds/post/work_on_the_jbpm4_deployer_started