-
Notifications
You must be signed in to change notification settings - Fork 38
Add /api/workflow/execute/{name}/{version} support in sdk #292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
7db7ae4
eb84c5c
3593c0e
b269e0c
139c7f6
4bf2cc0
e026399
ff4de2d
448127e
5791aa0
5f274c2
7b65b16
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3051,4 +3051,135 @@ def update_workflow_and_task_state_with_http_info(self, body, request_id, workfl | |
| _return_http_data_only=params.get('_return_http_data_only'), | ||
| _preload_content=params.get('_preload_content', True), | ||
| _request_timeout=params.get('_request_timeout'), | ||
| collection_formats=collection_formats) | ||
|
|
||
| def execute_workflow_cr(self, body, name, version, **kwargs): # noqa: E501 | ||
| """Execute a workflow synchronously with reactive response # noqa: E501 | ||
|
|
||
| This method makes a synchronous HTTP request by default. To make an | ||
| asynchronous HTTP request, please pass async_req=True | ||
| >>> thread = api.execute_workflow_cr(body,name,version) | ||
| >>> result = thread.get() | ||
|
|
||
| :param async_req bool | ||
| :param StartWorkflowRequest body: (required) | ||
| :param str name: (required) | ||
| :param int version: (required) | ||
| :param str request_id: | ||
| :param str wait_until_task_ref: | ||
| :param int wait_for_seconds: | ||
| :param str consistency: DURABLE or EVENTUAL | ||
| :param str return_strategy: TARGET_WORKFLOW or WAIT_WORKFLOW | ||
| :return: WorkflowRun | ||
| If the method is called asynchronously, | ||
| returns the request thread. | ||
| """ | ||
| kwargs['_return_http_data_only'] = True | ||
| if kwargs.get('async_req'): | ||
| return self.execute_workflow_reactive_with_http_info(body, name, version, **kwargs) # noqa: E501 | ||
| else: | ||
| (data) = self.execute_workflow_reactive_with_http_info(body, name, version, **kwargs) # noqa: E501 | ||
| return data | ||
|
|
||
| def execute_workflow_reactive_with_http_info(self, body, name, version, **kwargs): # noqa: E501 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any idea why we say reactive in method name ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes -this is not needed
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'll change this |
||
| """Execute a workflow synchronously with reactive response # noqa: E501 | ||
|
|
||
| This method makes a synchronous HTTP request by default. To make an | ||
| asynchronous HTTP request, please pass async_req=True | ||
| >>> thread = api.execute_workflow_reactive_with_http_info(body, name, version, async_req=True) | ||
| >>> result = thread.get() | ||
|
|
||
| :param async_req bool | ||
| :param StartWorkflowRequest body: (required) | ||
| :param str name: (required) | ||
| :param int version: (required) | ||
| :param str request_id: | ||
| :param str wait_until_task_ref: | ||
| :param int wait_for_seconds: | ||
| :param str consistency: DURABLE or EVENTUAL | ||
| :param str return_strategy: TARGET_WORKFLOW or WAIT_WORKFLOW | ||
| :return: WorkflowRun | ||
| If the method is called asynchronously, | ||
| returns the request thread. | ||
| """ | ||
|
|
||
| all_params = ['body', 'name', 'version', 'request_id', 'wait_until_task_ref', 'wait_for_seconds', 'consistency', | ||
| 'return_strategy', 'async_req', '_return_http_data_only', '_preload_content', | ||
| '_request_timeout'] # noqa: E501 | ||
|
|
||
| params = locals() | ||
| for key, val in six.iteritems(params['kwargs']): | ||
| if key not in all_params: | ||
| raise TypeError( | ||
| "Got an unexpected keyword argument '%s'" | ||
| " to method execute_workflow" % key | ||
| ) | ||
| params[key] = val | ||
| del params['kwargs'] | ||
| # verify the required parameter 'body' is set | ||
| if ('body' not in params or | ||
| params['body'] is None): | ||
| raise ValueError("Missing the required parameter `body` when calling `execute_workflow`") # noqa: E501 | ||
| # verify the required parameter 'name' is set | ||
| if ('name' not in params or | ||
| params['name'] is None): | ||
| raise ValueError("Missing the required parameter `name` when calling `execute_workflow`") # noqa: E501 | ||
| # verify the required parameter 'version' is set | ||
| if ('version' not in params or | ||
| params['version'] is None): | ||
| raise ValueError("Missing the required parameter `version` when calling `execute_workflow`") # noqa: E501 | ||
|
|
||
| collection_formats = {} | ||
|
|
||
| path_params = {} | ||
| if 'name' in params: | ||
| path_params['name'] = params['name'] # noqa: E501 | ||
| if 'version' in params: | ||
| path_params['version'] = params['version'] # noqa: E501 | ||
|
|
||
| query_params = [] | ||
| if 'request_id' in params: | ||
| query_params.append(('requestId', params['request_id'])) # noqa: E501 | ||
| if 'wait_until_task_ref' in params: | ||
| query_params.append(('waitUntilTaskRef', params['wait_until_task_ref'])) # noqa: E501 | ||
| if 'wait_for_seconds' in params: | ||
| query_params.append(('waitForSeconds', params['wait_for_seconds'])) # noqa: E501 | ||
| if 'consistency' in params: | ||
| query_params.append(('consistency', params['consistency'])) # noqa: E501 | ||
| if 'return_strategy' in params: | ||
| query_params.append(('returnStrategy', params['return_strategy'])) # noqa: E501 | ||
|
|
||
| header_params = {} | ||
|
|
||
| form_params = [] | ||
| local_var_files = {} | ||
|
|
||
| body_params = None | ||
| if 'body' in params: | ||
| body_params = params['body'] | ||
| # HTTP header `Accept` | ||
| header_params['Accept'] = self.api_client.select_header_accept( | ||
| ['application/json']) # noqa: E501 | ||
|
|
||
| # HTTP header `Content-Type` | ||
| header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501 | ||
| ['application/json']) # noqa: E501 | ||
|
|
||
| # Authentication setting | ||
| auth_settings = ['api_key'] # noqa: E501 | ||
|
|
||
| return self.api_client.call_api( | ||
| '/workflow/execute/{name}/{version}', 'POST', | ||
| path_params, | ||
| query_params, | ||
| header_params, | ||
| body=body_params, | ||
| post_params=form_params, | ||
| files=local_var_files, | ||
| response_type='SignalResponse', # noqa: E501 | ||
| auth_settings=auth_settings, | ||
| async_req=params.get('async_req'), | ||
| _return_http_data_only=params.get('_return_http_data_only'), | ||
| _preload_content=params.get('_preload_content', True), | ||
| _request_timeout=params.get('_request_timeout'), | ||
| collection_formats=collection_formats) | ||
Uh oh!
There was an error while loading. Please reload this page.