[jboss-dev-forums] [Design of JBoss jBPM] - Re: splitting the work on the console
falazar
do-not-reply at jboss.com
Fri Aug 18 18:14:08 EDT 2006
David,
So, an initial question here, getting started with the whole JSF (have to get book next week)
I got a basic loop going here:
| <c:forEach var="processDefinition" items="#{participantBean.allProcessDefinitions}">
| <tr class="normal" onmouseover="this.className='hovered';" onmouseout="this.className='normal';" onclick="document.all['newExe#{processDefinition.id}\'].click()">
| <td class="selectable"><h:outputText value="#{processDefinition.name}" /> (<h:outputText value="#{processDefinition.id}" />) </td>
| <td class="selectable"><h:outputText value="#{processDefinition.version}" /></td>
| <td class="selectable"><h:outputText value="#{participantBean.allProcessInstances(***PID HERE***)}" /> </td>
| <td class="selectable">
| <h:commandLink action="#{participantBean.startNewProcessInstance}" id="newExe#{processDefinition.id}">
| <f:param name="processDefinitionId" value="#{processDefinition.id}"/>
| Start It!
| </h:commandLink>
| </td>
| </tr>
| </c:forEach>
|
This all works fine, shows all processdefinitions, and version and ID's fine.
So then in the loop, I would like to call out and get all the processInstances for each of these... And that doesnt seem to be working in any way I can do it.
I dont see how to pass a variable back into the function.
The function call itself should be fine:
|
| // hmm count all active processes instead?
| // first get count of all processes here, then try it in the webpage, then return list if needed
| //public int getAllProcessInstances(long processDefinitionId)
| public String getAllProcessInstances()
| {
| //return "12";
| System.out.println("PID:"+processDefinitionId);
| return Integer.toString(jbpmBean.getJbpmContext().getGraphSession().findProcessInstances(processDefinitionId).size());
| }
|
Thanks,
James
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966186#3966186
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966186
More information about the jboss-dev-forums
mailing list