/** * Create a new instance of this workflow. */ public ZipS3FileProcessingWorkflow() { storageClient = new StorageActivitiesClientImpl(); fileClient = new FileActivitiesClientImpl(); runId = (new DecisionContextProviderImpl()) .getDecisionContext() .getWorkflowContext() .getWorkflowExecution() .getRunId(); }
public PeriodicWorkflowImpl() { DecisionContextProvider contextProvider = new DecisionContextProviderImpl(); clock = contextProvider.getDecisionContext().getWorkflowClock(); activities = new DynamicActivitiesClientImpl(); errorReporting = new ErrorReportingActivitiesClientImpl(); selfClient = new PeriodicWorkflowSelfClientImpl(); }
@Asynchronous private void run( int count, Promise<?>... waitFor ) { if ( count == 3 ) { return; } Promise<String> name = control.createDatabaseName( new DecisionContextProviderImpl().getDecisionContext().getWorkflowContext().getWorkflowExecution().getWorkflowId() ); scheduleNext( count, name ); }
@Asynchronous private void scheduleNext( int count, Promise<String> name ) { Promise<Void> aSecond = new DecisionContextProviderImpl().getDecisionContext().getWorkflowClock().createTimer( 1 ); run( count + 1, aSecond ); }
public WaitForSignalWorkflowImpl() { DecisionContextProvider provider = new DecisionContextProviderImpl(); DecisionContext context = provider.getDecisionContext(); clock = context.getWorkflowClock(); }
public CronWithRetryWorkflowImpl() { this(new DecisionContextProviderImpl().getDecisionContext().getWorkflowClock(), new DynamicActivitiesClientImpl(), new CronWithRetryWorkflowSelfClientImpl()); }
public FileProcessingWorkflowZipImpl() { // Create activity clients this.store = new SimpleStoreActivitiesClientImpl(); processor = new FileProcessingActivitiesClientImpl(); workflowContext = (new DecisionContextProviderImpl()).getDecisionContext().getWorkflowContext(); }
public CronWorkflowImpl() { this(new DecisionContextProviderImpl().getDecisionContext().getWorkflowClock(), new DynamicActivitiesClientImpl(), new CronWorkflowSelfClientImpl()); }