Skip to content

Conversation

@ruanwenjun
Copy link
Member

@ruanwenjun ruanwenjun commented Aug 29, 2024

Purpose of the pull request

close #16546

Brief change log

  • Add method repeatTriggerWorkflowInstance/triggerFromFailureTasks/triggerFromSuspendTasks in IWorkflowControlClient
  • Add repeat running/ trigger from failure task integration test

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

Pull Request Notice

Pull Request Notice

If your pull request contain incompatible change, you should also add it to docs/docs/en/guide/upgrede/incompatible.md

@ruanwenjun ruanwenjun self-assigned this Aug 29, 2024
@ruanwenjun ruanwenjun added the improvement make more easy to user or prompt friendly label Aug 29, 2024
@ruanwenjun ruanwenjun added this to the 3.3.0 milestone Aug 29, 2024
@ruanwenjun ruanwenjun changed the title [Improve] Move recover/repeat running to IWorkflowControlClient [Chore] Move recover/repeat running to IWorkflowControlClient Aug 29, 2024
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_implementSubWorkflow branch from d057d27 to bd40b64 Compare August 29, 2024 08:39
@github-actions github-actions bot added the test label Aug 29, 2024
@ruanwenjun ruanwenjun changed the title [Chore] Move recover/repeat running to IWorkflowControlClient [Improvement][Master] Add repeatTriggerWorkflowInstance/triggerFromFailureTasks/triggerFromSuspendTasks in IWorkflowControlClient Aug 29, 2024
@ruanwenjun ruanwenjun changed the title [Improvement][Master] Add repeatTriggerWorkflowInstance/triggerFromFailureTasks/triggerFromSuspendTasks in IWorkflowControlClient [Improvement-16546][Master] Add repeatTriggerWorkflowInstance/triggerFromFailureTasks/triggerFromSuspendTasks in IWorkflowControlClient Aug 29, 2024
Copy link
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

protected abstract Command constructTriggerCommand(final TriggerRequest triggerRequest,
final WorkflowInstance workflowInstance);

protected abstract TriggerResponse onTriggerSuccess(final WorkflowInstance workflowInstance);

Check notice

Code scanning / CodeQL

Useless parameter

The parameter 'workflowInstance' is never used.
Comment on lines +43 to +50
return Command.builder()
.commandType(CommandType.START_FAILURE_TASK_PROCESS)
.processDefinitionCode(workflowInstance.getProcessDefinitionCode())
.processDefinitionVersion(workflowInstance.getProcessDefinitionVersion())
.processInstanceId(workflowInstance.getId())
.executorId(workflowInstanceRecoverFailureTasksRequest.getUserId())
.startTime(new Date())
.updateTime(new Date())

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [CommandBuilder.updateTime](1) should be avoided because it has been deprecated.
Comment on lines +43 to +49
return Command.builder()
.commandType(CommandType.START_FAILURE_TASK_PROCESS)
.processDefinitionCode(workflowInstance.getProcessDefinitionCode())
.processDefinitionVersion(workflowInstance.getProcessDefinitionVersion())
.processInstanceId(workflowInstance.getId())
.executorId(workflowInstanceRecoverFailureTasksRequest.getUserId())
.startTime(new Date())

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [CommandBuilder.startTime](1) should be avoided because it has been deprecated.
Comment on lines +43 to +48
return Command.builder()
.commandType(CommandType.START_FAILURE_TASK_PROCESS)
.processDefinitionCode(workflowInstance.getProcessDefinitionCode())
.processDefinitionVersion(workflowInstance.getProcessDefinitionVersion())
.processInstanceId(workflowInstance.getId())
.executorId(workflowInstanceRecoverFailureTasksRequest.getUserId())

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [CommandBuilder.executorId](1) should be avoided because it has been deprecated.
Comment on lines +43 to +50
return Command.builder()
.commandType(CommandType.RECOVER_SUSPENDED_PROCESS)
.processDefinitionCode(workflowInstance.getProcessDefinitionCode())
.processDefinitionVersion(workflowInstance.getProcessDefinitionVersion())
.processInstanceId(workflowInstance.getId())
.executorId(workflowInstanceRecoverSuspendTasksRequest.getUserId())
.startTime(new Date())
.updateTime(new Date())

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [CommandBuilder.updateTime](1) should be avoided because it has been deprecated.
Comment on lines +43 to +49
return Command.builder()
.commandType(CommandType.RECOVER_SUSPENDED_PROCESS)
.processDefinitionCode(workflowInstance.getProcessDefinitionCode())
.processDefinitionVersion(workflowInstance.getProcessDefinitionVersion())
.processInstanceId(workflowInstance.getId())
.executorId(workflowInstanceRecoverSuspendTasksRequest.getUserId())
.startTime(new Date())

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [CommandBuilder.startTime](1) should be avoided because it has been deprecated.
Comment on lines +43 to +48
return Command.builder()
.commandType(CommandType.RECOVER_SUSPENDED_PROCESS)
.processDefinitionCode(workflowInstance.getProcessDefinitionCode())
.processDefinitionVersion(workflowInstance.getProcessDefinitionVersion())
.processInstanceId(workflowInstance.getId())
.executorId(workflowInstanceRecoverSuspendTasksRequest.getUserId())

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [CommandBuilder.executorId](1) should be avoided because it has been deprecated.
Comment on lines +43 to +50
return Command.builder()
.commandType(CommandType.REPEAT_RUNNING)
.processInstanceId(workflowInstance.getId())
.processDefinitionCode(workflowInstance.getProcessDefinitionCode())
.processDefinitionVersion(workflowInstance.getProcessDefinitionVersion())
.executorId(repeatRunningRequest.getUserId())
.startTime(new Date())
.updateTime(new Date())

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [CommandBuilder.updateTime](1) should be avoided because it has been deprecated.
Comment on lines +43 to +49
return Command.builder()
.commandType(CommandType.REPEAT_RUNNING)
.processInstanceId(workflowInstance.getId())
.processDefinitionCode(workflowInstance.getProcessDefinitionCode())
.processDefinitionVersion(workflowInstance.getProcessDefinitionVersion())
.executorId(repeatRunningRequest.getUserId())
.startTime(new Date())

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [CommandBuilder.startTime](1) should be avoided because it has been deprecated.
Comment on lines +43 to +48
return Command.builder()
.commandType(CommandType.REPEAT_RUNNING)
.processInstanceId(workflowInstance.getId())
.processDefinitionCode(workflowInstance.getProcessDefinitionCode())
.processDefinitionVersion(workflowInstance.getProcessDefinitionVersion())
.executorId(repeatRunningRequest.getUserId())

Check notice

Code scanning / CodeQL

Deprecated method or constructor invocation

Invoking [CommandBuilder.executorId](1) should be avoided because it has been deprecated.
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_implementSubWorkflow branch from bd40b64 to e52219f Compare August 29, 2024 14:55
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 60%)

See analysis details on SonarCloud

Copy link
Contributor

@caishunfeng caishunfeng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@caishunfeng caishunfeng merged commit 002e9ca into apache:dev Aug 30, 2024
@ruanwenjun ruanwenjun deleted the dev_wenjun_implementSubWorkflow branch August 30, 2024 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend improvement make more easy to user or prompt friendly test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement][Master] Add repeatTriggerWorkflowInstance/triggerFromFailureTasks/triggerFromSuspendTasks in IWorkflowControlClient

3 participants