Is there an example which can run in WebPortal

I created a simple workflow. It upload file by File Upload Nodes, do some simple calcuation and output to an excel file. I wish the WebPortal user can upload their own file and download the output excel from the webportal. Then I upload the workflow to the web portal and double click to run it, it do show the upload interface, and the file do uploaded successfully. But then, nothing happens. The File Upload interface show again. I do not know whether the workflow worked. And I can not found where to get the result file.

Is there an example which can run in WebPortal. So i can start from it.

Thank you very much.

Hello,

It sounds like you have a grasp of the process, but aren't doing anything with the results. Usually these results are presented to the user with a combination of file downloads and/or a BIRT report. Attached is a small example that shows how to do some common tasks in the webportal. Have a look and let me know if this clears things up at all.

Best Regards,

Aaron

ps. The workflow is designed to work with the "data.all" file from the Iris folder in the KNIME installation directory.

webportal_example.zip

screen_shot_2013-04-02_at_9.42.36_am.png

Dear Aaron,

Thanks for your help.

I downloaded the example and run it in my local client, it works fine.

But when I upload it to the server and run it in the webportal, It require me to upload a file, choose a column for Class Selector and Class Selector. But there is nothing in the chooser so I cannot make any selection and I can not move forward now.

You can find my situation in the attachment.

Would you please tell me how to handle this sitution.

Thank you.

Yours

Madlee

BTW, we are using 2.6.3

knime_webportal.png

Hi Madlee,

May I ask what version of KNIME Server/Webportal you are running? I ask because in your view I see both the file upload, and the value filter widgets on the same page and they "should" be on subsequent pages. This suggests to me that you may be running version 3.4, in which stepwise execution isn't available yet. Can you confirm this?

Regards,

Aaron

Where to find out the server version?

I found this in Admin Port of Glass fish.

Applications > Web Applications > com.knime.enterprise.webportal_3.5.1

So I think it is 3.5.1

That is correct. The results you see don't make much sense to me yet, but I am looking into it. In the meantime, here is an example I created using 2.6.3. Does this work better for you?

Regards,

Aaron

webportal2_6_3.zip

