cancel
Showing results for 
Search instead for 
Did you mean: 

Use extaernal Form

mtail
Champ in-the-making
Champ in-the-making
Hi,

Can i use external form in the last Activiti version ?
How ?

Thank's
4 REPLIES 4

frederikherema1
Star Contributor
Star Contributor
You can render the form you want in any technology and use the TaskService.complete(id, variablesExtractedFromForm) method, passing in the values form the form as variables.

If you want a mechanism to decide at design-time (bpmn20.xml), what form should be shown at runtime, you can use the activiti:formKey attribute (see user guide). This way, you can connect an ID that points to a form in your UI to a task. When getting the task, you can check what form-key it has an render the right form in your UI.

Hi,

I created a simple form called request.form.
I bind this form in a task in property "activiti:formKey" like this in MyProcess.bpmn :
    <userTask id="handleRequest" name="Handle vacation request"
                   activiti:assignee="kermit" activiti:candidateGroups="management"
                   activiti:formKey="request.form">
            <documentation>${employeeName} would like to take ${numberOfDays} day(s) of vacation (Motivation:${vacationMotivation}).   
            </documentation>
    </userTask>

After i zipped the request.form and MyProcess.bpmn and deplyed the zip in activiti-explorer and start it.
But my form is not displayed in the task in runtime.
What is the problem?

Thank's

Hi,

I created a simple form called request.form.
I bind this form in a task in property "activiti:formKey" like this in MyProcess.bpmn :
    <userTask id="handleRequest" name="Handle vacation request"
                   activiti:assignee="kermit" activiti:candidateGroups="management"
                   activiti:formKey="request.form">
            <documentation>${employeeName} would like to take ${numberOfDays} day(s) of vacation (Motivation:${vacationMotivation}).   
            </documentation>
    </userTask>

After i zipped the request.form and MyProcess.bpmn and deplyed the zip in activiti-explorer and start it.
But my form is not displayed in the task in runtime.
What is the problem?

Thank's

frederikherema1
Star Contributor
Star Contributor
Activiti explorer DOES NOT use form-rendering. It uses form-properties instead. Take a look at the user guide on how to model form-properties.

Rendered forms can be extracted by using the Activiti java API, instead…