[Design of JBoss jBPM] - Re: JSF EL - Cant Pass parameters
by falazar
Hmm ok.
Well I found one way to do it that got it working, I can show every version of the processdefinitions, and how many instances there are in it.
What forum are we discussing web console issues? As I work on teh web app interface I would like to be able to show my findings and ask questions there.... I was looking through the faces mailing list as well.. but they didnt know offhand.
Solution:
The loop needs to be a ui:repeat instead of a forEach, and you must create a binding variable, that will set the variable for each spot in the loop, and you can access it in the bean.
| <ui:repeat var="processDefinition" value="#{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 binding="#{participantBean.textElement}" value="">
| <f:attribute name="text" value="#{processDefinition.id}" />
| </h:outputText>
| <!-- The below function is called with the above parameter. -->
| <h:outputText value="#{participantBean.allProcessInstances}" />
| </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>
| </ui:repeat>
import javax.faces.component.html.HtmlOutputText;
|
| private HtmlOutputText textElement;
|
| // Count all process instances for this definition
| public String getAllProcessInstances()
| {
| // This text value is defined in the binding in the home.xhtml file
| long PID = ((Long)getTextElement().getAttributes().get("text")).longValue();
| return Integer.toString(jbpmBean.getJbpmContext().getGraphSession().findProcessInstances(PID).size());
| }
|
| public HtmlOutputText getTextElement() {
| return textElement;
| }
|
| public void setTextElement(HtmlOutputText textElement) {
| this.textElement = textElement;
| }
The main part here is the getAllProcessInstances() method, which needs the processDefinition.id (PID) value to be passed in from the web form. With that we can return and display the number of instances there are for each processDefition version.
James
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966696#3966696
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966696
18 years, 1 month
[Design of JBoss Serialization] - What should I create to frequently ask it for smart clones??
by elijah.epifanov@gmail.com
Which class encapsulates all data needed to recreate smart clone for a particular object?
The main idea is to reuse final objects pool and recreate smart clones not from raw bytes.
I tried DataContainer, but its DataContainerInput isn't thread safe and occasionally throws this:
Exception in thread "Thread-24" java.lang.RuntimeException: java.io.IOException
....
Caused by: java.io.IOException
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:103)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:250)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:228)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:339)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:63)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:735)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:302)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:252)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:228)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:339)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:63)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:735)
at ws.xmart.dynamic.JBossSmartCloningFilter.restore(JBossSmartCloningFilter.java:35)
... 4 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithMethod(RegularObjectPersister.java:97)
... 16 more
Caused by: java.io.EOFException: Unexpected end of repository
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.moveNext(DataContainer.java:724)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readInt(DataContainer.java:903)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:282)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:252)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:228)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:339)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:63)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:735)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:302)
at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:252)
at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:228)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:339)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:63)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:735)
at org.jboss.serial.persister.ArrayPersister.readObjectArray(ArrayPersister.java:217)
at org.jboss.serial.persister.ArrayPersister.readData(ArrayPersister.java:196)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:339)
at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:63)
at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:735)
at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:302)
at org.jboss.serial.persister.ObjectInputStreamProxy.defaultReadObject(ObjectInputStreamProxy.java:72)
at java.util.concurrent.ConcurrentHashMap.readObject(ConcurrentHashMap.java:1399)
... 20 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966666#3966666
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966666
18 years, 1 month
[Design of JBoss ESB] - Re: Registry Design
by tfennelly
anonymous wrote : 1) Inquiry - Who is inquiring the Registry? How is the inquiry taking place?
We'll def need an abstraction for this!
Who? Internal and External clients.
How? I guess a SOAP interface is the most useable.
anonymous wrote : 2) Updates - The services will need to get registered in the Registry. How would the users do this?
I'd wonder if we need to worry about this!! Who needs to make reg updates? Will reg updates need to be made by a running ESB or Services? Do we need it for the GA release?
anonymous wrote : 3) Authentication - I suppose we would require authentication modules for the Registry. Since the Registry will be stand alone, we may need to figure out this.
For the GA release (and possibly beyond), can we not rely on some form of container managed security (Authentication/Authorisation)? Just seems like this is a nut that's been cracked a million times over! Excuse my ignorance if I'm completely wrong on this :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966625#3966625
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966625
18 years, 1 month