• Property group

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #40634  by intel74
 
I am very confused... I've the same problem again but this time the "dmv" prefix is present in the sql query.
If I not set suggestbox value all run without problem, but if I set one value in the suggestbox after submit I receive error
Have you got any idea?

I attach also a server screenshot, as you can see, using system.out println I Print a message when start workflow( it add propertygroup to file: AddFatturaMetadata)
after that I fill the form with invoice fields and click button and a transaction (AddMetadataFattutaInserita) store the selected values in the propertygroup, and immediately after that I receive Error
In the next task node I've a similar form that show all the invoice fields for approval



I post also catalina log:
Code: Select all
2015-09-29 15:32:56,576 [http-bio-0.0.0.0-8080-exec-1] INFO  com.openkm.util.FormUtils$LocalResolver- resolveEntity(publicId=-//OpenKM//DTD Workflow Forms 2.4//EN, systemId=http://www.openkm.com/dtd/workflow-forms-2.4.dtd) => C:\openkm-6.3.0-community\tomcat\webapps\OpenKM\WEB-INF\classes\dtd\workflow-forms-2.4.dtd
2015-09-29 15:32:57,275 [http-bio-0.0.0.0-8080-exec-1] INFO  com.openkm.dao.NodeBaseDAO- addPropertyGroup(53026e56-06d8-44ce-9676-9b3c3a6ece91, okg:fattura)
2015-09-29 15:32:57,808 [http-bio-0.0.0.0-8080-exec-1] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-29 15:32:57,880 [http-bio-0.0.0.0-8080-exec-1] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-29 15:33:02,491 [http-bio-0.0.0.0-8080-exec-8] INFO  com.openkm.util.FormUtils$LocalResolver- resolveEntity(publicId=-//OpenKM//DTD Workflow Forms 2.4//EN, systemId=http://www.openkm.com/dtd/workflow-forms-2.4.dtd) => C:\openkm-6.3.0-community\tomcat\webapps\OpenKM\WEB-INF\classes\dtd\workflow-forms-2.4.dtd
2015-09-29 15:33:02,492 [http-bio-0.0.0.0-8080-exec-2] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-29 15:33:32,704 [http-bio-0.0.0.0-8080-exec-2] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-29 15:33:34,109 [http-bio-0.0.0.0-8080-exec-2] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-29 15:33:34,224 [http-bio-0.0.0.0-8080-exec-2] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-29 15:33:34,285 [http-bio-0.0.0.0-8080-exec-2] ERROR com.openkm.servlet.frontend.WorkflowServlet- could not resolve property: $fornitore_id of: com.openkm.dao.bean.DatabaseMetadataValue [select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from com.openkm.dao.bean.DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='9']
com.openkm.core.DatabaseException: could not resolve property: $fornitore_id of: com.openkm.dao.bean.DatabaseMetadataValue [select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from com.openkm.dao.bean.DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='9']
	at com.openkm.dao.KeyValueDAO.getKeyValues(KeyValueDAO.java:67)
	at com.openkm.dao.KeyValueDAO.getKeyValues(KeyValueDAO.java:79)
	at com.openkm.util.GWTUtil.copy(GWTUtil.java:887)
	at com.openkm.util.GWTUtil.copy(GWTUtil.java:689)
	at com.openkm.util.GWTUtil.copy(GWTUtil.java:653)
	at com.openkm.servlet.frontend.WorkflowServlet.findUserTaskInstances(WorkflowServlet.java:132)
	at sun.reflect.GeneratedMethodAccessor1268.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.hibernate.QueryException: could not resolve property: $fornitore_id of: com.openkm.dao.bean.DatabaseMetadataValue [select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from com.openkm.dao.bean.DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='9']
	at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:81)
	at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:75)
	at org.hibernate.persister.entity.AbstractEntityPersister.toType(AbstractEntityPersister.java:1465)
	at org.hibernate.hql.ast.tree.FromElementType.getPropertyType(FromElementType.java:315)
	at org.hibernate.hql.ast.tree.FromElement.getPropertyType(FromElement.java:487)
	at org.hibernate.hql.ast.tree.DotNode.getDataType(DotNode.java:611)
	at org.hibernate.hql.ast.tree.DotNode.prepareLhs(DotNode.java:263)
	at org.hibernate.hql.ast.tree.DotNode.resolve(DotNode.java:210)
	at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:117)
	at org.hibernate.hql.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:113)
	at org.hibernate.hql.ast.tree.DotNode.resolveSelectExpression(DotNode.java:674)
	at org.hibernate.hql.ast.HqlSqlWalker.resolveSelectExpression(HqlSqlWalker.java:891)
	at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectExpr(HqlSqlBaseWalker.java:2189)
	at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectExprList(HqlSqlBaseWalker.java:2121)
	at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectClause(HqlSqlBaseWalker.java:1522)
	at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:593)
	at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:301)
	at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:244)
	at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:256)
	at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:187)
	at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:138)
	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
	at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:124)
	at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
	at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
	at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1770)
	at com.openkm.dao.KeyValueDAO.getKeyValues(KeyValueDAO.java:52)
	... 56 more

