@@ -3051,4 +3051,131 @@ def update_workflow_and_task_state_with_http_info(self, body, request_id, workfl
30513051 _return_http_data_only = params .get ('_return_http_data_only' ),
30523052 _preload_content = params .get ('_preload_content' , True ),
30533053 _request_timeout = params .get ('_request_timeout' ),
3054+ collection_formats = collection_formats )
3055+
3056+ def execute_workflow_with_return_strategy (self , body , name , version , ** kwargs ): # noqa: E501
3057+ """Execute a workflow synchronously with reactive response # noqa: E501
3058+ This method makes a synchronous HTTP request by default. To make an
3059+ asynchronous HTTP request, please pass async_req=True
3060+ >>> thread = api.execute_workflow_with_return_strategy(body,name,version)
3061+ >>> result = thread.get()
3062+ :param async_req bool
3063+ :param StartWorkflowRequest body: (required)
3064+ :param str name: (required)
3065+ :param int version: (required)
3066+ :param str request_id:
3067+ :param str wait_until_task_ref:
3068+ :param int wait_for_seconds:
3069+ :param str consistency: DURABLE or EVENTUAL
3070+ :param str return_strategy: TARGET_WORKFLOW or WAIT_WORKFLOW
3071+ :return: WorkflowRun
3072+ If the method is called asynchronously,
3073+ returns the request thread.
3074+ """
3075+ kwargs ['_return_http_data_only' ] = True
3076+ if kwargs .get ('async_req' ):
3077+ return self .execute_workflow_with_return_strategy_with_http_info (body , name , version , ** kwargs ) # noqa: E501
3078+ else :
3079+ (data ) = self .execute_workflow_with_return_strategy_with_http_info (body , name , version , ** kwargs ) # noqa: E501
3080+ return data
3081+
3082+ def execute_workflow_with_return_strategy_with_http_info (self , body , name , version , ** kwargs ): # noqa: E501
3083+ """Execute a workflow synchronously with reactive response # noqa: E501
3084+ This method makes a synchronous HTTP request by default. To make an
3085+ asynchronous HTTP request, please pass async_req=True
3086+ >>> thread = api.execute_workflow_with_return_strategy_with_http_info(body, name, version, async_req=True)
3087+ >>> result = thread.get()
3088+ :param async_req bool
3089+ :param StartWorkflowRequest body: (required)
3090+ :param str name: (required)
3091+ :param int version: (required)
3092+ :param str request_id:
3093+ :param str wait_until_task_ref:
3094+ :param int wait_for_seconds:
3095+ :param str consistency: DURABLE or EVENTUAL
3096+ :param str return_strategy: TARGET_WORKFLOW or WAIT_WORKFLOW
3097+ :return: WorkflowRun
3098+ If the method is called asynchronously,
3099+ returns the request thread.
3100+ """
3101+
3102+ all_params = ['body' , 'name' , 'version' , 'request_id' , 'wait_until_task_ref' , 'wait_for_seconds' , 'consistency' ,
3103+ 'return_strategy' , 'async_req' , '_return_http_data_only' , '_preload_content' ,
3104+ '_request_timeout' ] # noqa: E501
3105+
3106+ params = locals ()
3107+ for key , val in six .iteritems (params ['kwargs' ]):
3108+ if key not in all_params :
3109+ raise TypeError (
3110+ "Got an unexpected keyword argument '%s'"
3111+ " to method execute_workflow" % key
3112+ )
3113+ params [key ] = val
3114+ del params ['kwargs' ]
3115+ # verify the required parameter 'body' is set
3116+ if ('body' not in params or
3117+ params ['body' ] is None ):
3118+ raise ValueError ("Missing the required parameter `body` when calling `execute_workflow`" ) # noqa: E501
3119+ # verify the required parameter 'name' is set
3120+ if ('name' not in params or
3121+ params ['name' ] is None ):
3122+ raise ValueError ("Missing the required parameter `name` when calling `execute_workflow`" ) # noqa: E501
3123+ # verify the required parameter 'version' is set
3124+ if ('version' not in params or
3125+ params ['version' ] is None ):
3126+ raise ValueError ("Missing the required parameter `version` when calling `execute_workflow`" ) # noqa: E501
3127+
3128+ collection_formats = {}
3129+
3130+ path_params = {}
3131+ if 'name' in params :
3132+ path_params ['name' ] = params ['name' ] # noqa: E501
3133+ if 'version' in params :
3134+ path_params ['version' ] = params ['version' ] # noqa: E501
3135+
3136+ query_params = []
3137+ if 'request_id' in params :
3138+ query_params .append (('requestId' , params ['request_id' ])) # noqa: E501
3139+ if 'wait_until_task_ref' in params :
3140+ query_params .append (('waitUntilTaskRef' , params ['wait_until_task_ref' ])) # noqa: E501
3141+ if 'wait_for_seconds' in params :
3142+ query_params .append (('waitForSeconds' , params ['wait_for_seconds' ])) # noqa: E501
3143+ if 'consistency' in params :
3144+ query_params .append (('consistency' , params ['consistency' ])) # noqa: E501
3145+ if 'return_strategy' in params :
3146+ query_params .append (('returnStrategy' , params ['return_strategy' ])) # noqa: E501
3147+
3148+ header_params = {}
3149+
3150+ form_params = []
3151+ local_var_files = {}
3152+
3153+ body_params = None
3154+ if 'body' in params :
3155+ body_params = params ['body' ]
3156+ # HTTP header `Accept`
3157+ header_params ['Accept' ] = self .api_client .select_header_accept (
3158+ ['application/json' ]) # noqa: E501
3159+
3160+ # HTTP header `Content-Type`
3161+ header_params ['Content-Type' ] = self .api_client .select_header_content_type ( # noqa: E501
3162+ ['application/json' ]) # noqa: E501
3163+
3164+ # Authentication setting
3165+ auth_settings = ['api_key' ] # noqa: E501
3166+
3167+ return self .api_client .call_api (
3168+ '/workflow/execute/{name}/{version}' , 'POST' ,
3169+ path_params ,
3170+ query_params ,
3171+ header_params ,
3172+ body = body_params ,
3173+ post_params = form_params ,
3174+ files = local_var_files ,
3175+ response_type = 'SignalResponse' , # noqa: E501
3176+ auth_settings = auth_settings ,
3177+ async_req = params .get ('async_req' ),
3178+ _return_http_data_only = params .get ('_return_http_data_only' ),
3179+ _preload_content = params .get ('_preload_content' , True ),
3180+ _request_timeout = params .get ('_request_timeout' ),
30543181 collection_formats = collection_formats )
0 commit comments