cancel
Showing results for 
Search instead for 
Did you mean: 

primefaces -- user task

fahad1
Champ in-the-making
Champ in-the-making
I am trying to build a process with my own defined primefaces pages. I am using <userTask id="start" name="userTask2" activiti:assignee="${initiator}" activiti:formKey="index.jsf"></userTask>
I tried index.xhtml as well, but could not succeeded.

There will not be any exception but the form index did not appreared ? Can anyone tel me why ? Any guidance ?
11 REPLIES 11

tahers
Champ in-the-making
Champ in-the-making
I have the same problem. please help us

jbarrez
Star Contributor
Star Contributor
This is way too little information for us to say anything about it …

mano1
Champ in-the-making
Champ in-the-making
actually I want to start my bpmn with a primefaces page index.xhtml, I provided the form key of my bpmn to it. I start the process in activiti explorer but this index.xhtml form will not display ?? Why ? Can you explain the way to show it ?  I read the user guide "form properties" and "customer form rendering" but still unable to integrate primefaces pages with the user tasks.

Therefore I want to learn how to use our custom forms in our bpmn ?

jbarrez
Star Contributor
Star Contributor
> I start the process in activiti explorer but this index.xhtml form will not display ?? Why ?

Cause Explorer is written in Vaadin … and not in JSF. That will never work.

If you want to use jsf, you will need to rewrite it all in jsf (the whole task + form handling)

fahad1
Champ in-the-making
Champ in-the-making
thanks for your reply. But did not caught the idea yet. In bpmn usertask, formkey is assigned the path of jsf page. Then I called the task listener. How to handle this in task listener so that it is displayed for the user?

jbarrez
Star Contributor
Star Contributor

- the form rendering as in Activiti Explorer does NOT work for jsf. It is Vaadin based, not JSF.

- if you want to do it yourself you have to indeed put a reference to something jsf-specific in the form key.
You will need to get the form key through the formService of Activiti, and do some JSF magic with it to find the right page.
Afterwards, you need to call the formService.submit method.

fahad1
Champ in-the-making
Champ in-the-making
dear jbarrez, thanks for your feedback. I am still unable to execute jsf with activiti. I am giving the jsf page name to the form key of user task. When I start the process, there will be no exception but the desired form did not appear. Can you please extend what do you mean by "JSF magic"  in your last reply?

looking forward something concrete by your side.

jbarrez
Star Contributor
Star Contributor
> When I start the process, there will be no exception but the desired form did not appear.

But how would you expect it to work? Activiti does *not* do JSF. You need to program that yourselves.

> looking forward something concrete by your side.

Then I'm afraid i will have to dissapoint you, a JSF example is not something i'm planning on doing anytime soon.
There are multiple posts on this forum in the past of people who integrated JSF with Activiti. Or do some googling … like http://www.bpm-guide.de/2011/09/17/build-your-own-activiti-task-explorer-with-cdi-and-jsf-2/

fahad1
Champ in-the-making
Champ in-the-making
thanks for your feedback. I will start looking at it.