Attachments
Immagine2.png
Immagine2.png (77.75 KiB) Viewed 8087 times
Immagine.png
Immagine.png (87.14 KiB) Viewed 8087 times
 #40639  by intel74
 
I tried to set "log4j.logger.com.openkm=DEBUG" to better understand the problem, so I attach the catalina log file after I rebooted the server and recreated the error. As you can see the error appear in the follows rows. I don't understand why clicking the button on the first form it save correctly the data in the property group.....and going to the next form can not map the property




Code: Select all
2015-09-30 11:23:03,523 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.api.OKMWorkflow- findUserTaskInstances: [[name=ValidazioneFattura, description=null, id=198, actorId=okmAdmin, pooledActors=[], open=true, last=false, suspended=false, startTaskInstance=false, create=Wed Sep 30 11:22:51 CEST 2015, dueDate=null, start=null, end=null, comments=[], token=[id=203, name=null, node=ValidazioneFattura, availableTransitions=[[id=607, name=AddMetadataFatturaValidata, from=ValidazioneFattura, to=RegistrazioneFattura]], suspended=false, start=Wed Sep 30 11:09:28 CEST 2015, end=null, parent=null, comments=[], processInstance=null], availableTransitions=[[id=607, name=AddMetadataFatturaValidata, from=ValidazioneFattura, to=RegistrazioneFattura]], variables={fattura_tipopagamento={label=, name=fattura_tipopagamento, width=150px, height=25px, readonly=false, type=simple, value=4, data=, optionsData=, options=[{label=Per cassa, value=1, selected=false}, {label=Carta di credito, value=2, selected=false}, {label=Bonifico anticipato, value=3, selected=false}, {label=Bonifico posticipato, value=4, selected=true}, {label=Assegno, value=5, selected=false}, {label=Altro, value=6, selected=false}], validators=[], table=, optionsQuery=, suggestion=, class=}, fattura_fornitore={label=, name=fattura_fornitore, value=50, data=, width=100px, height=25px, readonly=false, table=, filterQuery=select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and lower(dmv.$fornitore_ragionesociale) like '%{0}%' order by dmv.$fornitore_ragionesociale, valueQuery=select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='{0}', dialogTitle=, filterMinLen=3, validators=[]}, submit={label=, name=submit, validate=true, transition=, confirmation=, style=yes, width=100px, height=25px}, fattura_data={label=, name=fattura_data, value=20150901000000, data=, width=100px, height=25px, readonly=false, type=date, validators=[]}, fattura_numero_registrazione={label=, name=fattura_numero_registrazione, value=, data=, width=100px, height=25px, readonly=true, type=text, validators=[]}, fattura_imponibile={label=, name=fattura_imponibile, value=111,11, data=, width=100px, height=25px, readonly=false, type=text, validators=[]}, fattura_numero={label=, name=fattura_numero, value=1, data=, width=100px, height=25px, readonly=false, type=text, validators=[]}, fattura_data_registrazione={label=, name=fattura_data_registrazione, value=, data=, width=100px, height=25px, readonly=true, type=date, validators=[]}, fattura_note={label=, name=fattura_note, value=nessuna nota, data=, width=300px, height=100px, readonly=false, validators=[]}, fattura_iva={label=, name=fattura_iva, value=1, data=, width=100px, height=25px, readonly=false, type=text, validators=[]}, uuid=7ea845b1-1284-4400-ab60-44cdb77d47ff, fattura_centrocosto={label=, name=fattura_centrocosto, value=, data=, width=100px, height=25px, readonly=false, table=, filterQuery=select dmv.$centro_costo_id, dmv.$centro_costo_descrizione from DatabaseMetadataValue dmv where dmv.table='CENTRO_COSTO' and lower(dmv.$centro_costo_descrizione) like '%{0}%' order by dmv.$centro_costo_descrizione, valueQuery=select dmv.$centro_costo_id, dmv.$centro_costo_descrizione from DatabaseMetadataValue dmv where dmv.table='CENTRO_COSTO' and dmv.$centro_costo_id='{0}', dialogTitle=, filterMinLen=0, validators=[]}, separatoreRegistrazione={label=Dati di registrazione, name=separatoreRegistrazione, width=200, height=}}, processInstance=[id=203, version=1, key=null, ended=false, suspended=false, variables={fattura_tipopagamento={label=, name=fattura_tipopagamento, width=150px, height=25px, readonly=false, type=simple, value=4, data=, optionsData=, options=[{label=Per cassa, value=1, selected=false}, {label=Carta di credito, value=2, selected=false}, {label=Bonifico anticipato, value=3, selected=false}, {label=Bonifico posticipato, value=4, selected=true}, {label=Assegno, value=5, selected=false}, {label=Altro, value=6, selected=false}], validators=[], table=, optionsQuery=, suggestion=, class=}, fattura_fornitore={label=, name=fattura_fornitore, value=50, data=, width=100px, height=25px, readonly=false, table=, filterQuery=select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and lower(dmv.$fornitore_ragionesociale) like '%{0}%' order by dmv.$fornitore_ragionesociale, valueQuery=select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='{0}', dialogTitle=, filterMinLen=3, validators=[]}, submit={label=, name=submit, validate=true, transition=, confirmation=, style=yes, width=100px, height=25px}, fattura_data={label=, name=fattura_data, value=20150901000000, data=, width=100px, height=25px, readonly=false, type=date, validators=[]}, fattura_numero_registrazione={label=, name=fattura_numero_registrazione, value=, data=, width=100px, height=25px, readonly=true, type=text, validators=[]}, fattura_imponibile={label=, name=fattura_imponibile, value=111,11, data=, width=100px, height=25px, readonly=false, type=text, validators=[]}, fattura_numero={label=, name=fattura_numero, value=1, data=, width=100px, height=25px, readonly=false, type=text, validators=[]}, fattura_data_registrazione={label=, name=fattura_data_registrazione, value=, data=, width=100px, height=25px, readonly=true, type=date, validators=[]}, fattura_note={label=, name=fattura_note, value=nessuna nota, data=, width=300px, height=100px, readonly=false, validators=[]}, fattura_iva={label=, name=fattura_iva, value=1, data=, width=100px, height=25px, readonly=false, type=text, validators=[]}, uuid=7ea845b1-1284-4400-ab60-44cdb77d47ff, fattura_centrocosto={label=, name=fattura_centrocosto, value=, data=, width=100px, height=25px, readonly=false, table=, filterQuery=select dmv.$centro_costo_id, dmv.$centro_costo_descrizione from DatabaseMetadataValue dmv where dmv.table='CENTRO_COSTO' and lower(dmv.$centro_costo_descrizione) like '%{0}%' order by dmv.$centro_costo_descrizione, valueQuery=select dmv.$centro_costo_id, dmv.$centro_costo_descrizione from DatabaseMetadataValue dmv where dmv.table='CENTRO_COSTO' and dmv.$centro_costo_id='{0}', dialogTitle=, filterMinLen=0, validators=[]}, separatoreRegistrazione={label=Dati di registrazione, name=separatoreRegistrazione, width=200, height=}}, rootToken=[id=203, name=null, node=ValidazioneFattura, availableTransitions=[[id=607, name=AddMetadataFatturaValidata, from=ValidazioneFattura, to=RegistrazioneFattura]], suspended=false, start=Wed Sep 30 11:09:28 CEST 2015, end=null, parent=null, comments=[], processInstance=null], allTokens=[[id=203, name=null, node=ValidazioneFattura, availableTransitions=[[id=607, name=AddMetadataFatturaValidata, from=ValidazioneFattura, to=RegistrazioneFattura]], suspended=false, start=Wed Sep 30 11:09:28 CEST 2015, end=null, parent=null, comments=[], processInstance=null]], start=Wed Sep 30 11:09:28 CEST 2015, end=null, processDefinition=[name=GestioneFatturaPassiva, description=null, id=100, version=16, nodes=[start, InserimentoFattura, ValutaPagamento, RegistrazioneFattura, PagamentoFattura, AutorizzaPagamento, ValidazioneFattura, end-state1]]]]]
2015-09-30 11:23:03,998 [Crontab Manager] DEBUG com.openkm.dao.CronTabDAO- findAll: [{id=1, name=Dashboard Activity Purge, fileName=DashboardActivityPurge.bsh, fileMime=application/x-bsh, fileContent=[BIG], mail=noreply@openkm.com, lastBegin=Wed Sep 30 00:00:00 CEST 2015, lastEnd=Wed Sep 30 00:00:00 CEST 2015, active=true}, {id=2, name=User Items Serialize, fileName=UserItemsSerialize.bsh, fileMime=application/x-bsh, fileContent=[BIG], mail=noreply@openkm.com, lastBegin=Wed Sep 30 11:00:59 CEST 2015, lastEnd=Wed Sep 30 11:00:59 CEST 2015, active=true}, {id=3, name=Refresh User Items, fileName=RefreshUserItems.bsh, fileMime=application/x-bsh, fileContent=[BIG], mail=noreply@openkm.com, lastBegin=Sun Sep 27 00:00:00 CEST 2015, lastEnd=Sun Sep 27 00:00:03 CEST 2015, active=true}, {id=4, name=User Mail Importer, fileName=UserMailImporter.bsh, fileMime=application/x-bsh, fileContent=[BIG], mail=noreply@openkm.com, lastBegin=Wed Sep 30 11:00:59 CEST 2015, lastEnd=Wed Sep 30 11:00:59 CEST 2015, active=true}, {id=5, name=Text Extractor Worker, fileName=TextExtractorWorker.bsh, fileMime=application/x-bsh, fileContent=[BIG], mail=noreply@openkm.com, lastBegin=Wed Sep 30 11:20:01 CEST 2015, lastEnd=Wed Sep 30 11:20:03 CEST 2015, active=true}, {id=6, name=Session Watchdog, fileName=SessionWatchdog.bsh, fileMime=application/x-bsh, fileContent=[BIG], mail=noreply@openkm.com, lastBegin=Wed Sep 30 11:20:01 CEST 2015, lastEnd=Wed Sep 30 11:20:04 CEST 2015, active=true}, {id=7, name=Process Pending Tasks, fileName=ProcessPendingTasks.bsh, fileMime=application/x-bsh, fileContent=[BIG], mail=noreply@openkm.com, lastBegin=Wed Sep 30 11:20:01 CEST 2015, lastEnd=Wed Sep 30 11:20:03 CEST 2015, active=true}]
2015-09-30 11:23:03,580 [Update Info] DEBUG com.openkm.dao.NodeBaseDAO- calculateUuidFromPath(SessionImpl(PersistenceContext[entityKeys=[],collectionKeys=[]];ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] collectionRemovals=[] collectionUpdates=[]]), /okm:trash)
2015-09-30 11:23:08,668 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.dao.KeyValueDAO- getKeyValues([], select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50')
2015-09-30 11:23:09,968 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.util.DatabaseMetadataUtils- replaceVirtual(, select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50')
2015-09-30 11:23:09,910 [Update Info] DEBUG com.openkm.dao.NodeBaseDAO- calculateUuidFromPath: f4dc4678-c4ff-416b-9871-c6c1f287c9b2
2015-09-30 11:23:10,415 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.dao.DatabaseMetadataDAO- findAllTypes()
2015-09-30 11:23:10,443 [Update Info] DEBUG com.openkm.dao.NodeBaseDAO- calculateUuidFromPath: f4dc4678-c4ff-416b-9871-c6c1f287c9b2
2015-09-30 11:23:10,474 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.dao.DatabaseMetadataDAO- findAllTypes: []
2015-09-30 11:23:10,497 [Update Info] DEBUG com.openkm.dao.NodeBaseDAO- getSubtreeCountHelper(NodeMail, f4dc4678-c4ff-416b-9871-c6c1f287c9b2, 1,  1)
2015-09-30 11:23:10,525 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.util.DatabaseMetadataUtils- replaceVirtual: select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50'
2015-09-30 11:23:10,584 [Update Info] DEBUG com.openkm.dao.NodeBaseDAO- getSubtreeCountHelper(NodeMail, 336457b6-753d-44df-9de3-70fe3b1654c6, 1,  2)
2015-09-30 11:23:11,029 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.dao.KeyValueDAO- getKeyValues(select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50')
2015-09-30 11:23:11,088 [Update Info] DEBUG com.openkm.dao.NodeBaseDAO- getSubtreeCountHelper(NodeMail, 366c2348-83c8-4f8e-8041-be2be7d0a6b0, 1,  2)
2015-09-30 11:23:11,151 [http-bio-0.0.0.0-8080-exec-9] ERROR com.openkm.servlet.frontend.WorkflowServlet- could not resolve property: $fornitore_id of: com.openkm.dao.bean.DatabaseMetadataValue [select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from com.openkm.dao.bean.DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50']
com.openkm.core.DatabaseException: could not resolve property: $fornitore_id of: com.openkm.dao.bean.DatabaseMetadataValue [select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from com.openkm.dao.bean.DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50']
	at com.openkm.dao.KeyValueDAO.getKeyValues(KeyValueDAO.java:67)

[/size]
Attachments
(91.38 KiB) Downloaded 661 times
 #40651  by jllort
 
What it fails is retrieve the selected value, at the begining you do not have a selected value but seems later you have a selected one ? Seems has not been able to internally rename the $fornitore_id to the col00

Follow the source code at KeyValueDAO line 78 ( set a breakpoint ). At this line the query should be replaced to real query and seems it fails because is arriving $fornitore_id and not col00 ( real column value ). Following the code from here you should take a look about what's happening on DatabaseMetadaUtils.java at line 245 ( replaceVirtual(String table, String query) )
 #40656  by intel74
 
hi jllort
i think problem was before... as you can read in the previous posted file cataliza.zip at rows 2294 and follows, the method KeyValueDAO- getKeyValues([], select ....) has no tablename specified, so calling DatabaseMetadataUtils- replaceVirtual(, select dmv.$fornitore_id,...) raise errore because the first parameter is null
I dont't understand if the problem is due to a software bug or a mistake in the configuration
I never can make running the selectbox example as written in the form element description page of the web site
I'll investigate and report you the news.... thansk a lot for your help

Code: Select all
[size=85]2015-09-30 11:23:08,668 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.dao.KeyValueDAO- getKeyValues([], select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50')
2015-09-30 11:23:09,968 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.util.DatabaseMetadataUtils- replaceVirtual(, select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50')
2015-09-30 11:23:09,910 [Update Info] DEBUG com.openkm.dao.NodeBaseDAO- calculateUuidFromPath: f4dc4678-c4ff-416b-9871-c6c1f287c9b2
2015-09-30 11:23:10,415 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.dao.DatabaseMetadataDAO- findAllTypes()
2015-09-30 11:23:10,443 [Update Info] DEBUG com.openkm.dao.NodeBaseDAO- calculateUuidFromPath: f4dc4678-c4ff-416b-9871-c6c1f287c9b2
2015-09-30 11:23:10,474 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.dao.DatabaseMetadataDAO- findAllTypes: []
2015-09-30 11:23:10,497 [Update Info] DEBUG com.openkm.dao.NodeBaseDAO- getSubtreeCountHelper(NodeMail, f4dc4678-c4ff-416b-9871-c6c1f287c9b2, 1,  1)
2015-09-30 11:23:10,525 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.util.DatabaseMetadataUtils- replaceVirtual: select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50'
2015-09-30 11:23:10,584 [Update Info] DEBUG com.openkm.dao.NodeBaseDAO- getSubtreeCountHelper(NodeMail, 336457b6-753d-44df-9de3-70fe3b1654c6, 1,  2)
2015-09-30 11:23:11,029 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.dao.KeyValueDAO- getKeyValues(select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50')
2015-09-30 11:23:11,088 [Update Info] DEBUG com.openkm.dao.NodeBaseDAO- getSubtreeCountHelper(NodeMail, 366c2348-83c8-4f8e-8041-be2be7d0a6b0, 1,  2)
2015-09-30 11:23:11,151 [http-bio-0.0.0.0-8080-exec-9] ERROR com.openkm.servlet.frontend.WorkflowServlet- could not resolve property: $fornitore_id of: com.openkm.dao.bean.DatabaseMetadataValue [select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from com.openkm.dao.bean.DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50']
com.openkm.core.DatabaseException: could not resolve property: $fornitore_id of: com.openkm.dao.bean.DatabaseMetadataValue [select dmv.$fornitore_id, dmv.$fornitore_ragionesociale  from com.openkm.dao.bean.DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50']
	at com.openkm.dao.KeyValueDAO.getKeyValues(KeyValueDAO.java:67)
	at com.openkm.dao.KeyValueDAO.getKeyValues(KeyValueDAO.java:79)
	at com.openkm.util.GWTUtil.copy(GWTUtil.java:887)
[/size]
 #40663  by jllort
 
If we take a look at the KeyValueDAO.java class https://sourceforge.net/p/openkm/code/H ... ueDAO.java you'll see several methods.

Really should be called List<KeyValue> getKeyValues(List<String> tables, String query) or List<KeyValue> getKeyValues(String table, String query). If is called directly the method List<KeyValue> getKeyValues(String query) then sure will raise and error ( because the query has not been transformed to right query ).

In log seems is doing correct call:
2015-09-30 11:23:08,668 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.dao.KeyValueDAO- getKeyValues([], select dmv.$fornitore_id, dmv.$fornitore_ragionesociale from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50')
2015-09-30 11:23:09,968 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.util.DatabaseMetadataUtils- replaceVirtual(, select dmv.$fornitore_id, dmv.$fornitore_ragionesociale from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50')

For it I suggest change select dmv.$fornitore_id, dmv.$fornitore_ragionesociale to select $fornitore_id, $fornitore_ragionesociale

I suggest you debug the result of method replaceVirtual because if it's returning to you the query :
select dmv.$fornitore_id, dmv.$fornitore_ragionesociale from com.openkm.dao.bean.DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50'
if normal not going right, the expected query should be
select dmv.col00, dmv.col01 from com.openkm.dao.bean.DatabaseMetadataValue dmv where dmv.table='FORNITORE' and dmv.$fornitore_id='50'

Debug de code to identify the possible problem ( why is not replacing the literalls )
 #40671  by intel74
 
hi jlllort thanks for your interest to my problem, I analyzed code and logs files... the problem occurs when table name passed to replacevirtual function was blank, in fact:
Code: Select all
public static String replaceVirtual(List<String> tables, String query) throws DatabaseException {
		String ret = query;
		for (String table : tables) {
			ret = replaceVirtual(table, ret);
		}
		return ret;
	}
In this case, when arrraylist "tables" was empty, replacevirtual routine returns the same query (ret=query) without replacing col00 and col01 .
I cheched error and logs file,
Code: Select all
at com.openkm.dao.KeyValueDAO.getKeyValues(KeyValueDAO.java:67)
	at com.openkm.dao.KeyValueDAO.getKeyValues(KeyValueDAO.java:79)
	at com.openkm.util.GWTUtil.copy(GWTUtil.java:887)
	at com.openkm.util.GWTUtil.copy(GWTUtil.java:689)
	at com.openkm.util.GWTUtil.copy(GWTUtil.java:653)
	at com.openkm.servlet.frontend.WorkflowServlet.findUserTaskInstances(WorkflowServlet.java:132)
I don't know why but error is due to the method gWTTaskInstance.setProcessInstance(copy(taskInstance.getProcessInstance())) of the GWTUtil class at rows 887. As you can see the routine method load and copy all formelements:
Code: Select all
else if (formElement instanceof SuggestBox) {
			GWTSuggestBox gWTsuggestBox = new GWTSuggestBox();
			gWTsuggestBox.setName(formElement.getName());
			gWTsuggestBox.setLabel(formElement.getLabel());
			gWTsuggestBox.setWidth(formElement.getWidth());
			gWTsuggestBox.setHeight(formElement.getHeight());
			SuggestBox suggestBox = (SuggestBox) formElement;
			gWTsuggestBox.setReadonly(suggestBox.isReadonly());
			gWTsuggestBox.setValidators(copyValidators(suggestBox.getValidators()));
			gWTsuggestBox.setValue(suggestBox.getValue());
			gWTsuggestBox.setDialogTitle(suggestBox.getDialogTitle());
			gWTsuggestBox.setTable(suggestBox.getTable());
			gWTsuggestBox.setFilterQuery(suggestBox.getFilterQuery());
			gWTsuggestBox.setValueQuery(suggestBox.getValueQuery());
			gWTsuggestBox.setFilterMinLen(suggestBox.getFilterMinLen());
			gWTsuggestBox.setData(suggestBox.getData());


but gWTsuggestBox.setValue(suggestBox.getValue()) getting blank value for tablename and after pass this blank value to method getKeyValue :
Code: Select all
List<KeyValue> keyValues = KeyValueDAO.getKeyValues(Arrays.asList(suggestBox.getTable()), formatedQuery);
and this implies that the function replaceVirtual, with blank tablename, goes in error.

have you got any suggestions for me to understand why the suggestBox.getTable() does not load the table name?
obviusly this only happens after I selected a list item in the suggestbox, the first time is all ok:
Code: Select all
015-10-05 18:33:04,581 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.dao.KeyValueDAO- getKeyValues([FORNITORE], select $fornitore_id, $fornitore_ragionesociale  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and lower(dmv.$fornitore_ragionesociale) like '%abb%' order by dmv.$fornitore_ragionesociale)
...
2015-10-05 18:33:04,898 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.util.DatabaseMetadataUtils- replaceVirtual 1    calling replaceVirtual2 (FORNITORE, select $fornitore_id, $fornitore_ragionesociale  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and lower(dmv.$fornitore_ragionesociale) like '%abb%' order by dmv.$fornitore_ragionesociale)
....
2015-10-05 18:33:07,833 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.util.DatabaseMetadataUtils- replaceVirtual 1    RETURN ---> ret= select col00, col01  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and lower(dmv.col01) like '%abb%' order by dmv.col01
2015-10-05 18:33:07,895 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.dao.KeyValueDAO- getKeyValues(select col00, col01  from DatabaseMetadataValue dmv where dmv.table='FORNITORE' and lower(dmv.col01) like '%abb%' order by dmv.col01)
2015-10-05 18:33:08,343 [http-bio-0.0.0.0-8080-exec-9] DEBUG com.openkm.dao.KeyValueDAO- getKeyValues: [{key=9, value=ABB S.P.A.}, {key=319, value=LA FABBRICASA S.R.L.}]
 #40673  by intel74
 
hi Jllort..... I finally (almost) solved !!!
I made a change to the GWTUtil class, in the follow method:
Code: Select all
public static FormElement copy(GWTFormElement formElement) 
I add a simple row to set the table name: suggestBox.setTable(gWTSuggestBox.getTable());
Code: Select all
} else if (formElement instanceof GWTSuggestBox) {
			SuggestBox suggestBox = new SuggestBox();
			suggestBox.setName(formElement.getName());
			GWTSuggestBox gWTSuggestBox = ((GWTSuggestBox) formElement);
			suggestBox.setReadonly(gWTSuggestBox.isReadonly());
			suggestBox.setValue(gWTSuggestBox.getValue());
			suggestBox.setFilterQuery(gWTSuggestBox.getFilterQuery());
			suggestBox.setValueQuery(gWTSuggestBox.getValueQuery());
			suggestBox.setFilterMinLen(gWTSuggestBox.getFilterMinLen());
			suggestBox.setData(gWTSuggestBox.getData());
			[b][color=#FF0000]suggestBox.setTable(gWTSuggestBox.getTable());[/color][/b]
			return suggestBox;
now I have only a question for you; I cannot use "data" parameter in the forms.xml like others formelement because for suggestbox is not allowed... so how can I pass the selected value of suggestbox between various workflow forms?
 #40687  by jllort
 
Take a look at class FormManager.java method:
Code: Select all
public void loadDataFromWorkflowVariables(Map<String, Object> map)
The idea should be save between workflows the value into the workflow variable context and then inject into data in some form element. The method loadDataFromWorkflowVariables is used to initialize values from that scenario. Hope it could help you.
 #40708  by intel74
 
hi jllort,
I have more forms in a workflow; in the first form User select values for suggestboxs and input elements, so on closing form start a transaction to store all the the selected values in the property group:
Code: Select all
Map map = new HashMap();
map.put("okp:fattura.numero",((Input) context.getContextInstance().getVariable("fattura_numero")).getValue());
map.put("okp:fattura.data",((Input) context.getContextInstance().getVariable("fattura_data")).getValue());
map.put("okp:fattura.imponibile",((Input) context.getContextInstance().getVariable("fattura_imponibile")).getValue());
map.put("okp:fattura.iva",((Input) context.getContextInstance().getVariable("fattura_iva")).getValue());
map.put("okp:fattura.tipopagamento",((Select) context.getContextInstance().getVariable("fattura_tipopagamento")).getValue());
map.put("okp:fattura.fornitore",((SuggestBox) context.getContextInstance().getVariable("fattura_fornitore")).getValue());
map.put("okp:fattura.centrocosto",((SuggestBox) context.getContextInstance().getVariable("fattura_centrocosto")).getValue());
map.put("okp:fattura.note",((TextArea) context.getContextInstance().getVariable("fattura_note")).getValue());
map.put("okp:fattura.stato","1"); // va in stato validazione
OKMPropertyGroup.getInstance().setPropertiesSimple(null, path, grpName, map);
so far all works!
In the second form I want to retrieve the values ​​of the previous form; using "data" attribute I have no problem for input box, but i cannot for suggestbox. I did several tests using java code but I've always an error on "setTaskIstanceValue" or nullpointerexception in setting value
You said to save value and then inject into data in some form element using loadDataFromWorkflowVariables, I don't understand how to use your suggest.
Please could you explain in brief hot to do... in a transaction after first form?.... before load the second form? .....on a specific event? or when??

thanks for your help
 #40716  by jllort
 
You should set a breakpoint at line 1965 in FormManager.java class ( OpenKM portable comes with portable firefox with GWT plugin installed for debugging -> see at debug option on eclipse for GWT Shell ).

See the mapping between form elements in method loadDataFromWorkflowVariables ( there are not implemented all combinations for example input value to suggestbox value etc..., in case suggest box now is only set suggestbox to suggest box, but you can extend ).

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.