Skip to content

Commit

Permalink
after lint
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekj720 committed Sep 25, 2023
1 parent fa40ace commit a5b5bab
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import com.uber.cadence.RequestCancelWorkflowExecutionRequest;
import com.uber.cadence.StartWorkflowExecutionRequest;
import com.uber.cadence.StartWorkflowExecutionResponse;
import com.uber.cadence.activity.ActivityMethod;

public interface MigrationActivities {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import com.uber.cadence.RequestCancelWorkflowExecutionRequest;
import com.uber.cadence.StartWorkflowExecutionRequest;
import com.uber.cadence.StartWorkflowExecutionResponse;
import com.uber.cadence.WorkflowExecutionAlreadyStartedError;
import com.uber.cadence.client.WorkflowClient;
import com.uber.cadence.workflow.Workflow;
Expand All @@ -37,9 +36,11 @@ public MigrationActivitiesImpl(
public StartWorkflowInNewResponse startWorkflowInNewDomain(
StartWorkflowExecutionRequest request) {
try {
return new StartWorkflowInNewResponse(clientInNewDomain.getService().StartWorkflowExecution(request),"New workflow starting successful");
return new StartWorkflowInNewResponse(
clientInNewDomain.getService().StartWorkflowExecution(request),
"New workflow starting successful");
} catch (WorkflowExecutionAlreadyStartedError e) {
return new StartWorkflowInNewResponse(null,"Workflow already started");
return new StartWorkflowInNewResponse(null, "Workflow already started");
} catch (Exception e) {
throw Workflow.wrap(e);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
/*
* Copyright 2012-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Modifications copyright (C) 2017 Uber Technologies, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not
* use this file except in compliance with the License. A copy of the License is
* located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

package com.uber.cadence.migration;

import com.uber.cadence.StartWorkflowExecutionResponse;

public class StartWorkflowInNewResponse {
StartWorkflowExecutionResponse startWorkflowExecutionResponse;
String message;

StartWorkflowInNewResponse(StartWorkflowExecutionResponse startWorkflowResponse, String msg){
startWorkflowExecutionResponse = startWorkflowResponse;
message = msg;
}
StartWorkflowExecutionResponse startWorkflowExecutionResponse;
String message;

StartWorkflowInNewResponse(StartWorkflowExecutionResponse startWorkflowResponse, String msg) {
startWorkflowExecutionResponse = startWorkflowResponse;
message = msg;
}
}

0 comments on commit a5b5bab

Please sign in to comment.