You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by "Saravanan Chinthamani (NC)" <nc...@clearorbit.com> on 2007/02/22 01:16:56 UTC

Using shark to call ofbiz services

We are having trouble integrating our workflows using the Shark engine
in ofbiz.  Our problem occurs when using XPDL activity tools to invoke
service calls in ofbiz.

 

We defined the tools of type "Application" referencing applications with
the following extended attributes:

 

AppName - The name of the service to invoke

ToolAgentClass - org.ofbiz.shark.tool.ServiceEngineAgent

 

 

We are executing these workflows via service calls of type "workflow" to
kick off the initial workflow process.  Everything seems to work
correctly, however, when the aforementioned tools are executed we are
getting the exception below.  The error occurs because the service we
are invoking requires authentication, and the ServiceEngineAgent ofbiz
tool agent is not providing authentication when executing the service
call.

 

What we would like to know is if we should be using the
ServiceEngineAgent tool for perform ofbiz service calls, or if there is
a better alternative.  Also, if we are supposed to use this tool, then
how we set it up to provide user authentication?

 

Thanks for any help in advance

-Saravanan

 

 

 

 

---- exception report
----------------------------------------------------------

Service [changeOrderStatus] threw an unexpected exception/error

Exception: org.ofbiz.service.ServiceAuthException

Message: User authorization is required for this service:
changeOrderStatus

---- stack trace
---------------------------------------------------------------

org.ofbiz.service.ServiceAuthException: User authorization is required
for this service: changeOrderStatus

org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:311)

org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:211)

org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:113)

org.ofbiz.shark.tool.ServiceEngineAgent.invokeApplication(ServiceEngineA
gent.java:65)

org.enhydra.shark.toolagent.DefaultToolAgent.invokeApplication(DefaultTo
olAgent.java:72)

org.enhydra.shark.ThreadedToolAgentManager$ToolRunner.invokeApplication(
ThreadedToolAgentManager.java:224)

org.enhydra.shark.ThreadedToolAgentManager$ToolRunner.run(ThreadedToolAg
entManager.java:128)

org.enhydra.shark.ThreadedToolAgentManager.executeActivity(ThreadedToolA
gentManager.java:88)

org.enhydra.shark.WfActivityImpl.runTool(WfActivityImpl.java:1269)

org.enhydra.shark.WfActivityImpl.startActivity(WfActivityImpl.java:1212)

org.enhydra.shark.WfActivityImpl.activate(WfActivityImpl.java:1157)

org.enhydra.shark.WfProcessImpl.startActivity(WfProcessImpl.java:816)

org.enhydra.shark.WfProcessImpl.run(WfProcessImpl.java:695)

org.enhydra.shark.WfProcessImpl.start(WfProcessImpl.java:365)

org.enhydra.shark.WfProcessWrapper.start(WfProcessWrapper.java:571)

org.enhydra.shark.WfProcessWrapper.start(WfProcessWrapper.java:531)

org.ofbiz.shark.service.SharkServiceEngine.runWf(SharkServiceEngine.java
:223)

org.ofbiz.shark.service.SharkServiceEngine.runAsync(SharkServiceEngine.j
ava:101)

org.ofbiz.shark.service.SharkServiceEngine.runAsync(SharkServiceEngine.j
ava:115)

org.ofbiz.service.ServiceDispatcher.runAsync(ServiceDispatcher.java:562)

org.ofbiz.service.ServiceDispatcher.runAsync(ServiceDispatcher.java:629)

org.ofbiz.service.GenericDispatcher.runAsync(GenericDispatcher.java:180)

org.ofbiz.service.eca.ServiceEcaAction.runAction(ServiceEcaAction.java:9
9)

org.ofbiz.service.eca.ServiceEcaRule.eval(ServiceEcaRule.java:139)

org.ofbiz.service.eca.ServiceEcaUtil.evalRules(ServiceEcaUtil.java:162)

org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:376)

org.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:211)

org.ofbiz.service.GenericDispatcher.runSync(GenericDispatcher.java:113)

org.ofbiz.order.order.OrderChangeHelper.orderStatusChanges(OrderChangeHe
lper.java:168)

org.ofbiz.order.order.OrderChangeHelper.approveOrder(OrderChangeHelper.j
ava:74)

org.ofbiz.order.shoppingcart.CheckOutHelper.processPayment(CheckOutHelpe
r.java:964)

org.ofbiz.order.shoppingcart.CheckOutEvents.processPayment(CheckOutEvent
s.java:485)

org.ofbiz.order.shoppingcart.CheckOutEvents.processPayment(CheckOutEvent
s.java:449)

sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

java.lang.reflect.Method.invoke(Method.java:585)

org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:88)

org.ofbiz.webapp.event.JavaEventHandler.invoke(JavaEventHandler.java:74)

org.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:409
)

org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:24
0)

org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:34
0)

org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:34
0)

org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:185)

javax.servlet.http.HttpServlet.service(HttpServlet.java:595)

javax.servlet.http.HttpServlet.service(HttpServlet.java:688)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:252)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)

org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:248)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:202)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:173)

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:213)

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:178)

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:126)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:105)

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:107)

org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541
)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
48)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:86
9)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.proc
essConnection(Http11BaseProtocol.java:664)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
.java:527)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollow
erWorkerThread.java:80)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
.java:684)

java.lang.Thread.run(Thread.java:595)

------------------------------------------------------------------------
--------