2 qq 29210013 qq_29210013 于 2016.09.23 10:44 提问

关于fire workflow的创建流程不能获取WorkflowSession

transactionTemplate.execute(new TransactionCallback() {

        @Override
        public Object doInTransaction(TransactionStatus arg0) {
            try {
                // 1、保存请假信息
                leaveApplicationDAO.save(leaveApplicationInfo);

                // 2、创建流程实例
                IWorkflowSession workflowSession = runtimeContext
                        .getWorkflowSession();

                IProcessInstance processInstance = workflowSession
                        .createProcessInstance("LeaveApplicationProcess",
                                currentUser == null ? "--" : currentUser
                                        .getId());

                // 3、设置流程变量
                processInstance.setProcessInstanceVariable("sn",
                        leaveApplicationInfo.getSn());
                processInstance.setProcessInstanceVariable("applicantId",
                        leaveApplicationInfo.getApplicantId());
                processInstance.setProcessInstanceVariable("leaveDays",
                        leaveApplicationInfo.getLeaveDays());

                // 4、启动流程实例
                processInstance.run();
            } catch (EngineException e) {
                e.printStackTrace();
                req.setAttribute("ERR", "错误: "+e.getMessage());
            } catch (KernelException e) {
                e.printStackTrace();
                req.setAttribute("ERR", "错误: "+e.getMessage());
            }
            return null;
        }

    });

报的错误是
严重: Servlet.service() for servlet [submitApplicationServlet] in context with path [/sshWorkFlow] threw exception [Servlet execution threw an exception] with root cause
java.lang.ClassNotFoundException: org.fireflow.engine.impl.WorkflowSession$1
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
at org.fireflow.engine.impl.WorkflowSession._createProcessInstance(WorkflowSession.java:95)
at org.fireflow.engine.impl.WorkflowSession.createProcessInstance(WorkflowSession.java:227)
at org.fireflow.example.leaveapplication.bizservlets.SubmitApplicationServlet$1.doInTransaction(SubmitApplicationServlet.java:68)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
at org.fireflow.example.leaveapplication.bizservlets.SubmitApplicationServlet.doPost(SubmitApplicationServlet.java:55)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.fireflow.example.ou.CurrentUserFilter.doFilter(CurrentUserFilter.java:32)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1100)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:687)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

1个回答

dabocaiqq
dabocaiqq   2016.09.24 23:31
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!