我正在尝试创建wso2人工任务,其中必须由多个所有者按顺序给出批准。我从异步BPEL流程调用人工任务。我能够成功上传Process和任务包。但是当我尝试创建流程实例时,我在日志中遇到错误:
错误{org.wso2.carbon.humantask.core.integration.AxisHumanTaskMessageReceiver} - 任务创建失败。 显示java.lang.NullPointerException at org.wso2.carbon.humantask.core.dao.jpa.openjpa.model.provider.OrganizationalEntityProviderFactory.getOrganizationalEntityProvider(OrganizationalEntityProviderFactory.java:26) at org.wso2.carbon.humantask.core.dao.jpa.openjpa.JPATaskUtil.processGenericHumanRoles(JPATaskUtil.java:70) at org.wso2.carbon.humantask.core.dao.jpa.openjpa.HumanTaskDAOConnectionImpl.createTask(HumanTaskDAOConnectionImpl.java:64) at org.wso2.carbon.humantask.core.engine.HumanTaskEngine.createTask(HumanTaskEngine.java:81) at org.wso2.carbon.humantask.core.engine.HumanTaskEngine.access $ 000(HumanTaskEngine.java:38) at org.wso2.carbon.humantask.core.engine.HumanTaskEngine $ 1.call(HumanTaskEngine.java:100) at org.wso2.carbon.humantask.core.engine.HumanTaskEngine $ 1.call(HumanTaskEngine.java:93) at org.wso2.carbon.humantask.core.scheduler.SimpleScheduler.execTransaction(SimpleScheduler.java:880) at org.wso2.carbon.humantask.core.scheduler.SimpleScheduler.execTransaction(SimpleScheduler.java:829) at org.wso2.carbon.humantask.core.engine.HumanTaskEngine.invoke(HumanTaskEngine.java:93) at org.wso2.carbon.humantask.core.integration.AxisHumanTaskMessageReceiver.invokeBusinessLogic(AxisHumanTaskMessageReceiver.java:81) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110) 在org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) 在org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) 在org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:231) 在javax.servlet.http.HttpServlet.service(HttpServlet.java:755) 在javax.servlet.http.HttpServlet.service(HttpServlet.java:848) 在org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) 在org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128) 在org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68) 在javax.servlet.http.HttpServlet.service(HttpServlet.java:848) 在org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61) 在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) 在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) 在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) 在org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) 在org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:178) at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:49) 在org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141) at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156) 在org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52) 在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) 在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) 在org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004) at org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:589) 在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.run(NioEndpoint.java:1653) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(Unknown Source) 在java.lang.Thread.run(未知来源) [2014-02-07 12:33:32,878] WARN {org.wso2.carbon.bpel.b4p.extension.PeopleActivity} - SOAP Fault:urn:approveurn:uuid:1153d791-6283-4621-8b37-0e3a5095169esoapenv:Server < / p>
用于在任务中设置工作流程的代码段如下所示。
`&LT; HTD:peopleAssignments&GT; &LT; HTD:potentialOwners&GT; &lt; htd:sequence type =&#34; all&#34;&gt; &lt; htd:from logicalPeopleGroup =&#34; shippingLine&#34;&gt; &lt; htd:argument name =&#34; role&#34;&gt; shippingLineRole &LT; / HTD:参数&GT; &LT; / HTD:从大于; &lt; htd:from logicalPeopleGroup =&#34; cho&#34;&gt; &lt; htd:argument name =&#34; role&#34;&gt; choRole &LT; / HTD:参数&GT; &LT; / HTD:从大于; &LT; / HTD:序列&GT; &LT; / HTD:potentialOwners&GT;
`
知道这里出了什么问题。由于当工作流具有单一所有者时,任务创建工作正常。
答案 0 :(得分:0)
您的人员分配对多个用户来说是错误的。从BPS 3.1.0开始,WSO2 BPS支持基于表达式和基于文字的用户分配。如果您需要多个用户分配,则需要使用基于表达式或基于文字的用户分配。有关正确的语法,请参阅humantask规范[1]。
[1] http://docs.oasis-open.org/bpel4people/ws-humantask-1.1-spec-cs-01.html#_Ref193111939