How To complete task from service??

I need to send a notification for the task forward to the next step…

Is it possible?

wm.prt.dispatch:dispatchStep service return error

com.wm.app.b2b.server.ServiceException: [PRT.0101.9125] Service wm.prt.dispatch:dispatchStep failed.
	at com.wm.app.prt.audit.AuditLogging.logProcess(AuditLogging.java:324)
	at com.wm.app.prt.InstanceManager.markInstanceFailed(InstanceManager.java:962)
	at com.wm.app.prt.InstanceManager.requestFail(InstanceManager.java:574)
	at com.wm.app.prt.InstanceManager.requestFailHandled(InstanceManager.java:1052)
	at com.wm.app.prt.InstanceManager.requestFailHandled(InstanceManager.java:1068)
	at com.wm.app.prt.StepDispatcherAgent.handlePreStepProcessing(StepDispatcherAgent.java:393)
	at com.wm.app.prt.StepDispatcherAgent.execute(StepDispatcherAgent.java:196)
	at com.wm.app.prt.StepDispatcherAgent.synchRun(StepDispatcherAgent.java:152)
	at wm.prt.dispatch.dispatchStep(dispatch.java:280)
	at sun.reflect.GeneratedMethodAccessor596.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:443)
	at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:643)
	at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:41)
	at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
	at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
	at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51)
	at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
	at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:276)
	at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30)
	at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:363)
	at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:547)
	at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:386)
	at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:234)
	at com.wm.app.b2b.server.BaseService.invoke(BaseService.java:194)
	at com.wm.lang.flow.FlowInvoke.invoke(FlowInvoke.java:324)
	at com.wm.lang.flow.FlowState.invokeNode(FlowState.java:584)
	at com.wm.lang.flow.FlowState.step(FlowState.java:444)
	at com.wm.lang.flow.FlowState.invoke(FlowState.java:409)
	at com.wm.app.b2b.server.FlowSvcImpl.baseInvoke(FlowSvcImpl.java:1057)
	at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:643)
	at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:41)
	at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:44)
	at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
	at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:51)
	at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
	at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:276)
	at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:30)
	at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:363)
	at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:547)
	at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:386)
	at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:234)
	at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:119)
	at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:160)
	at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:186)
	at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:366)
	at com.wm.util.pool.PooledThread.run(PooledThread.java:131)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
	... 49 more

Can you clarify on what exactly you want to achieve?
Send notification or move to next step?

Also the error is a NullPointerException, you may be missing some parameters

move to next step!

whe use wm.prt.dispatch:dispatchStep service the instance remains in the current step and present error in Task list m


I set 4 variables in service

ProcessInstanceID
ProcessModelID
ProcessModelVersion
TargetStepID

all contains data from pub.task.taskclient:getTask service

It’s not moving to next step due to this NullPointerException error. You need to find which service is triggering this NullPointerException, and what’s missing.

if you can provide more log, that may help. the log you provide are truncated right after the NullPointerException error

the IS log:

[817]2014-02-24 11:17:19 ART [PRT.0101.0359E] Error trying to execute step S80 : null
[816]2014-02-24 11:17:19 ART [PRT.0101.0002E] ERROR: java.lang.NullPointerException
[815]2014-02-24 11:17:19 ART [ISP.0090.0003C] null

If you want to complete a task and move to next step, you can call pub.task.taskclient:updateTask and set the TaskInfo/status to “Completed”.