cancel
Showing results for 
Search instead for 
Did you mean: 

Pre populating the same form in a event from different event form parameters

divyanayan
Champ in-the-making
Champ in-the-making
Hi,

I have a one User Task in which there is a form which has fields for a manager to review.Now if the manager clicks on Edit button the form goes to edit activiti which is assigned to the different user says analyst.Once the anlayst doe the edit i want the referenced form in the manager review user task to get popultaed with the edit task form changes.

Problem :

I am using  start execution listener to fill the manager form first time whenanalyst fills the form.

Now once the edit task is completed by anaylst which has two task listener configured on create and complete of the event.

On Create i am poupulating the form for edit. On complete i am setting the form for manager review to be updated with the edit settings .

But as mentioned above Manager Review task has  start execution listener  so this event gets fired again and the form is again populated with the values what user filled for the first time.

Please let me know how to appraoch this problem.
1 REPLY 1

jbarrez
Star Contributor
Star Contributor
One way to solve it is to add a layer above the form call you're doing and store the form values somewhere else and not in a variable.
When the call comes in, you check those values and return them, depending on the situation.

If you want to solve it with listeners in the process definition, you'll need to somehow keep the state in their too, and know you are passing a second time and need to do something else (to which a variable is the easiest … but maybe not best solution)