Hello,
I’m implementing a spring boot application that will use some external form system because form engine is not supported anymore at 7.0.1 version.
I use the formkey attribute to set some custom key and then I call org.flowable.engine.FormService:
formService.getTaskFormKey(processDefinitionId, taskId);
and I get the following error:
Cannot invoke “org.flowable.engine.impl.form.DefaultFormHandler.getFormKey()” because “formHandler” is null
Any ideas? Should I configure somehow a custom FormHandler? Or should I create my own form service which maybe implements the flowable’s form engine?
Hey @desp.kaz,
I would suggest implementing the Flowable Form engine and / or to review what exactly you need. I don’t think that you need to use the org.flowable.engine.FormService
. The org.flowable.task.api.Task
has getFormKey
. Keep in mind that you will only need to implement the form engine if you would like to use things such as TaskService#completeTaskWithForm
or ProcessInstanceBuilder#startFormVariables
Cheers,
Filip
Thanks a lot for your response!
I would like to store my forms, fill them and store the data so that’s why I’ve decided to have an external service at least for saving the form definitions because form engine of flowable isn’t present at latest version.
I was thinking to use the FormService because it has methods such as submitTaskFormData but I guess that I can save those data as process variables. If I understood correctly, when you use embedded forms by using flowable:formProperty and you use submitTaskFormData the data are saved as process variables also, isn’t that correct?
I didn’t quite understand what do you mean by
Keep in mind that you will only need to implement the form engine if you would like to use things such as TaskService#completeTaskWithForm
or ProcessInstanceBuilder#startFormVariables
The flowable:formProperty
was something for the old Task application that had its own embedded form engine.
The way that we are using this is by using the methods I’ve mentioned. If you look at the CompleteTaskWithForm
you’ll see that we are calling org.flowable.form.api.FormService#getVariablesFromFormSubmission
to parse the submitted variables to something that should be stored as process variables.
1 Like
Hello,
I know that this is an old thread but I was wondering how can I implement the form engine like you say here:
I would suggest implementing the Flowable Form engine and / or to review what exactly you need.
I mean, should I define my own database and add a new engine configuration at my process engine configuration like IdmEngineConfiguration ? Because I see that this have a lot of things to be configured but if I understood well only this way I can use the methods that you have mentioned, right? I found some other methods like repositoryService.getFormDefinitionsForProcessDefinition that also search for a form engine
Is there maybe an example that I can have a look at?