cancel
Showing results for 
Search instead for 
Did you mean: 

Is activiti:formKey really necessary?

mariusz_cwikla
Champ in-the-making
Champ in-the-making
Hello,
I started to use Activiti just recently and I find it easiest to use. I love it's simplicity and OSGi support that I couldn't find in competetive engines.
Since I'm new to Activiti and BPMN, I have a simple question from the topic: is activiti:formKey attribute really necessary? Can't I just use id attribute to check what form should I display?
First of all, I use my own rendering engine and use Activiti API for all workflow management.
Let's say, that I have following process:

[startEvent] —> [EnterPersonDataTask] —> [EnterPersonAddressesTask] —> [EndEvent]

Each task is userTask and has it's own form.
A task could be written as:
<userTask id="EnterPersonDataTask" name="Enter person data" activiti:formKey="EnterPersonDataForm"/>

Right now I use task.getTaskDefinitionKey() to get id of a task and based on that id I show appropriate form to the user. In other words, you can say that I have 1-1 relation between task id's and my form's id's. So according to this I could just use such task instead of previous one:
<userTask id="EnterPersonDataTask" name="Enter person data"/>
and have a little bit less configuration, that could be important when using large processes.

Can't that suffice? What are use cases that state that I should use formKey instead of id?

Thanks in advance for any help!
1 REPLY 1

trademak
Star Contributor
Star Contributor
Hi,

It's up to you. We provide the formKey attribute if you want to use it, but you can also use the id attribute.
But if you would have multiple user tasks that reference the same form I think the formKey would be a better solution.

Best regards,
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.