for(FlowElement flowElement : conversion.getProcess().getFlowElements()) {
if(flowElement instanceof StartEvent) {
StartEvent startEvent = (StartEvent) flowElement;
if(startEvent.getFormKey() == null) {
Module module = AlfrescoConversionUtil.getExtension(conversion).getModules().get(0);
Configuration detailsForm = module.addConfiguration(EVALUATOR_STRING_COMPARE,
MessageFormat.format(EVALUATOR_CONDITION_ACTIVITI, conversion.getProcess().getId()));
// No form-key is set, either use the default or generate of start-form if this
// is available
if(conversion.getWorkflowDefinition().getStartFormDefinition() != null
&& !conversion.getWorkflowDefinition().getStartFormDefinition().getFormGroups().isEmpty()) {
// Create the content model for the start-task
M2Type type = new M2Type();
model.getTypes().add(type);
type.setName(AlfrescoConversionUtil.getQualifiedName(modelNamespace.getPrefix(),
AlfrescoConversionConstants.START_TASK_SIMPLE_NAME));
type.setParentName(AlfrescoConversionConstants.DEFAULT_START_FORM_TYPE);
// Create a form-config for the start-task
Module shareModule = AlfrescoConversionUtil.getExtension(conversion).getModules().get(0);
Configuration configuration = shareModule.addConfiguration(AlfrescoConversionConstants.EVALUATOR_TASK_TYPE
, type.getName());
Form formConfig = configuration.createForm();
formConfig.setStartForm(true);
// Populate model and form based on FormDefinition