File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
src/main/java/com/uber/cadence/workflow Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 290290 * }
291291 * </code></pre>
292292 *
293+ * To start child then return and let child run:
294+ *
295+ * <pre><code>
296+ * public static class GreetingWorkflowImpl implements GreetingWorkflow {
297+ *
298+ * {@literal @}Override
299+ * public String getGreeting(String name) {
300+ *
301+ * GreetingChild child1 = Workflow.newChildWorkflowStub(GreetingChild.class);
302+ * Async.function(child1::composeGreeting, "Hello", name);
303+ *
304+ * // block until child started,
305+ * // otherwise child may not start because parent complete first.
306+ * Promise<WorkflowExecution> childPromise = Workflow.getWorkflowExecution(child);
307+ * childPromise.get();
308+ *
309+ * return "Parent Greeting";
310+ * }
311+ * }
312+ * </code></pre>
313+ *
293314 * To send signal to a child, call a method annotated with {@literal @}{@link SignalMethod}:
294315 *
295316 * <pre><code>
You can’t perform that action at this time.
0 commit comments