@Override public Void visitExecutable(ExecutableElement method, ProcessingEnvironment env) { if (method.getAnnotation(Execute.class) != null) { String workflowName = ProcessorUtils.computeWorkflowName( workflowDefinition.getInterfaceName(), method); String workflowVersion = ProcessorUtils.computeWorkflowVersion(method); ExecuteMethod executeMethod = new ExecuteMethod(workflowName, workflowVersion); setMethodInfo(method, executeMethod, workflowDefinition.getPackageName()); executeMethod.setAnnotationsToCopy(ProcessorUtils.getAnnotationsText(env, method, annotationsToExcludeFromCopying)); workflowDefinition.setExecuteMethod(executeMethod); } else if (method.getAnnotation(Signal.class) != null) { String signalName = ProcessorUtils.computeSignalName(method); SignalMethod signalMethod = new SignalMethod(signalName); setMethodInfo(method, signalMethod, workflowDefinition.getPackageName()); workflowDefinition.getSignals().add(signalMethod); } else if (method.getAnnotation(GetState.class) != null) { GetStateMethod getStateMethod = new GetStateMethod(); setMethodInfo(method, getStateMethod, workflowDefinition.getPackageName()); workflowDefinition.setGetStateMethod(getStateMethod); } return super.visitExecutable(method, env); }
@GetState String getInvocationHistory();
@GetState public String getState();
/** * Get the current state of the workflow. This is reported to the SWF console and * through SWF APIs. * * When the decider is done processing a decision task, it fetches the latest state * using the @GetState annotation. * * @return current state of the workflow */ @GetState String getState();