Skip to content

Commit e0aa203

Browse files
committed
Addressed PR comments
1 parent e97ff3b commit e0aa203

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

packages/client/src/activity-client.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export class ActivityClient extends AsyncCompletionClient implements TypedActivi
143143
* Creates an Activity handle from ID and optionally from run ID. If `runId` is not set, the handle will refer to the
144144
* newest Activity run with the given Activity ID.
145145
*
146-
* Note 1: this function always succeeds. If the provided ID is invalid, the error will only be thrown when calling
146+
* Note 1: this function always succeeds. If the provided ID is invalid, an error will only be thrown when calling
147147
* the handle's methods.
148148
*
149149
* Note 2: if `runID` is not set when calling `getHandle`, then `runId` property of the returned handle will always
@@ -273,7 +273,7 @@ export class ActivityClient extends AsyncCompletionClient implements TypedActivi
273273
input: ActivityStartInput
274274
): Promise<temporal.api.workflowservice.v1.IStartActivityExecutionRequest> {
275275
const searchAttributes = input.options.typedSearchAttributes
276-
? encodeUnifiedSearchAttributes(undefined, input.options.typedSearchAttributes)
276+
? { indexedFields: encodeUnifiedSearchAttributes(undefined, input.options.typedSearchAttributes) }
277277
: undefined;
278278

279279
return {
@@ -291,7 +291,7 @@ export class ActivityClient extends AsyncCompletionClient implements TypedActivi
291291
input: { payloads: await encodeToPayloads(this.dataConverter, ...(input.options.args || [])) },
292292
idReusePolicy: encodeActivityIdReusePolicy(input.options.idReusePolicy),
293293
idConflictPolicy: encodeActivityIdConflictPolicy(input.options.idConflictPolicy),
294-
searchAttributes: { indexedFields: searchAttributes },
294+
searchAttributes,
295295
header: input.headers,
296296
userMetadata: await encodeUserMetadata(this.dataConverter, input.options.summary, undefined),
297297
priority: input.options.priority ? compilePriority(input.options.priority) : undefined,
@@ -427,7 +427,7 @@ export class ActivityClient extends AsyncCompletionClient implements TypedActivi
427427
})),
428428
};
429429
} catch (err) {
430-
this.rethrowGrpcError(err, 'Failed to request activity cancellation');
430+
this.rethrowGrpcError(err, 'Failed to count activities');
431431
}
432432
}
433433

@@ -498,6 +498,9 @@ export interface ActivityOptions {
498498
* If set, specifies maximum time between successful heartbeats.
499499
*/
500500
heartbeatTimeout?: Duration;
501+
/**
502+
* Controls how Activity is retried. If not set, the server will assign default retry policy.
503+
*/
501504
retry?: RetryPolicy;
502505
/**
503506
* Is set, specifies total time the activity is allowed to run, including retries.

packages/common/src/activity-options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export const [encodeActivityCancellationType, decodeActivityCancellationType] =
7777
);
7878

7979
/**
80-
* Options for remote activity invocation
80+
* Options for non-local activity invocation inside a workflow
8181
*/
8282
export interface ActivityOptions {
8383
/**

packages/test/src/helpers-integration.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ export interface Context {
3636
const defaultDynamicConfigOptions = [
3737
'system.enableActivityEagerExecution=true',
3838
'history.enableRequestIdRefLinks=true',
39+
'frontend.activityAPIsEnabled=true',
40+
'activity.enableStandalone=true',
41+
'history.enableChasm=true',
42+
'history.enableTransitionHistory=true',
3943
];
4044

4145
function setupRuntime(recordedLogs?: { [workflowId: string]: LogEntry[] }, runtimeOpts?: Partial<RuntimeOptions>) {

0 commit comments

Comments
 (0)