Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JBPM-7331 - Process and Task dashboard fail to load date based widgets #1137

Merged
merged 1 commit into from Jun 5, 2018

Conversation

cristianonicolai
Copy link
Contributor

No description provided.

@@ -391,9 +398,13 @@ protected void handleDataSetGroup(DataSetDef def, DataSetGroup dataSetGroup, Lis
null,
Arrays.asList(groupFunction.getColumnId())));
extraColumns.add(new DataColumnImpl(groupFunction.getSourceId(),
def.getColumnById(groupFunction.getColumnId()).getColumnType()));
getGroupFunctionColumnType(def.getColumnById(groupFunction.getColumnId()).getColumnType())));
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cristianonicolai I think this DATE to LABEL "fix" must only be applied to the group column:

...
extraColumns.add(new DataColumnImpl(groupFunction.getSourceId(), getGroupFunctionColumnType(columnGroup, groupFunction)));
}
}
}

protected ColumnType getGroupFunctionColumnType(final ColumnGroup columnGroup, final GroupFunction groupFunction) {
ColumnType type = def.getColumnById(groupFunction.getColumnId()).getColumnType();
return type == ColumnType.DATE && columnGroup.getSourceId().equals(groupFunction.getSourceId()) ? ColumnType.LABEL : type;
}

wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me so +1

Copy link
Contributor

@mswiderski mswiderski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me with change suggested by @dgutierr

@@ -391,9 +398,13 @@ protected void handleDataSetGroup(DataSetDef def, DataSetGroup dataSetGroup, Lis
null,
Arrays.asList(groupFunction.getColumnId())));
extraColumns.add(new DataColumnImpl(groupFunction.getSourceId(),
def.getColumnById(groupFunction.getColumnId()).getColumnType()));
getGroupFunctionColumnType(def.getColumnById(groupFunction.getColumnId()).getColumnType())));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me so +1

@cristianonicolai
Copy link
Contributor Author

@dgutierr applied changes, thanks for the help.

@jhrcek
Copy link

jhrcek commented Jun 1, 2018

@cristianonicolai thanks for fixing this so quickly :-) I need to verify this locally, so
Jenkins execute full downstream build

EDIT: Come to think of it, do you think it would be feasible to implement integration test for this? Perhaps something including kie-server with some process data and doing dataset lookup from that? Not that I'll block merging this PR, but would be interested in catching this kind of failures earlier than with UI tests.. (cc @mswiderski)

@jhrcek
Copy link

jhrcek commented Jun 1, 2018

For some reason there's FDB didn't start. Trying to build this locally and just in case ..
Jenkins execute full downstream build

Copy link

@jhrcek jhrcek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So tested this locally and the two charts that were broken are now displaying data. But there are still couple issues:

  1. whenever I go to Task Reports / Process Reports, the following exception appears in server.log
exception
12:51:31,486 ERROR [org.dashbuilder.exception.ExceptionManager] (default task-31) Can't lookup on specified data set: processesMonitoring: org.dashbuilder.dataset.exception.DataSetLookupException: Can't lookup on specified data set: processesMonitoring
	at org.dashbuilder.dataset.DataSetManagerImpl.lookupDataSet(DataSetManagerImpl.java:156)
	at org.dashbuilder.dataset.DataSetManagerCDI$Proxy$_$$_WeldClientProxy.lookupDataSet(Unknown Source)
	at org.dashbuilder.dataset.service.DataSetLookupServicesImpl.lookupDataSet(DataSetLookupServicesImpl.java:78)
	at org.dashbuilder.dataset.service.DataSetLookupServicesImpl$Proxy$_$$_WeldClientProxy.lookupDataSet(Unknown Source)
	at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.errai.bus.server.io.AbstractRPCMethodCallback.invokeMethodFromMessage(AbstractRPCMethodCallback.java:65)
	at org.jboss.errai.bus.server.io.ValueReplyRPCEndpointCallback.callback(ValueReplyRPCEndpointCallback.java:40)
	at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54)
	at org.jboss.errai.cdi.server.CDIExtensionPoints$2.callback(CDIExtensionPoints.java:448)
	at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47)
	at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:297)
	at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46)
	at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:96)
	at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:113)
	at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:144)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
	at io.undertow.websockets.jsr.JsrWebSocketFilter.doFilter(JsrWebSocketFilter.java:130)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.uberfire.ext.security.server.SecureHeadersFilter.doFilter(SecureHeadersFilter.java:110)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at org.uberfire.ext.security.server.SecurityIntegrationFilter.doFilter(SecurityIntegrationFilter.java:70)
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:64)
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
	at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
	at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:53)
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
	at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:59)
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
	at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
	at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:330)
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
	at org.jbpm.workbench.ks.integration.KieServerDataSetProvider.getGroupFunctionColumnType(KieServerDataSetProvider.java:413)
	at org.jbpm.workbench.ks.integration.KieServerDataSetProvider.handleDataSetGroup(KieServerDataSetProvider.java:401)
	at org.jbpm.workbench.ks.integration.KieServerDataSetProvider.lookupDataSet(KieServerDataSetProvider.java:155)
	at org.jbpm.workbench.ks.integration.KieServerDataSetProvider$Proxy$_$$_WeldClientProxy.lookupDataSet(Unknown Source)
	at org.dashbuilder.dataset.DataSetManagerImpl.lookupDataSet(DataSetManagerImpl.java:154)
	... 71 more
  
  1. "View table" link on the right in both perspectives shows this:
    screenshot from 2018-06-01 12-51-18

  2. Clicking metrics displayers at the top ("Active processes" etc.) shows this:
    screenshot from 2018-06-01 12-53-14

@cristianonicolai
Copy link
Contributor Author

@jhrcek thanks I fixed the latest errors.
I definitely agree with the integration tests approach. Ideally, we should have a process deployed and start so we can test that all of these related data sets works as expected. We did a small step already to check that the queries are registered as expected in a live kie server instance. I will open a JIRA to track this enhancement.

@jhrcek
Copy link

jhrcek commented Jun 4, 2018

Jenkins execute full downstream build

Copy link

@jhrcek jhrcek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cristianonicolai so I executed the Dashboard UI tests locally with this and they passing 100% again. Thanks :)

@cristianonicolai cristianonicolai merged commit b91212a into kiegroup:master Jun 5, 2018
@cristianonicolai cristianonicolai deleted the JBPM-7331 branch June 5, 2018 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants