Skip to content

Commit a2b9062

Browse files
authored
Minor CS improvements
Minor CS improvements
1 parent 1a68d04 commit a2b9062

File tree

2 files changed

+1
-68
lines changed

2 files changed

+1
-68
lines changed

src/Client/ActivityCompletionClientInterface.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@
1111

1212
namespace Temporal\Client;
1313

14-
use Temporal\Exception\Client\ActivityCanceledException;
15-
1614
/**
1715
* Used to complete asynchronously activities that called {@link
1816
* ActivityContext->doNotCompleteOnReturn()}.
1917
*
20-
* <p>Use {@link WorkflowClient#newActivityCompletionClient()} to create an instance.
18+
* <p>Use {@link WorkflowClient->newActivityCompletionClient()} to create an instance.
2119
*/
2220
interface ActivityCompletionClientInterface
2321
{

src/Client/WorkflowClientInterface.php

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -14,71 +14,6 @@
1414
use Temporal\Client\GRPC\ServiceClientInterface;
1515
use Temporal\Workflow\WorkflowRunInterface;
1616

17-
/**
18-
* Client to the Temporal service used to start and query workflows by external processes. Also it
19-
* supports creation of {@link ActivityCompletionClient} instances used to complete activities
20-
* asynchronously. Do not create this object for each request, keep it for the duration of the
21-
* process.
22-
*
23-
* <p>Given a workflow interface executing a workflow requires initializing a {@link
24-
* io.temporal.client.WorkflowClient} instance, creating a client side stub to the workflow, and
25-
* then calling a method annotated with {@literal @}{@link WorkflowMethod}.
26-
*
27-
* <pre><code>
28-
* $workflowClient = new WorkflowClient($serviceClient, ClientOptions::new()->withNamespace('default'));
29-
*
30-
* // Create a workflow stub.
31-
* $fileWorkflow = $workflowClient->newWorkflowStub(FileProcessingWorkflow::class);
32-
* </code></pre>
33-
*
34-
* There are two ways to start workflow execution: synchronously and asynchronously. Synchronous
35-
* invocation starts a workflow and then waits for its completion. If the process that started the
36-
* workflow crashes or stops waiting, the workflow continues executing. Because workflows are
37-
* potentially long running, and crashes of clients happen, it is not very commonly found in
38-
* production use. Asynchronous start initiates workflow execution and immediately returns to the
39-
* caller. This is the most common way to start workflows in production code.
40-
*
41-
* <p>Synchronous start:
42-
*
43-
* <pre><code>
44-
* // Start a workflow and wait for a result.
45-
* // Note that if the waiting process is killed, the workflow will continue executing.
46-
* String result = workflow.processFile(workflowArgs);
47-
* </code></pre>
48-
*
49-
* Asynchronous when the workflow result is not needed:
50-
*
51-
* <pre><code>
52-
* // Returns as soon as the workflow starts.
53-
* WorkflowExecution workflowExecution = WorkflowClient.start(workflow::processFile, workflowArgs);
54-
*
55-
* System.out.println("Started process file workflow with workflowId=\"" + workflowExecution.getWorkflowId()
56-
* + "\" and runId=\"" + workflowExecution.getRunId() + "\"");
57-
* </code></pre>
58-
*
59-
* Asynchronous when the result is needed:
60-
*
61-
* <pre><code>
62-
* CompletableFuture&lt;String&gt; result = WorkflowClient.execute(workflow::helloWorld, "User");
63-
* </code></pre>
64-
*
65-
* If you need to wait for a workflow completion after an asynchronous start, maybe even from a
66-
* different process, the simplest way is to call the blocking version again. If {@link
67-
* WorkflowOptions#getWorkflowIdReusePolicy()} is not {@code AllowDuplicate} then instead of
68-
* throwing {@link WorkflowExecutionAlreadyStarted}, it reconnects to an existing workflow and waits
69-
* for its completion. The following example shows how to do this from a different process than the
70-
* one that started the workflow. All this process needs is a {@code WorkflowId}.
71-
*
72-
* <pre><code>
73-
* FileProcessingWorkflow workflow = workflowClient.newWorkflowStub(FileProcessingWorkflow.class, workflowId);
74-
* // Returns result potentially waiting for workflow to complete.
75-
* String result = workflow.processFile(workflowArgs);
76-
* </code></pre>
77-
*
78-
* @see io.temporal.workflow.Workflow
79-
* @see Activity
80-
* @see io.temporal.worker.Worker
81-
*/
8217
interface WorkflowClientInterface
8318
{
8419
/**

0 commit comments

Comments
 (0)