Skip to content

Commit

Permalink
fix start_workflow_by_name function in OrkesWorkflowClient
Browse files Browse the repository at this point in the history
  • Loading branch information
panregedit committed Nov 22, 2024
1 parent 4fbb2be commit 45e7418
Showing 1 changed file with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,14 @@ def start_workflow_by_name(
name: str,
input: dict[str, object],
version: Optional[int] = None,
correlationId: Optional[str] = None,
priority: Optional[int] = None,
**kwargs
) -> str:
kwargs = {}
if version:
kwargs.update({"version": version})
if correlationId:
kwargs.update({"correlation_id": correlationId})
if priority:
kwargs.update({"priority": priority})

return self.workflowResourceApi.start_workflow1(input, name, **kwargs)
start_workflow_request = StartWorkflowRequest(name=name,
version=version,
input=input,
**kwargs)

return self.start_workflow(start_workflow_request)

def start_workflow(self, start_workflow_request: StartWorkflowRequest) -> str:
return self.workflowResourceApi.start_workflow(start_workflow_request)
Expand Down

0 comments on commit 45e7418

Please sign in to comment.