Package com.amazonaws.services.simpleworkflow.flow.spring

Examples of com.amazonaws.services.simpleworkflow.flow.spring.CronDecorator.decorate()


    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.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.