@@ -147,19 +147,11 @@ static WorkflowClient newInstance(WorkflowServiceStubs service, WorkflowClientOp
147147 * @param workflowInterface interface that given workflow implements.
148148 * @param workflowId Workflow id.
149149 * @return Stub that implements workflowInterface and can be used to signal or query it.
150+ * @deprecated Use {@link #newWorkflowStub(Class, WorkflowTargetOptions)} instead.
150151 */
152+ @ Deprecated
151153 <T > T newWorkflowStub (Class <T > workflowInterface , String workflowId );
152154
153- /**
154- * Creates workflow client stub for a known execution. Use it to send signals or queries to a
155- * running workflow. Do not call methods annotated with @WorkflowMethod.
156- *
157- * @param workflowInterface interface that given workflow implements.
158- * @param workflowTargetOptions options that specify target workflow execution.
159- * @return Stub that implements workflowInterface and can be used to signal or query it.
160- */
161- <T > T newWorkflowStub (Class <T > workflowInterface , WorkflowTargetOptions workflowTargetOptions );
162-
163155 /**
164156 * Creates workflow client stub for a known execution. Use it to send signals, updates, or queries
165157 * to a running workflow. Do not call methods annotated with @WorkflowMethod.
@@ -168,9 +160,21 @@ static WorkflowClient newInstance(WorkflowServiceStubs service, WorkflowClientOp
168160 * @param workflowId Workflow id.
169161 * @param runId Run id of the workflow execution.
170162 * @return Stub that implements workflowInterface and can be used to signal, update, or query it.
163+ * @deprecated Use {@link #newWorkflowStub(Class, WorkflowTargetOptions)} instead.
171164 */
165+ @ Deprecated
172166 <T > T newWorkflowStub (Class <T > workflowInterface , String workflowId , Optional <String > runId );
173167
168+ /**
169+ * Creates workflow client stub for a known execution. Use it to send signals or queries to a
170+ * running workflow. Do not call methods annotated with @WorkflowMethod.
171+ *
172+ * @param workflowInterface interface that given workflow implements.
173+ * @param workflowTargetOptions options that specify target workflow execution.
174+ * @return Stub that implements workflowInterface and can be used to signal or query it.
175+ */
176+ <T > T newWorkflowStub (Class <T > workflowInterface , WorkflowTargetOptions workflowTargetOptions );
177+
174178 /**
175179 * Creates workflow untyped client stub that can be used to start a single workflow execution. Use
176180 * it to send signals or queries to a running workflow. Do not call methods annotated
@@ -201,7 +205,9 @@ static WorkflowClient newInstance(WorkflowServiceStubs service, WorkflowClientOp
201205 * workflowId is assumed.
202206 * @param workflowType type of the workflow. Optional as it is used for error reporting only.
203207 * @return Stub that can be used to start workflow and later to signal or query it.
208+ * @deprecated Use {@link #newUntypedWorkflowStub(Optional, WorkflowTargetOptions)} instead.
204209 */
210+ @ Deprecated
205211 WorkflowStub newUntypedWorkflowStub (
206212 String workflowId , Optional <String > runId , Optional <String > workflowType );
207213
@@ -212,6 +218,7 @@ WorkflowStub newUntypedWorkflowStub(
212218 * @param execution workflow id and optional run id for execution
213219 * @param workflowType type of the workflow. Optional as it is used for error reporting only.
214220 * @return Stub that can be used to start workflow and later to signal or query it.
221+ * @deprecated Use {@link #newUntypedWorkflowStub(Optional, WorkflowTargetOptions)} instead.
215222 */
216223 WorkflowStub newUntypedWorkflowStub (WorkflowExecution execution , Optional <String > workflowType );
217224
0 commit comments