Java simulate click on button in tasks.

Showing results for 
Search instead for 
Did you mean: 
Active Member

Java simulate click on button in tasks.

Dear friends,

I try to work with workflows and tasks.

To catch the task I use execution listener. In execution listener I set variables,  then I check if assignee is from given group. If this condition is satisfied, I want to approve, reject or back the execution using JAVA language. (reject and approve, back are buttons in alfresco share). 

If I click these buttons in share, my java class controls the state a everything works fine, but I want to do it without clicking these buttons in share.   

Is there a way how to simulate "click on the button" action using a java code?