:(

It did not work either.

It shows the upload form. I pick up the file I want to upload, it seems that the file is uploaded and I do find it in the /tmp folder of server.

Then I click the Next button, it return to the first interface, shows the upload form again. And No other happens. No tmp folder was created and no CSV was write. I can not find any clues from the log files and Nothing happens on the Web Portal Interface.

I can find some information from the KNIME client.

There are messages for workflow "WebPortal2_6_3 2013-04-03 14.28.58"
CSV Writer 0:13 - WARNING: Can't determine parent directory of file "C:\Users\lifej\tmp\madlee.test.csv"
CSV Writer 0:11 - WARNING: Directory of specified output file doesn't exist and will be created.
File Reader 0:1 - WARNING: The file 'file:/C:/madlee/Incoming/Program/KNIME/KNIME/IrisDataset/data.all' can't be accessed anymore!
File Download 0:2 - WARNING: Variable "out_csv" does not denote an existing file: /tmp/madlee_f940e79f-de01-4e8c-bffc-5a90791579fb/out.csv

It seems that the File Reader is reading from the original file I used in my client. But I think it should read data from my uploaded file in /tmp folder.

Now that is quite strange, as I made sure to test this on our 3.5 server before I uploaded it and it worked fine. Just to verify, you didn't change the workflow at all from the time it was iimported to when you uploaded it to the server? This includes the execution state of the workflow as this state is somethng that the server deliberately respects.

Aaron

I got an warning when I import the workflow, And here is the details:

WebPortal2_6_3 2 loaded with warnings
WebPortal2_6_3 2
File Reader 2:1
State has changed from CONFIGURED to IDLE

And I also found an exception in our knime-webportal.log

2013-04-03 14:28:20,328 - httpSSLWorkerThread-8080-2 ERROR main.WorkflowJobInputPanel - Failed to load quickform input: Unable to load quickform components for workflow.
com.knime.enterprise.webportal.ui.component.InvalidComponentException: Unable to load quickform components for workflow.
at com.knime.enterprise.webportal.jee.ExecutionHandler.loadQuickFormInElements(ExecutionHandler.java:222)
at com.knime.enterprise.webportal.ui.component.main.WorkflowJobInputPanel.loadNextQuickforms(WorkflowJobInputPanel.java:146)
at com.knime.enterprise.webportal.ui.component.main.WorkflowJobInputPanel.onExecute(WorkflowJobInputPanel.java:109)
at com.knime.enterprise.webportal.ui.component.main.ExecButtonBar$1.buttonClick(ExecButtonBar.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.vaadin.event.ListenerMethod.receiveEvent(ListenerMethod.java:512)
at com.vaadin.event.EventRouter.fireEvent(EventRouter.java:164)
at com.vaadin.ui.AbstractComponent.fireEvent(AbstractComponent.java:1219)
at com.vaadin.ui.Button.fireClick(Button.java:550)
at com.vaadin.ui.Button.changeVariables(Button.java:217)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.changeVariables(AbstractCommunicationManager.java:1455)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1399)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1318)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:763)
at com.vaadin.terminal.gwt.server.CommunicationManager.handleUidlRequest(CommunicationManager.java:296)
at com.vaadin.terminal.gwt.server.AbstractApplicationServlet.service(AbstractApplicationServlet.java:501)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
Caused by: com.knime.enterprise.utility.ExecutorException: Invalid server job id
at com.knime.enterprise.server.WorkflowPoolManagerBean.checkAccessForModification(WorkflowPoolManagerBean.java:739)
at com.knime.enterprise.server.WorkflowPoolManagerBean.loadQuickFormInElements(WorkflowPoolManagerBean.java:687)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:4039)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:483)
at com.sun.ejb.Invocation.proceed(Invocation.java:498)
at com.knime.enterprise.server.WorkflowPoolManagerBean.countClientRequests(WorkflowPoolManagerBean.java:1316)
at sun.reflect.GeneratedMethodAccessor102.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.ejb.containers.interceptors.BeanAroundInvokeInterceptor.intercept(InterceptorManager.java:620)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:483)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:205)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4012)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:197)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:83)
at $Proxy56.loadQuickFormInElements(Unknown Source)
at com.knime.enterprise.server.WorkflowExecutorBean.loadQuickFormInElements(WorkflowExecutorBean.java:218)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1011)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:175)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2929)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:4020)
at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:203)
at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:77)
at $Proxy51.loadQuickFormInElements(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:154)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:687)
at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:227)
at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1846)
at com.sun.corba.ee.impl.protocol.SharedCDRClientRequestDispatcherImpl.marshalingComplete(SharedCDRClientRequestDispatcherImpl.java:183)
at com.sun.corba.ee.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:222)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:192)
at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:152)
at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:225)
at com.knime.enterprise.client.api.__WorkflowExecutorBeanRemote_Remote_DynamicStub.loadQuickFormInElements(com/knime/enterprise/client/api/__WorkflowExecutorBeanRemote_Remote_DynamicStub.java)
at com.knime.enterprise.client.api._WorkflowExecutorBeanRemote_Wrapper.loadQuickFormInElements(com/knime/enterprise/client/api/_WorkflowExecutorBeanRemote_Wrapper.java)
at com.knime.enterprise.webportal.jee.ExecutionHandler.loadQuickFormInElements(ExecutionHandler.java:429)
at com.knime.enterprise.webportal.jee.ExecutionHandler.loadQuickFormInElements(ExecutionHandler.java:219)
... 46 more

Wish it helps.

The first warning is not very suprising, as the file I have specified by default probably doesn't exist in teh same location on the file system. Once you point the File Upload node at a valid copy of the iris data does it then execute locally?

Yeah, It can run correctly on clint. And it also can run on server directly. But it can not run in WebPortal.