[JBoss jBPM] - Re: variable scope from a script
by tbeernot
"mputz" wrote : /**
| | * sets a variable. If a variable exists in the scope given by the token, that
| | * variable is updated. Otherwise, the variable is created on the root token
| | * (=process instance scope).
| | */
| | public void setVariable(String name, Object value, Token token) {
|
| In order to use setVariable on different tokens, the variables have to be created first with createVariable, otherwise they will all end up being referenced by the root token.
Create variable works indeed. It also works to update an already existing variable. So my problem is solved, thank you!
However, IMHO, I find the behavior strange:
- Even though a token is explicitely provided, setVariable elects to ignore it. Rather throw an exception stating the variable does not exist, but do not ignore that parameter; there is a two-parameter method for a more "agile" behavior.
- createVariable can be used to create and update a variable. However "create" is much more specific about what is going to happen than "set", and I had not expected it to update also.
Personally I find the following behavior more logical:
- createVariable: create only but not update, exception if variable exists
- updateVariable: update only, exception if not exist
- setVariable: create if not exist, otherwise update
Thanks!
Tom
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192129#4192129
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192129
17 years, 7 months
[Remoting] - Re: How to set ping timeout of ConnectionValidator?
by swany
Ron,
Attempting to follow the remoting / messaging code that is quite new to me, I think I follow what you have said. However, attempting to backtrack through the call chain to see where the URI is passed from server to client I quickly get lost.
I think I have discovered the appropriate InvokerLocator URI that is for the Client object (below?) in the debug log:
05:30:03,958 DEBUG [InvokerLocator] creating InvokerLocator with URI: bisocket://mobile-166-129-196-099.mycingular.net:11457/?JBM_clientMaxPoolSize=200&clientLeasePeriod=10000&clientSocketClass=org.jboss.jms.client.remoting.ClientSocketWrapper&dataType=jms&marshaller=org.jboss.jms.wireformat.JMSWireFormat&numberOfCallRetries=1&pingFrequency=214748364&pingWindowFactor=10&socket.check_connection=false&timeout=0&unmarshaller=org.jboss.jms.wireformat.JMSWireFormat
which includes most parameters, but not my custom validation entries. I haven't tried to set up all the remoting & messaging source such that I can step through this with a debugger. I have compiled both remoting and messaging source and inserted some additional debug statements to attempt to trace the URI. However, it is extremely cumbersome (it has taken me days to get this far!).
Any quick hints which classes I can look at on the server side (where the URI is constructed and passed to the client) and on the client side (where it's received before JMSRemotingConnection is created with it)? There are so many layers of indirection and cross-connections for the bisocket that I feel completely lost :)
Thanks,
Mark
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192119#4192119
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192119
17 years, 7 months
[JBoss Portal] - Re: JBPORTAL-1978 : scriptaculous & prototype js
by cpage
I use prototype 1.6.0.2 and scriptaculous 1.8.1 with Portal 2.6.6 and DnD is ok for me in IE7, FF2 and FF3. I have made changes only in dyna.js.
I have changed lot of things in Portal java code so i don't know if these changes in js will be ok for everyone.
The 5 lines in dyna.js :
replace line 27 :
var regions_on_page = document.getElementsByClassName("dnd-region");
by :
var regions_on_page = $$(".dnd-region");
replace line 221 :
var srcs = Element.getElementsByClassName(srcContainer, className);
by :
var srcs = srcContainer.select("." + className);
replace line 227 :
var dsts = Element.getElementsByClassName(dstContainer, className)
by :
var dsts = dstContainer.select("." + className);
replace line 306 :
var regions_on_page = document.getElementsByClassName("dnd-region");
by :
var regions_on_page = $$(".dnd-region");
replace line 321 :
var portlets_on_page = document.getElementsByClassName("partial-refresh-window");
by :
var portlets_on_page = $$(".partial-refresh-window");
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192118#4192118
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192118
17 years, 7 months
[JBoss jBPM] - Re: variable scope from a script
by mputz
There is a test case that covers this scenario:
http://fisheye.jboss.org/browse/JBPM/jbpm.3/jpdl/jar/src/test/java/org/jb...
Looking at testScopeOverriding(), this works properly if the createVariable(String name, Object value, Token token) is used.
The results are different if setVariable(String name, Object value, Token token) is used, which is also documented in the javadocs:
/**
| * sets a variable. If a variable exists in the scope given by the token, that
| * variable is updated. Otherwise, the variable is created on the root token
| * (=process instance scope).
| */
| public void setVariable(String name, Object value, Token token) {
In order to use setVariable on different tokens, the variables have to be created first with createVariable, otherwise they will all end up being referenced by the root token.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192116#4192116
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192116
17 years, 7 months
[JBoss Portal] - JBoss Portal 2.7.0 - Error process faces request
by natoine
Hi,
i have try to install the current version of JBoss portal (2.7.0) but when trying to access http://localhost:18080/portal
i have the following error :
Cause: javax.portlet.PortletException: Error process faces request
| Message: Error process faces request
| StackTrace:
|
| javax.portlet.PortletException: Error process faces request
| at javax.portlet.faces.GenericFacesPortlet.doFacesDispatch(GenericFacesPortlet.java:346)
| at javax.portlet.faces.GenericFacesPortlet.doView(GenericFacesPortlet.java:306)
| at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
| at javax.portlet.faces.GenericFacesPortlet.doDispatch(GenericFacesPortlet.java:287)
| at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
| at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl$Invoker.doFilter(PortletContainerImpl.java:568)
| at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159)
| at org.jboss.portlet.filter.JBossPortletFilter.doFilter(JBossPortletFilter.java:79)
| at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:159)
| at org.jboss.portal.portlet.impl.jsr168.api.FilterChainImpl.doFilter(FilterChainImpl.java:80)
| at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:505)
| at org.jboss.portal.portlet.container.ContainerPortletDispatcher.invoke(ContainerPortletDispatcher.java:42)
|
What can i do ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192113#4192113
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192113
17 years, 7 months