cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Workflow in Workdesk

mokus16
Champ in-the-making
Champ in-the-making
Hi,

I’m trying to define a custom WF with its custom task model for the Workdesk environment. I followed the HR Vacation Approval demo, but my process is not working correctly.

The initiator starts the WF with the attached document, but when the second user (reviewer) clicks on the Case Management master plugin in Workdesk even the task list is not generated, and he gets this error message:


Error: Could not get class for task instance!
Error Source: OECM
java.lang.reflect.InvocationTargetException
   at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at com.wewebu.ow.server.ui.OwAppContext.handleRequest(OwAppContext.java:998)
   at com.wewebu.ow.server.app.OwMainAppContext.handleRequest(OwMainAppContext.java:659)
   at com.wewebu.ow.server.ui.OwWebApplication.handleRequest(OwWebApplication.java:359)
   at org.apache.jsp.default41_jsp._jspService(default41_jsp.java:79)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
   at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
   at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
   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 com.wewebu.ow.server.servlets.OwServletFilter.doFilter(OwServletFilter.java:57)
   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:744)
Caused by: com.wewebu.ow.server.exceptions.OwServerException: Could not get class for task instance!
   at com.wewebu.ow.server.ecmimpl.alfresco.bpm.OwAlfrescoBPMWorkItem.(OwAlfrescoBPMWorkItem.java:103)
   at com.wewebu.ow.server.ecmimpl.alfresco.bpm.OwAlfrescoBPMUserQueueContainer.getChildren(OwAlfrescoBPMUserQueueContainer.java:74)
   at com.wewebu.ow.server.ecmimpl.alfresco.bpm.OwAlfrescoBPMWorkitemContainer.getChildCount(OwAlfrescoBPMWorkitemContainer.java:231)
   at com.wewebu.ow.server.plug.owbpm.OwBPMQueue.getItemCount(OwBPMQueue.java:214)
   at com.wewebu.ow.server.plug.owbpm.OwBPMView.updateQueueCount(OwBPMView.java:179)
   at com.wewebu.ow.server.plug.owbpm.OwBPMView.onActivate(OwBPMView.java:93)
   at com.wewebu.ow.server.ui.OwNavigationView.navigate(OwNavigationView.java:285)
   at com.wewebu.ow.server.ui.OwNavigationView.onNavigate(OwNavigationView.java:409)
   … 35 more
Caused by: com.wewebu.ow.server.exceptions.OwObjectNotFoundException: Requested object class (D:sldcmwf:contractReviewTask) not found
   at com.wewebu.ow.server.ecmimpl.opencmis.OwCMISNetwork.getObjectClass(OwCMISNetwork.java:1096)
   at com.wewebu.ow.server.ecmimpl.opencmis.OwCMISNetwork.getObjectClass(OwCMISNetwork.java:1)
   at com.wewebu.ow.server.ecmimpl.alfresco.bpm.OwAlfrescoBPMWorkItem.(OwAlfrescoBPMWorkItem.java:97)
   … 42 more
Caused by: org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException: Type 'D:sldcmwf:contractReviewTask' is unknown!
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:432)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:554)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getTypeDefinitionInternal(AbstractAtomPubService.java:821)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:88)
   at org.apache.chemistry.opencmis.client.bindings.impl.RepositoryServiceImpl.getTypeDefinition(RepositoryServiceImpl.java:137)
   at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getTypeDefinition(SessionImpl.java:518)
   at com.wewebu.ow.server.ecmimpl.opencmis.OwCMISSimpleObjectClassFactory.retrieveObjectType(OwCMISSimpleObjectClassFactory.java:164)
   at com.wewebu.ow.server.ecmimpl.opencmis.alfresco.OwCMISAlfrescoObjectClassFactory.retrieveObjectType(OwCMISAlfrescoObjectClassFactory.java:179)
   at com.wewebu.ow.server.ecmimpl.opencmis.OwCMISRepositorySession.getNativeObjectClass(OwCMISRepositorySession.java:211)
   at com.wewebu.ow.server.ecmimpl.opencmis.OwCMISRepositorySession.getObjectClass(OwCMISRepositorySession.java:235)
   at com.wewebu.ow.server.ecmimpl.opencmis.OwCMISRepositorySession.getObjectClass(OwCMISRepositorySession.java:1)
   at com.wewebu.ow.server.ecmimpl.opencmis.OwCMISNetwork.getObjectClass(OwCMISNetwork.java:1084)
   … 44 more


If the same user is logged in to Share, he can see/start this custom task in which the custom properties are also displayed.

I do not understand why Workdesk cannot recognize my custom task model.

Any suggestions?

Thanks in advance.

Alfresco version: 4.2.1 Trial
Workdesk version: 4.1.1.1. Trial
3 REPLIES 3

deko
Star Contributor
Star Contributor
Hi mokus16,

I don´t know the HR vacation approval demo you are talking about, but the error message is clear. The object class D:sldcmwf:contractReviewTask does not exist.

Did you use this class somewhere in your owplugins.xml configurations, especially in the Case Management plugin? I can´t think of any other reason why Share would display the tasks and Workdesk wouldn´t. In fact, both are retreiving the same objects from the Activiti API.

You could also attach your owplugins.xml and your owbootstrap.xml config files if you want me to have a look here.

Best regards,
deko

d_evil
Champ in-the-making
Champ in-the-making
Hi mokus16,

that problem I run into also, the problem is that Workdesk is using the CMIS type definition to get information about the fields in a Workflow Task/Step. Therefore it try to request them from Alfresco repository through CMIS.

Issue is now that it seems if you deploy your Workflow model only through BPM-Deployment bean, your type definitions will not be provide through CMIS API sometimes (could not find out when it happens, and behavior is new since Alfresco 4.2.x).
My workaround was to define the model once more, to be loaded also with the dictionary bean of Alfresco, like you do for custom models.

Maybe it will work for you too!

Cheers,
D.evil

mokus16
Champ in-the-making
Champ in-the-making
Thank you very much for the both prompt replies.
The workaround that D.evil wrote solved my problem. Thanks a lot.