{
Method method = invocationContext.getMethod();
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);
}
else if ( method.isAnnotationPresent(ResumeProcess.class) )
{
log.trace( "encountered @ResumeProcess" );
ResumeProcess tag = method.getAnnotation(ResumeProcess.class);
if ( tag.processKey().equals("") )
{
Long processId = getProcessOrTaskId( tag.processIdParameter(), tag.processId() );
return BusinessProcess.instance().resumeProcess(processId);
}
else
{
return BusinessProcess.instance().resumeProcess( tag.definition(), getProcessKey( tag.processKey() ) );
}
}
if ( method.isAnnotationPresent(EndTask.class) )
{
log.trace( "encountered @EndTask" );