workflow带前置表单创建流程实例的方法

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/hsg77/article/details/98879062

workflow带前置表单创建流程实例的方法

先创建流程实例再保存表单记录值的方法
保存js脚本如下所示:

var ctrl_pioid  = GetValue('fd_pioid');
var pioid       = '';
var POID        = 'bb5ff44c-9095-4c9a-9bdd-f834dc437fa5-ql6';   //流程编号
var NewFlowName = GetValue('fd_bgmc');
var pri_idx     = 0;
if(ctrl_pioid=='' && fmode=='insert'){   
    var callbackSuccess=function(t_pioid){   //创建流程实例成功后再保存此变更登记表单
       SetValue('fd_pioid',t_pioid);
       SaveForm2(function(){  
          parent.CloseForm(true);
       });
    };
    var callbackUnSuccess=function(errMsg){
         ShowAlert(errMsg);
    };
    var isFormOut = false;
    CreateFlowInstance(POID, NewFlowName,pri_idx, callbackSuccess, callbackUnSuccess, isFormOut);
}else{   
    if(fmode=='update'){
        //保存此变更登记表单
        SaveForm2(function(){  
            parent.CloseForm(true);
        });
    }
}
展开阅读全文

jbpm 创建流程实例时 org.jbpm.scheduler.exe.Timer is not mapped.java.lang.IndexOutOfBoun

08-27

项目中的代码是:rnpublic JbpmContext getJbpmContext() rn JbpmConfiguration config = JbpmConfiguration.getInstance(); rn JbpmContext jc = config.getCurrentJbpmContext() ;rn if(jc == null)rn jc = config.createJbpmContext() ;rn rn return jc ;rn rn rn /**rn * 开始一个流程rn */rn public void newProcessInstance(String issueperson,String wzId , String approvePersonId)rn JbpmContext jc = getJbpmContext() ;rn try rn jc.setActorId(issueperson) ;rn ProcessDefinition pd = jc.getGraphSession().findLatestProcessDefinition("zwTest") ;rn ProcessInstance pi = pd.createProcessInstance() ;rn ContextInstance ci = pi.getContextInstance() ;rn ci.setVariable("issue_person", issueperson) ;rn ci.setVariable( APPROVE_ONE_PERSON , approvePersonId) ;rn ci.setVariable( "wzId" , wzId) ;rn TaskInstance ti = pi.getTaskMgmtInstance().createStartTaskInstance() ;rn ti.setVariable("wzId", wzId) ;rn ti.end() ;rn catch (Exception e) rn e.printStackTrace() ;rn finallyrn if(jc != null)jc.close() ;rn rn rn rnrn执行到ProcessDefinition pd = jc.getGraphSession().findLatestProcessDefinition("zwTest") ;rn得时候报出:rn18:15:20,125 [http-8082-9] WARN ErrorCounter : *** WARNING: Keyword 'end' is being intepreted as an identifier due to: expecting IDENT, found 'end'rn18:15:20,125 [http-8082-9] WARN ErrorCounter : *** WARNING: Keyword 'end' is being intepreted as an identifier due to: expecting IDENT, found 'end'rn18:15:20,140 [http-8082-9] ERROR ErrorCounter : *** ERROR: line 3:31: expecting "set", found 'job'rn18:15:20,156 [http-8082-9] ERROR ErrorCounter : *** ERROR: org.jbpm.scheduler.exe.Timer is not mapped.rnjava.lang.IndexOutOfBoundsException: Index: 0, Size: 0rn at java.util.ArrayList.RangeCheck(ArrayList.java:547)rn at java.util.ArrayList.get(ArrayList.java:322)rn at org.hibernate.hql.ast.HqlSqlWalker.postProcessDelete(HqlSqlWalker.java:418)rn at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:175)rn at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:189)rn at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:130)rn at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:83)rn at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:427)rn at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:388)rn at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:291)rn at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)rn at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)rn at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:95)rn at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99)rn at org.jbpm.persistence.db.DbPersistenceService.getGraphSession(DbPersistenceService.java:341)rn at org.jbpm.JbpmContext.getGraphSession(JbpmContext.java:571)rn at catt.irr.web.struts.action.baseaction.BaseDispatchAction.newProcessInstance(BaseDispatchAction.java:37)rn at catt.irr.ncsl.struts.informationaction.InformationAction.AddInfo(InformationAction.java:223)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:269)rn at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170)rn at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)rn at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:53)rn at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:64)rn at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)rn at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)rn at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)rn at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)rn at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)rn at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)rn at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at catt.irr.web.util.CharacterCodeFilter.doFilter(CharacterCodeFilter.java:57)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)rn at java.lang.Thread.run(Thread.java:619) 论坛

没有更多推荐了,返回首页