Package com.amazonaws.services.simpleworkflow.flow

Examples of com.amazonaws.services.simpleworkflow.flow.DynamicActivitiesClient


    public void startCron(final CronWorkflowOptions options) {
        long startTime = clock.currentTimeMillis();
        Date expiration = new Date(startTime + options.getContinueAsNewAfterSeconds() * SECOND);
        TimeZone tz = TimeZone.getTimeZone(options.getTimeZone());
        CronDecorator cronDecorator = new CronDecorator(options.getCronExpression(), expiration, tz, clock);
        DynamicActivitiesClient cronDecoratedActivities = cronDecorator.decorate(DynamicActivitiesClient.class, activities);
       
        cronDecoratedActivities.scheduleActivity(options.getActivity(), options.getActivityArguments(), null, Void.class);

        // Start new workflow run as soon as cron decorator exits due to expiration.
        // The call to self client indicates the desire to start the new run.
        // It is started only after all other tasks in the given run are completed.
        selfClient.startCron(options);
View Full Code Here

TOP

Related Classes of com.amazonaws.services.simpleworkflow.flow.DynamicActivitiesClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.