Hi, Can anyone help me with this?
How can I call SCA service directly from JBPM5 script task? Somehow Tuscany could not resolve the "default" URI Best regards Binh, Nguyen Thanh From: Makiet [mailto:binhn...@viettel.com.vn] Sent: Friday, September 07, 2012 4:31 PM To: 'dev@tuscany.apache.org' Cc: bin...@viettel.com.vn Subject: Could NOT call SCA service directly from JBPM 5 Script task Hi, I have a business flow BPMN in JBpm5, there're some node call SCA services in the flow. If I create a WorkItem handler and register with a class (*) which call SCA services, every thing's ok. But if I create a Script task and put the code that call SCA services in the class (*), I 'll get a compilation error: "URI cannot be resolved" Here is the code in the WorkItem StockTransForm stock = (StockTransForm) item.getParameter("stock"); transactionsId = item.getParameter("transactionsId").toString(); SCAClientFactory factory = SCAClientFactory.newInstance(URI.create("default")); QuotaService service = factory.getService(QuotaService.class, "QuotaComponent/QuotaService/QuotaServiceWS"); quotaBO = service.findQuota(Long.valueOf(transactionsId),stock.getShopSourceId(),stock .getProductId()); Code in Script task SCAClientFactory factory = SCAClientFactory.newInstance(URI.create("default")); QuotaService service = factory.getService(QuotaService.class, "QuotaComponent/QuotaService/QuotaServiceWS"); quotaBO = service.findQuota(Long.valueOf(transactionsId),stock.getShopSourceId(),stock .getProductId()); kcontext.setVariable("quotaBO", quotaBO); Full stack trace: Process Compilation error : org.drools.lang.descr.ProcessDescr@121a4de org/drools/bpmn2/Process_org_drools_bpmn2_Transfer_Stock_a73bac1a4b924796903 317816e7a9010.java (12:921) : URI cannot be resolved java.lang.IllegalArgumentException: Could not parse knowledge. at org.drools.builder.impl.KnowledgeBuilderImpl.newKnowledgeBase(KnowledgeBuild erImpl.java:73) at com.viettel.bccs2.jbpm.ExcecuteProcess.readKnowledgeBase(ExcecuteProcess.jav a:69) at com.viettel.bccs2.jbpm.ExcecuteProcess.runDemo(ExcecuteProcess.java:31) at com.viettel.bccs2.jbpm.servlet.StockTransBpmServlet.doGet(StockTransBpmServl et.java:52) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:210) at org.apache.tuscany.sca.host.webapp.TuscanyServletFilter.doFilter(TuscanyServ letFilter.java:93) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:225) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase .java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168 ) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927) 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(AbstractHttp11Proce ssor.java:999) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abstrac tProtocol.java:565) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java: 307) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Best regards,