Java 类com.amazonaws.services.simpleworkflow.flow.annotations.Execute 实例源码

项目:aws-swf-build-tools    文件:WorkflowTypeVisitor.java   
@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);
}
项目:aws-swf-build-tools    文件:ProcessorUtils.java   
public static String computeWorkflowName(String interfaceName, ExecutableElement workflow) {
    assert(workflow != null);
    String workflowName = null;

    Execute options = workflow.getAnnotation(Execute.class);
    if (options != null && !options.name().isEmpty()) {
        workflowName = options.name();
    }
    else {
        workflowName = interfaceName + "." + workflow.getSimpleName().toString();
    }

    return workflowName;
}
项目:aws-swf-build-tools    文件:ProcessorUtils.java   
public static String computeWorkflowVersion(ExecutableElement workflow) {
    String version = "1.0"; // Default

    Execute options = workflow.getAnnotation(Execute.class);
    if (!options.version().isEmpty()) {
        version = options.version();
    }

    return version;
}
项目:swf-flow-gradle    文件:GreeterWorkflow.java   
@Execute(version = "1.0")
public void greet();
项目:aws-flow-maven-eclipse-samples    文件:ForLoopInlineRecipeWorkflow.java   
@Execute(version = "1.0")
public void loop(int times);
项目:aws-flow-maven-eclipse-samples    文件:WaitForSignalWorkflow.java   
@Execute(version = "1.0")
public void placeOrder(int amount);
项目:aws-flow-maven-eclipse-samples    文件:RunMultipleActivitiesConcurrentlyWorkflow.java   
@Execute(version = "1.0")
public void runMultipleActivitiesConcurrently();
项目:aws-flow-maven-eclipse-samples    文件:RetryWorkflow.java   
@Execute(version = "1.1")
void process();
项目:aws-flow-maven-eclipse-samples    文件:OrderChoiceWorkflow.java   
@Execute(version = "1.0")
public void processOrder();
项目:aws-flow-maven-eclipse-samples    文件:ConditionalLoopWorkflow.java   
@Execute(version = "1.0")
public void startWorkflow();
项目:aws-flow-maven-eclipse-samples    文件:HumanTaskWorkflow.java   
@Execute(version = "1.0")
void startWorkflow();
项目:aws-flow-maven-eclipse-samples    文件:DoWhileWorkflow.java   
@Execute(version = "1.0")
public void doWhile();
项目:aws-flow-maven-eclipse-samples    文件:PickFirstBranchWorkflow.java   
@Execute(version = "1.0")
Promise<List<String>> search(String query);
项目:aws-flow-maven-eclipse-samples    文件:HandleErrorWorkflow.java   
@Execute(version = "1.0")
public void startWorkflow() throws Throwable ;
项目:aws-flow-maven-eclipse-samples    文件:CleanupResourceWorkflow.java   
@Execute(version = "1.0")
public void startWorkflow();
项目:aws-flow-maven-eclipse-samples    文件:JoinBranchesWorkflow.java   
@Execute(version = "1.0")
public Promise<Integer> parallelComputing(int braches);
项目:aws-flow-maven-eclipse-samples    文件:AverageCalculatorWorkflow.java   
@Execute(name = "SplitMergeWorkflowExample", version = "1.0")
void average(String bucketName, String fileName, final int numberOfWorkers);
项目:aws-flow-maven-eclipse-samples    文件:HelloWorldWorkflow.java   
@Execute(version = "1.0")
void helloWorld(String name);
项目:aws-flow-maven-eclipse-samples    文件:FileProcessingWorkflow.java   
@Execute(name = "ProcessFile", version = "1.0")
public void processFile(String sourceBucketName, String sourceFilename, String targetBucketName, String targetFilename)
        throws IOException;
项目:aws-flow-maven-eclipse-samples    文件:BookingWorkflow.java   
@Execute(name = "MakeBooking", version = "1.0")
void makeBooking(int requestID, int customerID, boolean reserveAir, boolean reserveCar);
项目:datamung    文件:ExportInstanceWorkflow.java   
@Execute( name = ExportInstanceWorkflow.WORKFLOW_TYPE, version = ExportInstanceWorkflow.WORKFLOW_VERSION )
void export( ExportInstanceRequest request );
项目:datamung    文件:JobWorkflow.java   
@Execute( name = "JobWorkflow", version = "1.0" )
void executeCommand( RunJobRequest request );
项目:datamung    文件:ExportSnapshotWorkflow.java   
@Execute( name = ExportSnapshotWorkflow.WORKFLOW_TYPE, version = ExportSnapshotWorkflow.WORKFLOW_VERSION )
void export( ExportSnapshotRequest request );
项目:datamung    文件:CheckWaitWorkflow.java   
@Execute( name = "CheckWaitWorkflow", version = "1.0" )
void checkAndWait( CheckAndWait request )
    throws TimeoutException;
项目:swf-starter    文件:FileProcessingWorkflow.java   
/**
 * Process the file at inputBucketName.inputFileName.
 * Place the result at outputBucketName.outputFileName.
 *
 * @param inputBucketName input bucket to process from
 * @param inputFilename input file to process from
 * @param outputBucketName output bucket to put result to
 * @param outputFilename output file to put result to
 * @throws IOException
 */
@Execute(name = "ProcessFile", version = "1.0")
void processFile(String inputBucketName, String inputFilename, String outputBucketName, String outputFilename) throws IOException;
项目:swf-horserace    文件:RaceFlow.java   
/**
 * <p>
 * Start the race including organizing the horses, counting laps, and
 * announcing winners.
 * </p>
 * <p>
 * Note that the method is marked with {@link Execute}. This signals the
 * stub generator to generate corresponding methods in the stubs and
 * configure the stubs to use them to request new workflows.
 * </p>
 *
 * @param horseNames
 *            the names of the horses in the race.
 *
 * @param laps
 *            the number laps to run.
 */
@Execute(version = "1.0.0")
void go(Collection<String> horseNames, int laps);
项目:aws-flow-maven-eclipse-samples    文件:DeploymentWorkflow.java   
/**
 * deploy the whole stack
 * @return Url of the stack webserver
 */
@Execute(version="1.0")
public Promise<String> deploy(String springTemplate);
项目:aws-flow-maven-eclipse-samples    文件:CronWithRetryWorkflow.java   
/**
 * Start workflow that executes activity according to options.
 * 
 * @param activity
 *            activity type to execute
 * @param activityArguments
 *            arguments passed to activity
 * @param cronExpression
 *            time pattern in unix cron format.
 * @param continueAsNewAfterSeconds
 *            frequency of a new workflow run creation
 */
@Execute(name = "CronWorkflow", version = "1.1")
void startCron(CronWithRetryWorkflowOptions options);
项目:aws-flow-maven-eclipse-samples    文件:CronWorkflow.java   
/**
 * Start workflow that executes activity according to options.
 */
@Execute(name = "CronWorkflow", version = "1.0")
void startCron(CronWorkflowOptions options);
项目:aws-flow-maven-eclipse-samples    文件:PeriodicWorkflow.java   
/**
 * Start workflow that executes activity according to options.
 * 
 * @param activity
 *            activity type to execute
 * @param options
 *            define the schedule of the execution.
 */
@Execute(name = "PeriodicWorkflow", version = "1.0")
void startPeriodicWorkflow(ActivityType activity, Object[] activityArguments, PeriodicWorkflowOptions options);
项目:datamung    文件:NoOpWorkflow.java   
/**
 * Entry of workflow
 */
@Execute( name = "NoOpWorkflow", version = "1.0" )
void run();