Activiti - work with the process initial form before it is shown

cancel
Showing results for 
Search instead for 
Did you mean: 
zéluis
Member II

Activiti - work with the process initial form before it is shown

Hi, 

Please, what should be the correct approach in order to work with the process initial form before it is shown? For instance, we would like to show certain initial form field just if user that is starting the process is a member of some group. Is it possible?

Thanks in advance

3 Replies
gdharley
Intermediate

Re: Activiti - work with the process initial form before it is shown

If you are using Activiti 6 o Activiti Enterprise Edition, you can add visibility logic to form fields.

To support your specific requirement, I imagine you would need to create a custom "widget", however it is possible.

An alternative would be to look at other UI frameworks that support activiti such as the Brazos framework from BP3.

Greg

 

zéluis
Member II

Re: Activiti - work with the process initial form before it is shown

Hi Greg, thanks for the answer.

We're using enterprise 1.5.3 version and I am wondering if it could be made without developing too much. For instance using some listener that could be intercepted before the form is rendered. So we could do some code (small java class or javascript) to get the user data, set a value to one process variable and then use it on the field visibility condition.
Regards,

gdharley
Intermediate

Re: Activiti - work with the process initial form before it is shown

Interesting. I dont believe any of the event listeners actually trigger on a start form as they do for task forms.

I really think the only option you have is add a javascript function on form render. There are events you can intercept at the client for all phases of rendering, and tieing into these events is pretty easy.

G