问题
I am trying to create wso2 human task where the approval has to be given by multiple owners in some sequence. I am calling human task from Asynchronous BPEL process. I am able to upload the Process and task packages successfully. But when I try to create the process instance, i am getting below error in the logs:
ERROR {org.wso2.carbon.humantask.core.integration.AxisHumanTaskMessageReceiver} - Task creation failed. 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) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) at org.wso2.carbon.core.transports.CarbonServlet.doPost(CarbonServlet.java:231) at javax.servlet.http.HttpServlet.service(HttpServlet.java:755) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128) at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:68) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.wso2.carbon.tomcat.ext.servlet.DelegationServlet.service(DelegationServlet.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.wso2.carbon.tomcat.ext.filter.CharacterSetFilter.doFilter(CharacterSetFilter.java:61) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at 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) at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:141) at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:156) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936) at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:52) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at 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) at java.lang.Thread.run(Unknown Source) [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
Code snippet for setting the workflow in Task is given below.
`<htd:peopleAssignments> <htd:potentialOwners> <htd:sequence type="all"> <htd:from logicalPeopleGroup="shippingLine"> <htd:argument name="role"> shippingLineRole </htd:argument> </htd:from> <htd:from logicalPeopleGroup="cho"> <htd:argument name="role"> choRole </htd:argument> </htd:from> </htd:sequence> </htd:potentialOwners>
`
Any idea what is going wrong here. As the task creation is working fine when workflow has single owner.
回答1:
Your people assignment is wrong for multiple users. From BPS 3.1.0 WSO2 BPS supports Expression and literal based user assignment. If you need multiple user assignments you need to use either expression based or literal based user assignment. See humantask spec [1] for correct syntax.
[1] http://docs.oasis-open.org/bpel4people/ws-humantask-1.1-spec-cs-01.html#_Ref193111939
来源:https://stackoverflow.com/questions/21621847/wso2-bps-3-2-human-task-assignment-to-multiple-people-creating-process-in-failed