1 Reply Latest reply on Apr 28, 2010 11:19 AM by Tony Lopes

    Are Seam jBPM's annotations of @StartTask and @BeginTask duplicated?

    Sean Wu Newbie

      Hi all,
      I am confused about the two annotaitons of @StartTask and @BeginTask. It seems that they do the same job. I check the BusinessProcessInterceptor which process these two annotations and found:



       if ( method.isAnnotationPresent(StartTask.class) ) 
            {
               log.trace( "encountered @StartTask" );
               StartTask tag = method.getAnnotation(StartTask.class);
               Long taskId = getProcessOrTaskId( tag.taskIdParameter(), tag.taskId() );
               return BusinessProcess.instance().resumeTask(taskId);
            }
            else if ( method.isAnnotationPresent(BeginTask.class) ) 
            {
               log.trace( "encountered @BeginTask" );
               BeginTask tag = method.getAnnotation(BeginTask.class);
               Long taskId = getProcessOrTaskId( tag.taskIdParameter(), tag.taskId() );
               return BusinessProcess.instance().resumeTask(taskId);
            }


      At the backend, they all resume a task. So, why we need two annotations here? Are they actually same? Thanks.