Skip to content

Commit

Permalink
Small typo fixes and things I noticed while onboarding (#352)
Browse files Browse the repository at this point in the history
I changed Workflow client to Client.workflow because
that's what the SDK docs suggest to do in
https://typescript.temporal.io/api/classes/client.WorkflowClient.
I made the corresponding code change in the code repo
at https://github.com/temporalio/money-transfer-project-template-ts/
so we should be good there
  • Loading branch information
GSmithApps authored Jan 6, 2025
1 parent 4942882 commit 3cd05d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/getting_started/python/hello_world_in_python/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ You can pass multiple inputs to a Workflow, but it's a good practice to send a s

:::

The method calls the `workflow.execute_activty` method which executes an Activity called `say_hello`, which you'll define next. `workflow.execute_activity` needs the [Activity Type](https://docs.temporal.io/activities#activity-type), the input parameters for the Activity, and a [Start-To-Close Timeout](https://docs.temporal.io/activities#start-to-close-timeout) or [Schedule-To-Close Timeout](https://docs.temporal.io/concepts/what-is-a-schedule-to-close-timeout).
The method calls the `workflow.execute_activity` method which executes an Activity called `say_hello`, which you'll define next. `workflow.execute_activity` needs the [Activity Type](https://docs.temporal.io/activities#activity-type), the input parameters for the Activity, and a [Start-To-Close Timeout](https://docs.temporal.io/activities#start-to-close-timeout) or [Schedule-To-Close Timeout](https://docs.temporal.io/concepts/what-is-a-schedule-to-close-timeout).

Finally, the `run` method returns the result of the Activity Execution.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,15 @@ In this tutorial, the file `client.ts` contains a program that connects to the T
<!--SNIPSTART money-transfer-project-template-ts-start-workflow-->
[src/client.ts](https://github.com/temporalio/money-transfer-project-template-ts/blob/main/src/client.ts)
```ts
import { Connection, WorkflowClient } from '@temporalio/client';
import { Connection, Client } from '@temporalio/client';
import { moneyTransfer } from './workflows';
import type { PaymentDetails } from './shared';

import { namespace, taskQueueName } from './shared';

async function run() {
const connection = await Connection.connect();
const client = new WorkflowClient({ connection, namespace });
const client = new Client({ connection, namespace });

const details: PaymentDetails = {
amount: 400,
Expand All @@ -328,7 +328,7 @@ async function run() {
`Starting transfer from account ${details.sourceAccount} to account ${details.targetAccount} for $${details.amount}`
);

const handle = await client.start(moneyTransfer, {
const handle = await client.workflow.start(moneyTransfer, {
args: [details],
taskQueue: taskQueueName,
workflowId: 'pay-invoice-801',
Expand Down

0 comments on commit 3cd05d9

Please sign in to comment.