java-sdk/docs/io/dapr/workflows/WorkflowContext.html

995 lines
85 KiB
HTML

<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) on Tue Aug 26 11:52:58 UTC 2025 -->
<title>WorkflowContext (dapr-sdk-parent 1.15.1 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2025-08-26">
<meta name="description" content="declaration: package: io.dapr.workflows, interface: WorkflowContext">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
<script type="text/javascript" src="../../../script-dir/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/WorkflowContext.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">io.dapr.workflows</a></div>
<h1 title="Interface WorkflowContext" class="title">Interface WorkflowContext</h1>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="runtime/DefaultWorkflowContext.html" title="class in io.dapr.workflows.runtime">DefaultWorkflowContext</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public interface </span><span class="element-name type-name-label">WorkflowContext</span></div>
<div class="block">Context object used by workflow implementations to perform actions such as scheduling activities,
durable timers, waiting for external events, and for getting basic information about the current
workflow instance.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab3" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab3', 3)" class="table-tab">Abstract Methods</button><button id="method-summary-table-tab5" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab5', 3)" class="table-tab">Default Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0">
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;V&gt;&nbsp;io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;V&gt;&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#allOf(java.util.List)" class="member-name-link">allOf</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;io.dapr.durabletask.Task&lt;V&gt;&gt;&nbsp;tasks)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns a new <code>Task</code> that is completed when all the given <code>Task</code>s complete.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default io.dapr.durabletask.Task&lt;io.dapr.durabletask.Task&lt;?&gt;&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#anyOf(io.dapr.durabletask.Task...)" class="member-name-link">anyOf</a><wbr>(io.dapr.durabletask.Task&lt;?&gt;...&nbsp;tasks)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Returns a new <code>Task</code> that is completed when any of the given <code>Task</code>s complete.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>io.dapr.durabletask.Task&lt;io.dapr.durabletask.Task&lt;?&gt;&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#anyOf(java.util.List)" class="member-name-link">anyOf</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;io.dapr.durabletask.Task&lt;?&gt;&gt;&nbsp;tasks)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Returns a new <code>Task</code> that is completed when any of the tasks in <code>tasks</code> completes.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#callActivity(java.lang.String)" class="member-name-link">callActivity</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Asynchronously invokes an activity by name and returns a new <code>Task</code> that completes when the activity
completes.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default &lt;V&gt;&nbsp;io.dapr.durabletask.Task&lt;V&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#callActivity(java.lang.String,java.lang.Class)" class="member-name-link">callActivity</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;returnType)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Asynchronously invokes an activity by name and returns a new <code>Task</code> that completes when the activity
completes.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#callActivity(java.lang.String,java.lang.Object)" class="member-name-link">callActivity</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Asynchronously invokes an activity by name and with the specified input value and returns a new <code>Task</code>
that completes when the activity completes.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#callActivity(java.lang.String,java.lang.Object,io.dapr.workflows.WorkflowTaskOptions)" class="member-name-link">callActivity</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
<a href="WorkflowTaskOptions.html" title="class in io.dapr.workflows">WorkflowTaskOptions</a>&nbsp;options)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Asynchronously invokes an activity by name and with the specified input value and returns a new <code>Task</code>
that completes when the activity completes.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;V&gt;&nbsp;io.dapr.durabletask.Task&lt;V&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#callActivity(java.lang.String,java.lang.Object,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)" class="member-name-link">callActivity</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
<a href="WorkflowTaskOptions.html" title="class in io.dapr.workflows">WorkflowTaskOptions</a>&nbsp;options,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;returnType)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Asynchronously invokes an activity by name and with the specified input value and returns a new <code>Task</code>
that completes when the activity completes.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default &lt;V&gt;&nbsp;io.dapr.durabletask.Task&lt;V&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#callActivity(java.lang.String,java.lang.Object,java.lang.Class)" class="member-name-link">callActivity</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;returnType)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Asynchronously invokes an activity by name and with the specified input value and returns a new <code>Task</code>
that completes when the activity completes.If the activity completes successfully, the returned <code>Task</code>'s
value will be the activity's output.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#callChildWorkflow(java.lang.String)" class="member-name-link">callChildWorkflow</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Asynchronously invokes another workflow as a child-workflow and returns a <code>Task</code> that completes
when the child-workflow completes.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#callChildWorkflow(java.lang.String,java.lang.Object)" class="member-name-link">callChildWorkflow</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Asynchronously invokes another workflow as a child-workflow and returns a <code>Task</code> that completes
when the child-workflow completes.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default &lt;V&gt;&nbsp;io.dapr.durabletask.Task&lt;V&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#callChildWorkflow(java.lang.String,java.lang.Object,java.lang.Class)" class="member-name-link">callChildWorkflow</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;returnType)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Asynchronously invokes another workflow as a child-workflow and returns a <code>Task</code> that completes
when the child-workflow completes.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#callChildWorkflow(java.lang.String,java.lang.Object,java.lang.String,io.dapr.workflows.WorkflowTaskOptions)" class="member-name-link">callChildWorkflow</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;instanceID,
<a href="WorkflowTaskOptions.html" title="class in io.dapr.workflows">WorkflowTaskOptions</a>&nbsp;options)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Asynchronously invokes another workflow as a child-workflow and returns a <code>Task</code> that completes
when the child-workflow completes.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;V&gt;&nbsp;io.dapr.durabletask.Task&lt;V&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#callChildWorkflow(java.lang.String,java.lang.Object,java.lang.String,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)" class="member-name-link">callChildWorkflow</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;instanceID,
<a href="WorkflowTaskOptions.html" title="class in io.dapr.workflows">WorkflowTaskOptions</a>&nbsp;options,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;returnType)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Asynchronously invokes another workflow as a child-workflow and returns a <code>Task</code> that completes
when the child-workflow completes.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default &lt;V&gt;&nbsp;io.dapr.durabletask.Task&lt;V&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#callChildWorkflow(java.lang.String,java.lang.Object,java.lang.String,java.lang.Class)" class="member-name-link">callChildWorkflow</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;instanceID,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;returnType)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Asynchronously invokes another workflow as a child-workflow and returns a <code>Task</code> that completes
when the child-workflow completes.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#complete(java.lang.Object)" class="member-name-link">complete</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;output)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Completes the current workflow.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#continueAsNew(java.lang.Object)" class="member-name-link">continueAsNew</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Restarts the orchestration with a new input and clears its history.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#continueAsNew(java.lang.Object,boolean)" class="member-name-link">continueAsNew</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
boolean&nbsp;preserveUnprocessedEvents)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Restarts the orchestration with a new input and clears its history.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#createTimer(java.time.Duration)" class="member-name-link">createTimer</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Duration.html" title="class or interface in java.time" class="external-link">Duration</a>&nbsp;duration)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Creates a durable timer that expires after the specified delay.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#createTimer(java.time.ZonedDateTime)" class="member-name-link">createTimer</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZonedDateTime.html" title="class or interface in java.time" class="external-link">ZonedDateTime</a>&nbsp;zonedDateTime)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Creates a durable timer that expires after the specified timestamp with specific zone.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Instant.html" title="class or interface in java.time" class="external-link">Instant</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getCurrentInstant()" class="member-name-link">getCurrentInstant</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the current orchestration time in UTC.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;V&gt;&nbsp;V</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getInput(java.lang.Class)" class="member-name-link">getInput</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;targetType)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the deserialized input of the current task orchestration.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getInstanceId()" class="member-name-link">getInstanceId</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the instance ID of the current workflow.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>org.slf4j.Logger</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getLogger()" class="member-name-link">getLogger</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Get a logger only when <code>isReplaying</code> is false.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#getName()" class="member-name-link">getName</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets the name of the current workflow.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#isReplaying()" class="member-name-link">isReplaying</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Gets a value indicating whether the workflow is currently replaying a previous execution.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#newUuid()" class="member-name-link">newUuid</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Create a new UUID that is safe for replay within a workflow.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;V&gt;&nbsp;io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#waitForExternalEvent(java.lang.String)" class="member-name-link">waitForExternalEvent</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Waits for an event to be raised named <code>name</code> and returns a <code>Task</code> that completes when the event is
received.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code>default &lt;V&gt;&nbsp;io.dapr.durabletask.Task&lt;V&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5"><code><a href="#waitForExternalEvent(java.lang.String,java.lang.Class)" class="member-name-link">waitForExternalEvent</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;dataType)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab5">
<div class="block">Waits for an event to be raised named <code>name</code> and returns a <code>Task</code> that completes when the event is
received.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;V&gt;&nbsp;io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#waitForExternalEvent(java.lang.String,java.time.Duration)" class="member-name-link">waitForExternalEvent</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Duration.html" title="class or interface in java.time" class="external-link">Duration</a>&nbsp;timeout)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Waits for an event to be raised named <code>name</code> and returns a <code>Task</code> that completes when the event is
received or is canceled when <code>timeout</code> expires.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code>&lt;V&gt;&nbsp;io.dapr.durabletask.Task&lt;V&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3"><code><a href="#waitForExternalEvent(java.lang.String,java.time.Duration,java.lang.Class)" class="member-name-link">waitForExternalEvent</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Duration.html" title="class or interface in java.time" class="external-link">Duration</a>&nbsp;timeout,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;dataType)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab3">
<div class="block">Waits for an event to be raised named <code>name</code> and returns a <code>Task</code> that completes when the event is
received or is canceled when <code>timeout</code> expires.</div>
</div>
</div>
</div>
</div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getLogger()">
<h3>getLogger</h3>
<div class="member-signature"><span class="return-type">org.slf4j.Logger</span>&nbsp;<span class="element-name">getLogger</span>()</div>
<div class="block">Get a logger only when <code>isReplaying</code> is false.
Otherwise, return a NOP (no operation) logger.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>Logger</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getName()">
<h3>getName</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">getName</span>()</div>
<div class="block">Gets the name of the current workflow.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the name of the current workflow</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getInstanceId()">
<h3>getInstanceId</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">getInstanceId</span>()</div>
<div class="block">Gets the instance ID of the current workflow.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the instance ID of the current workflow</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getCurrentInstant()">
<h3>getCurrentInstant</h3>
<div class="member-signature"><span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Instant.html" title="class or interface in java.time" class="external-link">Instant</a></span>&nbsp;<span class="element-name">getCurrentInstant</span>()</div>
<div class="block">Gets the current orchestration time in UTC.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the current orchestration time in UTC</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="complete(java.lang.Object)">
<h3>complete</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">complete</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;output)</span></div>
<div class="block">Completes the current workflow.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>output</code> - the serializable output of the completed Workflow.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="waitForExternalEvent(java.lang.String,java.time.Duration,java.lang.Class)">
<h3>waitForExternalEvent</h3>
<div class="member-signature"><span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;V&gt;</span>&nbsp;<span class="element-name">waitForExternalEvent</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Duration.html" title="class or interface in java.time" class="external-link">Duration</a>&nbsp;timeout,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;dataType)</span>
throws <span class="exceptions">io.dapr.durabletask.TaskCanceledException</span></div>
<div class="block">Waits for an event to be raised named <code>name</code> and returns a <code>Task</code> that completes when the event is
received or is canceled when <code>timeout</code> expires.
<p>If the current orchestration is not yet waiting for an event named <code>name</code>, then the event will be saved in
the orchestration instance state and dispatched immediately when this method is called. This event saving occurs
even if the current orchestrator cancels the wait operation before the event is received.
<p>Orchestrators can wait for the same event name multiple times, so waiting for multiple events with the same name
is allowed. Each external event received by an orchestrator will complete just one task returned by this method.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>V</code> - the expected type of the event data payload</dd>
<dt>Parameters:</dt>
<dd><code>name</code> - the case-insensitive name of the event to wait for</dd>
<dd><code>timeout</code> - the amount of time to wait before canceling the returned <code>Task</code></dd>
<dd><code>dataType</code> - the expected class type of the event data payload</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the external event is received or when <code>timeout</code> expires</dd>
<dt>Throws:</dt>
<dd><code>io.dapr.durabletask.TaskCanceledException</code> - if the specified <code>timeout</code> value expires before the event is received</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="waitForExternalEvent(java.lang.String,java.time.Duration)">
<h3>waitForExternalEvent</h3>
<div class="member-signature"><span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</span>&nbsp;<span class="element-name">waitForExternalEvent</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Duration.html" title="class or interface in java.time" class="external-link">Duration</a>&nbsp;timeout)</span>
throws <span class="exceptions">io.dapr.durabletask.TaskCanceledException</span></div>
<div class="block">Waits for an event to be raised named <code>name</code> and returns a <code>Task</code> that completes when the event is
received or is canceled when <code>timeout</code> expires.
<p>See <a href="#waitForExternalEvent(java.lang.String,java.time.Duration,java.lang.Class)"><code>waitForExternalEvent(String, Duration, Class)</code></a> for a full description.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>V</code> - the expected type of the event data payload</dd>
<dt>Parameters:</dt>
<dd><code>name</code> - the case-insensitive name of the event to wait for</dd>
<dd><code>timeout</code> - the amount of time to wait before canceling the returned <code>Task</code></dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the external event is received or when <code>timeout</code> expires</dd>
<dt>Throws:</dt>
<dd><code>io.dapr.durabletask.TaskCanceledException</code> - if the specified <code>timeout</code> value expires before the event is received</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="waitForExternalEvent(java.lang.String)">
<h3>waitForExternalEvent</h3>
<div class="member-signature"><span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</span>&nbsp;<span class="element-name">waitForExternalEvent</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</span>
throws <span class="exceptions">io.dapr.durabletask.TaskCanceledException</span></div>
<div class="block">Waits for an event to be raised named <code>name</code> and returns a <code>Task</code> that completes when the event is
received.
<p>See <a href="#waitForExternalEvent(java.lang.String,java.time.Duration,java.lang.Class)"><code>waitForExternalEvent(String, Duration, Class)</code></a> for a full description.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>V</code> - the expected type of the event data payload</dd>
<dt>Parameters:</dt>
<dd><code>name</code> - the case-insensitive name of the event to wait for</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the external event is received</dd>
<dt>Throws:</dt>
<dd><code>io.dapr.durabletask.TaskCanceledException</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="waitForExternalEvent(java.lang.String,java.lang.Class)">
<h3>waitForExternalEvent</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;V&gt;</span>&nbsp;<span class="element-name">waitForExternalEvent</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;dataType)</span></div>
<div class="block">Waits for an event to be raised named <code>name</code> and returns a <code>Task</code> that completes when the event is
received.
<p>See <a href="#waitForExternalEvent(java.lang.String,java.time.Duration,java.lang.Class)"><code>waitForExternalEvent(String, Duration, Class)</code></a> for a full description.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>V</code> - the expected type of the event data payload</dd>
<dt>Parameters:</dt>
<dd><code>name</code> - the case-insensitive name of the event to wait for</dd>
<dd><code>dataType</code> - the expected class type of the event data payload</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the external event is received</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="callActivity(java.lang.String,java.lang.Object,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)">
<h3>callActivity</h3>
<div class="member-signature"><span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;V&gt;</span>&nbsp;<span class="element-name">callActivity</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
<a href="WorkflowTaskOptions.html" title="class in io.dapr.workflows">WorkflowTaskOptions</a>&nbsp;options,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;returnType)</span></div>
<div class="block">Asynchronously invokes an activity by name and with the specified input value and returns a new <code>Task</code>
that completes when the activity completes. If the activity completes successfully, the returned <code>Task</code>'s
value will be the activity's output. If the activity fails, the returned <code>Task</code> will complete exceptionally
with a <code>TaskFailedException</code>.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>V</code> - the expected type of the activity output</dd>
<dt>Parameters:</dt>
<dd><code>name</code> - the name of the activity to call</dd>
<dd><code>input</code> - the serializable input to pass to the activity</dd>
<dd><code>options</code> - additional options that control the execution and processing of the activity</dd>
<dd><code>returnType</code> - the expected class type of the activity output</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the activity completes or fails</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="callActivity(java.lang.String)">
<h3>callActivity</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</span>&nbsp;<span class="element-name">callActivity</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</span></div>
<div class="block">Asynchronously invokes an activity by name and returns a new <code>Task</code> that completes when the activity
completes. See <a href="#callActivity(java.lang.String,java.lang.Object,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)"><code>callActivity(String, Object, WorkflowTaskOptions, Class)</code></a> for a complete description.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - the name of the activity to call</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the activity completes or fails</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="#callActivity(java.lang.String,java.lang.Object,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)"><code>callActivity(String, Object, WorkflowTaskOptions, Class)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="callActivity(java.lang.String,java.lang.Object)">
<h3>callActivity</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</span>&nbsp;<span class="element-name">callActivity</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input)</span></div>
<div class="block">Asynchronously invokes an activity by name and with the specified input value and returns a new <code>Task</code>
that completes when the activity completes.
See <a href="#callActivity(java.lang.String,java.lang.Object,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)"><code>callActivity(String, Object, WorkflowTaskOptions, Class)</code></a> for a complete description.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - the name of the activity to call</dd>
<dd><code>input</code> - the serializable input to pass to the activity</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the activity completes or fails</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="callActivity(java.lang.String,java.lang.Class)">
<h3>callActivity</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;V&gt;</span>&nbsp;<span class="element-name">callActivity</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;returnType)</span></div>
<div class="block">Asynchronously invokes an activity by name and returns a new <code>Task</code> that completes when the activity
completes. If the activity completes successfully, the returned <code>Task</code>'s value will be the activity's
output. See <a href="#callActivity(java.lang.String,java.lang.Object,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)"><code>callActivity(String, Object, WorkflowTaskOptions, Class)</code></a> for a complete description.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>V</code> - the expected type of the activity output</dd>
<dt>Parameters:</dt>
<dd><code>name</code> - the name of the activity to call</dd>
<dd><code>returnType</code> - the expected class type of the activity output</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the activity completes or fails</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="callActivity(java.lang.String,java.lang.Object,java.lang.Class)">
<h3>callActivity</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;V&gt;</span>&nbsp;<span class="element-name">callActivity</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;returnType)</span></div>
<div class="block">Asynchronously invokes an activity by name and with the specified input value and returns a new <code>Task</code>
that completes when the activity completes.If the activity completes successfully, the returned <code>Task</code>'s
value will be the activity's output.
See <a href="#callActivity(java.lang.String,java.lang.Object,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)"><code>callActivity(String, Object, WorkflowTaskOptions, Class)</code></a> for a complete description.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>V</code> - the expected type of the activity output</dd>
<dt>Parameters:</dt>
<dd><code>name</code> - the name of the activity to call</dd>
<dd><code>input</code> - the serializable input to pass to the activity</dd>
<dd><code>returnType</code> - the expected class type of the activity output</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the activity completes or fails</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="callActivity(java.lang.String,java.lang.Object,io.dapr.workflows.WorkflowTaskOptions)">
<h3>callActivity</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</span>&nbsp;<span class="element-name">callActivity</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
<a href="WorkflowTaskOptions.html" title="class in io.dapr.workflows">WorkflowTaskOptions</a>&nbsp;options)</span></div>
<div class="block">Asynchronously invokes an activity by name and with the specified input value and returns a new <code>Task</code>
that completes when the activity completes.
See <a href="#callActivity(java.lang.String,java.lang.Object,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)"><code>callActivity(String, Object, WorkflowTaskOptions, Class)</code></a> for a complete description.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - the name of the activity to call</dd>
<dd><code>input</code> - the serializable input to pass to the activity</dd>
<dd><code>options</code> - additional options that control the execution and processing of the activity</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the activity completes or fails</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="isReplaying()">
<h3>isReplaying</h3>
<div class="member-signature"><span class="return-type">boolean</span>&nbsp;<span class="element-name">isReplaying</span>()</div>
<div class="block">Gets a value indicating whether the workflow is currently replaying a previous execution.
<p>Workflow functions are "replayed" after being unloaded from memory to reconstruct local variable state.
During a replay, previously executed tasks will be completed automatically with previously seen values
that are stored in the workflow history. Once the workflow reaches the point where it's no longer
replaying existing history, this method will return <code>false</code>.
<p>You can use this method if you have logic that needs to run only when <em>not</em> replaying. For example,
certain types of application logging may become too noisy when duplicated as part of replay. The
application code could check to see whether the function is being replayed and then issue the log statements
when this value is <code>false</code>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd><code>true</code> if the workflow is replaying, otherwise <code>false</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="allOf(java.util.List)">
<h3>allOf</h3>
<div class="member-signature"><span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;V&gt;&gt;</span>&nbsp;<span class="element-name">allOf</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;io.dapr.durabletask.Task&lt;V&gt;&gt;&nbsp;tasks)</span>
throws <span class="exceptions">io.dapr.durabletask.CompositeTaskFailedException</span></div>
<div class="block">Returns a new <code>Task</code> that is completed when all the given <code>Task</code>s complete. If any of the given
<code>Task</code>s complete with an exception, the returned <code>Task</code> will also complete with an
<code>CompositeTaskFailedException</code> containing details of the first encountered failure.
The value of the returned <code>Task</code> is an ordered list of the return values of the given tasks.
If no tasks are provided, returns a <code>Task</code> completed with value
<code>null</code>.
<p>This method is useful for awaiting the completion of a set of independent tasks before continuing to the next
step in the orchestration, as in the following example:
<pre><code>
Task&lt;String&gt; t1 = ctx.callActivity("MyActivity", String.class);
Task&lt;String&gt; t2 = ctx.callActivity("MyActivity", String.class);
Task&lt;String&gt; t3 = ctx.callActivity("MyActivity", String.class);
List&lt;String&gt; orderedResults = ctx.allOf(List.of(t1, t2, t3)).await();
</code></pre>
<p>Exceptions in any of the given tasks results in an unchecked <code>CompositeTaskFailedException</code>.
This exception can be inspected to obtain failure details of individual <code>Task</code>s.
<pre><code>
try {
List&lt;String&gt; orderedResults = ctx.allOf(List.of(t1, t2, t3)).await();
} catch (CompositeTaskFailedException e) {
List&lt;Exception&gt; exceptions = e.getExceptions()
}
</code></pre></div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>V</code> - the return type of the <code>Task</code> objects</dd>
<dt>Parameters:</dt>
<dd><code>tasks</code> - the list of <code>Task</code> objects</dd>
<dt>Returns:</dt>
<dd>the values of the completed <code>Task</code> objects in the same order as the source list</dd>
<dt>Throws:</dt>
<dd><code>io.dapr.durabletask.CompositeTaskFailedException</code> - if the specified <code>timeout</code> value expires before the event is received</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="anyOf(java.util.List)">
<h3>anyOf</h3>
<div class="member-signature"><span class="return-type">io.dapr.durabletask.Task&lt;io.dapr.durabletask.Task&lt;?&gt;&gt;</span>&nbsp;<span class="element-name">anyOf</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;io.dapr.durabletask.Task&lt;?&gt;&gt;&nbsp;tasks)</span></div>
<div class="block">Returns a new <code>Task</code> that is completed when any of the tasks in <code>tasks</code> completes.
See <a href="#anyOf(io.dapr.durabletask.Task...)"><code>anyOf(Task[])</code></a> for more detailed information.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>tasks</code> - the list of <code>Task</code> objects</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that is completed when any of the given <code>Task</code>s complete</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#anyOf(io.dapr.durabletask.Task...)"><code>anyOf(Task[])</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="anyOf(io.dapr.durabletask.Task...)">
<h3>anyOf</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;io.dapr.durabletask.Task&lt;?&gt;&gt;</span>&nbsp;<span class="element-name">anyOf</span><wbr><span class="parameters">(io.dapr.durabletask.Task&lt;?&gt;...&nbsp;tasks)</span></div>
<div class="block">Returns a new <code>Task</code> that is completed when any of the given <code>Task</code>s complete. The value of the
new <code>Task</code> is a reference to the completed <code>Task</code> object. If no tasks are provided, returns a
<code>Task</code> that never completes.
<p>This method is useful for waiting on multiple concurrent tasks and performing a task-specific operation when the
first task completes, as in the following example:
<pre><code>
Task&lt;Void&gt; event1 = ctx.waitForExternalEvent("Event1");
Task&lt;Void&gt; event2 = ctx.waitForExternalEvent("Event2");
Task&lt;Void&gt; event3 = ctx.waitForExternalEvent("Event3");
Task&lt;?&gt; winner = ctx.anyOf(event1, event2, event3).await();
if (winner == event1) {
// ...
} else if (winner == event2) {
// ...
} else if (winner == event3) {
// ...
}
</code></pre>
The <code>anyOf</code> method can also be used for implementing long-running timeouts, as in the following example:
<pre><code>
Task&lt;Void&gt; activityTask = ctx.callActivity("SlowActivity");
Task&lt;Void&gt; timeoutTask = ctx.createTimer(Duration.ofMinutes(30));
Task&lt;?&gt; winner = ctx.anyOf(activityTask, timeoutTask).await();
if (winner == activityTask) {
// completion case
} else {
// timeout case
}
</code></pre></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>tasks</code> - the list of <code>Task</code> objects</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that is completed when any of the given <code>Task</code>s complete</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createTimer(java.time.Duration)">
<h3>createTimer</h3>
<div class="member-signature"><span class="return-type">io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</span>&nbsp;<span class="element-name">createTimer</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/Duration.html" title="class or interface in java.time" class="external-link">Duration</a>&nbsp;duration)</span></div>
<div class="block">Creates a durable timer that expires after the specified delay.
<p>Specifying a long delay (for example, a delay of a few days or more) may result in the creation of multiple,
internally-managed durable timers. The orchestration code doesn't need to be aware of this behavior. However,
it may be visible in framework logs and the stored history state.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>duration</code> - the amount of time before the timer should expire</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes after the specified delay</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createTimer(java.time.ZonedDateTime)">
<h3>createTimer</h3>
<div class="member-signature"><span class="return-type">io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</span>&nbsp;<span class="element-name">createTimer</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/ZonedDateTime.html" title="class or interface in java.time" class="external-link">ZonedDateTime</a>&nbsp;zonedDateTime)</span></div>
<div class="block">Creates a durable timer that expires after the specified timestamp with specific zone.
<p>Specifying a long delay (for example, a delay of a few days or more) may result in the creation of multiple,
internally-managed timers. The workflow code doesn't need to be aware of this behavior. However,
it may be visible in framework logs and the stored history state.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>zonedDateTime</code> - timestamp with specific zone when the timer should expire</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes after the specified delay</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getInput(java.lang.Class)">
<h3>getInput</h3>
<div class="member-signature"><span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type">V</span>&nbsp;<span class="element-name">getInput</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;targetType)</span></div>
<div class="block">Gets the deserialized input of the current task orchestration.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>V</code> - the expected type of the workflow input</dd>
<dt>Parameters:</dt>
<dd><code>targetType</code> - the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link"><code>Class</code></a> object associated with <code>V</code></dd>
<dt>Returns:</dt>
<dd>the deserialized input as an object of type <code>V</code> or <code>null</code> if no input was provided.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="callChildWorkflow(java.lang.String)">
<h3>callChildWorkflow</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</span>&nbsp;<span class="element-name">callChildWorkflow</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name)</span></div>
<div class="block">Asynchronously invokes another workflow as a child-workflow and returns a <code>Task</code> that completes
when the child-workflow completes.
<p>See <a href="#callChildWorkflow(java.lang.String,java.lang.Object,java.lang.String,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)"><code>callChildWorkflow(String, Object, String, WorkflowTaskOptions, Class)</code></a> for a full description.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - the name of the workflow to invoke</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the child-workflow completes or fails</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="#callChildWorkflow(java.lang.String,java.lang.Object,java.lang.String,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)"><code>callChildWorkflow(String, Object, String, WorkflowTaskOptions, Class)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="callChildWorkflow(java.lang.String,java.lang.Object)">
<h3>callChildWorkflow</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</span>&nbsp;<span class="element-name">callChildWorkflow</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input)</span></div>
<div class="block">Asynchronously invokes another workflow as a child-workflow and returns a <code>Task</code> that completes
when the child-workflow completes.
<p>See <a href="#callChildWorkflow(java.lang.String,java.lang.Object,java.lang.String,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)"><code>callChildWorkflow(String, Object, String, WorkflowTaskOptions, Class)</code></a> for a full description.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - the name of the workflow to invoke</dd>
<dd><code>input</code> - the serializable input to send to the child-workflow</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the child-workflow completes or fails</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="callChildWorkflow(java.lang.String,java.lang.Object,java.lang.Class)">
<h3>callChildWorkflow</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;V&gt;</span>&nbsp;<span class="element-name">callChildWorkflow</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;returnType)</span></div>
<div class="block">Asynchronously invokes another workflow as a child-workflow and returns a <code>Task</code> that completes
when the child-workflow completes.
<p>See <a href="#callChildWorkflow(java.lang.String,java.lang.Object,java.lang.String,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)"><code>callChildWorkflow(String, Object, String, WorkflowTaskOptions, Class)</code></a> for a full description.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>V</code> - the expected type of the child-workflow output</dd>
<dt>Parameters:</dt>
<dd><code>name</code> - the name of the workflow to invoke</dd>
<dd><code>input</code> - the serializable input to send to the child-workflow</dd>
<dd><code>returnType</code> - the expected class type of the child-workflow output</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the child-workflow completes or fails</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="callChildWorkflow(java.lang.String,java.lang.Object,java.lang.String,java.lang.Class)">
<h3>callChildWorkflow</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;V&gt;</span>&nbsp;<span class="element-name">callChildWorkflow</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;instanceID,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;returnType)</span></div>
<div class="block">Asynchronously invokes another workflow as a child-workflow and returns a <code>Task</code> that completes
when the child-workflow completes.
<p>See <a href="#callChildWorkflow(java.lang.String,java.lang.Object,java.lang.String,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)"><code>callChildWorkflow(String, Object, String, WorkflowTaskOptions, Class)</code></a> for a full description.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>V</code> - the expected type of the child-workflow output</dd>
<dt>Parameters:</dt>
<dd><code>name</code> - the name of the workflow to invoke</dd>
<dd><code>input</code> - the serializable input to send to the child-workflow</dd>
<dd><code>instanceID</code> - the unique ID of the child-workflow</dd>
<dd><code>returnType</code> - the expected class type of the child-workflow output</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the child-workflow completes or fails</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="callChildWorkflow(java.lang.String,java.lang.Object,java.lang.String,io.dapr.workflows.WorkflowTaskOptions)">
<h3>callChildWorkflow</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Void.html" title="class or interface in java.lang" class="external-link">Void</a>&gt;</span>&nbsp;<span class="element-name">callChildWorkflow</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;instanceID,
<a href="WorkflowTaskOptions.html" title="class in io.dapr.workflows">WorkflowTaskOptions</a>&nbsp;options)</span></div>
<div class="block">Asynchronously invokes another workflow as a child-workflow and returns a <code>Task</code> that completes
when the child-workflow completes.
<p>See <a href="#callChildWorkflow(java.lang.String,java.lang.Object,java.lang.String,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)"><code>callChildWorkflow(String, Object, String, WorkflowTaskOptions, Class)</code></a> for a full description.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>name</code> - the name of the workflow to invoke</dd>
<dd><code>input</code> - the serializable input to send to the child-workflow</dd>
<dd><code>instanceID</code> - the unique ID of the child-workflow</dd>
<dd><code>options</code> - additional options that control the execution and processing of the activity</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the child-workflow completes or fails</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="callChildWorkflow(java.lang.String,java.lang.Object,java.lang.String,io.dapr.workflows.WorkflowTaskOptions,java.lang.Class)">
<h3>callChildWorkflow</h3>
<div class="member-signature"><span class="type-parameters">&lt;V&gt;</span>&nbsp;<span class="return-type">io.dapr.durabletask.Task&lt;V&gt;</span>&nbsp;<span class="element-name">callChildWorkflow</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;name,
@Nullable
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
@Nullable
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;instanceID,
@Nullable
<a href="WorkflowTaskOptions.html" title="class in io.dapr.workflows">WorkflowTaskOptions</a>&nbsp;options,
<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;V&gt;&nbsp;returnType)</span></div>
<div class="block">Asynchronously invokes another workflow as a child-workflow and returns a <code>Task</code> that completes
when the child-workflow completes. If the child-workflow completes successfully, the returned
<code>Task</code>'s value will be the activity's output. If the child-workflow fails, the returned <code>Task</code>
will complete exceptionally with a <code>TaskFailedException</code>.
<p>A child-workflow has its own instance ID, history, and status that is independent of the parent workflow
that started it. There are many advantages to breaking down large orchestrations into child-workflows:
<ul>
<li>
Splitting large orchestrations into a series of smaller child-workflows can make code more maintainable.
</li>
<li>
Distributing orchestration logic across multiple compute nodes concurrently is useful if
orchestration logic otherwise needs to coordinate a lot of tasks.
</li>
<li>
Memory usage and CPU overhead can be reduced by keeping the history of parent orchestrations smaller.
</li>
</ul>
The disadvantage is that there is overhead associated with starting a child-workflow and processing its
output. This is typically only an issue for very small orchestrations.
<p>Because child-workflows are independent of their parents, terminating a parent orchestration does not affect
any child-workflows. child-workflows must be terminated independently using their unique instance ID,
which is specified using the <code>instanceID</code> parameter</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><code>V</code> - the expected type of the child-workflow output</dd>
<dt>Parameters:</dt>
<dd><code>name</code> - the name of the workflow to invoke</dd>
<dd><code>input</code> - the serializable input to send to the child-workflow</dd>
<dd><code>instanceID</code> - the unique ID of the child-workflow</dd>
<dd><code>options</code> - additional options that control the execution and processing of the activity</dd>
<dd><code>returnType</code> - the expected class type of the child-workflow output</dd>
<dt>Returns:</dt>
<dd>a new <code>Task</code> that completes when the child-workflow completes or fails</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="continueAsNew(java.lang.Object)">
<h3>continueAsNew</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">continueAsNew</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input)</span></div>
<div class="block">Restarts the orchestration with a new input and clears its history. See <a href="#continueAsNew(java.lang.Object,boolean)"><code>continueAsNew(Object, boolean)</code></a>
for a full description.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>input</code> - the serializable input data to re-initialize the instance with</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="continueAsNew(java.lang.Object,boolean)">
<h3>continueAsNew</h3>
<div class="member-signature"><span class="return-type">void</span>&nbsp;<span class="element-name">continueAsNew</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>&nbsp;input,
boolean&nbsp;preserveUnprocessedEvents)</span></div>
<div class="block">Restarts the orchestration with a new input and clears its history.
<p>This method is primarily designed for eternal orchestrations, which are orchestrations that
may not ever complete. It works by restarting the orchestration, providing it with a new input,
and truncating the existing orchestration history. It allows an orchestration to continue
running indefinitely without having its history grow unbounded. The benefits of periodically
truncating history include decreased memory usage, decreased storage volumes, and shorter orchestrator
replays when rebuilding state.
<p>The results of any incomplete tasks will be discarded when an orchestrator calls <code>continueAsNew</code>.
For example, if a timer is scheduled and then <code>continueAsNew</code> is called before the timer fires, the timer
event will be discarded. The only exception to this is external events. By default, if an external event is
received by an orchestration but not yet processed, the event is saved in the orchestration state unit it is
received by a call to <a href="#waitForExternalEvent(java.lang.String,java.time.Duration,java.lang.Class)"><code>waitForExternalEvent(java.lang.String, java.time.Duration, java.lang.Class&lt;V&gt;)</code></a>. These events will remain in memory
even after an orchestrator restarts using <code>continueAsNew</code>. This behavior can be disabled by specifying
<code>false</code> for the <code>preserveUnprocessedEvents</code> parameter value.
<p>Orchestrator implementations should complete immediately after calling the<code>continueAsNew</code> method.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>input</code> - the serializable input data to re-initialize the instance with</dd>
<dd><code>preserveUnprocessedEvents</code> - <code>true</code> to push unprocessed external events into the new orchestration
history, otherwise <code>false</code></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="newUuid()">
<h3>newUuid</h3>
<div class="member-signature"><span class="modifiers">default</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/UUID.html" title="class or interface in java.util" class="external-link">UUID</a></span>&nbsp;<span class="element-name">newUuid</span>()</div>
<div class="block">Create a new UUID that is safe for replay within a workflow.
<p>
The default implementation of this method creates a name-based UUID
using the algorithm from RFC 4122 §4.3. The name input used to generate
this value is a combination of the workflow instance ID and an
internally managed sequence number.
</p></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>a deterministic UUID</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2025. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>