Hi,I was using activiti v5.0beta2 before.In 5.0beta2, the org.activiti.engine.impl.repository.ProcessDefinitionEntity has an attribute called startFormResourceKey that contains the string for the start form.I upgraded to 5.0rc1 and I noticed that this attribute has disappeared. I noticed there is a new attribute called startFormHandler. I tried that attribute using this code:
ProcessDefinition pd; //get pd from somewhere
ProcessDefinitionEntity pde = (ProcessDefinitionEntity) pd;
DefaultStartFormHandler dsfh = (DefaultStartFormHandler) pde.getStartFormHandler();
if (dsfh != null) {
formKey = dsfh.getFormKey();
}
However the dsfh is always null.I tried using the new form service as well:
ProcessDefinition pd; //get pd from somewhere
Object obj = formService.getRenderedStartForm(pd.getId());
if (obj != null) {
FormData fd = (FormData) obj;
System.out.println("fd key: " + fd.getFormKey());
}
However the obj is always null.Update:I tried another method given by form service:
StartFormData sfd = formService.getStartFormData(pd.getId());
if (sfd != null) {
System.out.println("sfd is not null");
String formKey = sfd.getFormKey();
System.out.println("form key: " + formKey);
}
else {
System.out.println("sfd is null");
}
And I get the output "sfd is not null" but the formKey is still null.For all the programs above, the sample data I used is the VacationRequest.bpmn20.xml.Can someone help me to get back the start form string again?