AnsweredAssumed Answered

Problem with Service task

Question asked by k_kunti@yahoo.com on Jan 7, 2011
Latest reply on Jan 13, 2011 by jbarrez
Hi All

I am facing an issue in the service task… while instantiating a new process from it.

1. Initially I was creating runtime service in my java class implemented ActivityBehavior


public class DynamicProcessServiceTask implements ActivityBehavior{


   public void execute(ActivityExecution arg0) throws Exception {
      arg0.getActivity().getId();
      
   }

One of the key requirements is to access activity id … as done above

even after completion of the service task no entry was made in DB and the process could not progress further.

the I explicitly ended the activity by calling arg0.end();… this time the service task ended but the process could not progress further.


Then AS stated in the forum that its not a correct practice to create runtime service in own's java code…..I took the second path.

2. From my Java class I started calling REST services to initiate a new process… but still I am having the same issue… the process does not proceed beyond service task…


I Just altered my Java class to javaDelegate

DynamicProcessServiceTask implements JavaDelegate

Now the service task is getting completed….all the same I need the activity for the service task in ….

public void execute(DelegateExecution arg0) throws Exception {


Please suggest how to get the same.

Thanks in advance
Krish

Outcomes