AnsweredAssumed Answered

Registration of a form for a new workflow definition

Question asked by eric_k on Feb 28, 2017


In the application I am working on (Alfresco 5.0.d, Activiti), the user may deploy their own workflow definition: she drops a BPMN file in a dedicated folder and calls an action 'Deploy'.

I would like to register a default Workflow Form for this new workflow definition. For this purpose, I call saveForm() from the FormService :

            WorkflowInstance saveForm = (WorkflowInstance) getFormService().saveForm(item, getDefaultFormData());


Unfortunately, the call of saveForm creates a new instance of the workflow. This behavior is not expected.

In the FormService class, I can read :


     * Persists the given form representation for the given item.


     * @param item The item to persist the form for

     * @param data An object representing the form data to persist

     * @return The object persisted


    public Object saveForm(Item item, FormData data);


Is it normal?

Have you ever registered a default form for a new workflow definition?


Thanks for your answers!