Beans beans = new Beans();
Bean workflowDeployer = new Bean(processId + WORKFLOW_DEPLOYER_NAME_SUFFIX, WORKFLOW_DEPLOYER_PARENT);
beans.getBeans().add(workflowDeployer);
// Add pointer to model
BeanProperty modelsProperty = new BeanProperty(PROPERTY_MODELS);
modelsProperty.addListItem(EXTENSIONS_PATH_PREFIX + contentModelFileName);
workflowDeployer.getProperties().add(modelsProperty);
// Add pointer to process definition
BeanProperty workflowProperty = new BeanProperty(PROPERTY_WORKFLOW_DEFINITIONS);
workflowProperty.addProp(new BeanPropertyProp(PROP_KEY_ENGINE_ID, PROP_ENGINE_ID));
workflowProperty.addProp(new BeanPropertyProp(PROP_KEY_MIME_TYPE, PROP_MIME_TYPE));
workflowProperty.addProp(new BeanPropertyProp(PROP_KEY_LOCATION, EXTENSIONS_PATH_PREFIX + processFileName));
// TODO: set back to false or make configurable
workflowProperty.addProp(new BeanPropertyProp(PROP_KEY_REDEPLOY, Boolean.TRUE.toString()));
workflowDeployer.getProperties().add(workflowProperty);
writeBeans(out, beans);
}