Go ActivityOptions reference
Create an instance of `ActivityOptions` from the `go.temporal.io/sdk/workflow` package and use `WithActivityOptions()` to apply it to the instance of `workflow.Context`.
Create an instance of `ActivityOptions` from the `go.temporal.io/sdk/workflow` package and use `WithActivityOptions()` to apply it to the instance of `workflow.Context`.
Create an instance of `StartWorkflowOptions` from the `go.temporal.io/sdk/client` package, and pass the instance to the `ExecuteWorkflow` call.
Add custom Search Attributes to Workflow Executions at start time
Connect a Temporal Client to a Cluster in the Go SDK.
To cause a Workflow to Continue-As-New, use `Workflow.continueAsNew()`.
To cause a Workflow Execution to Continue-As-New, the Workflow function should return the result of the `NewContinueAsNewError()` API available from the `go.temporal.io/sdk/workflow` package.
Wrap your custom functionality around the default Data Converter.
To initialize a Workflow Client, create an instance of a `WorkflowClient`, create a client-side `WorkflowStub`, and then call a Workflow method (annotated with the `@WorkflowMethod` annotation).
First, enable Sessions on the Worker via the Worker Options and then use the `CreateSession` API to create a Context object that can be passed to the calls to spawn Activity Executions.
To customize the Workflow Type set the `Name` parameter with `RegisterOptions` when registering your Workflow with a Worker.
The Activity Type defaults to method name with the first letter of the method name capitalized, and can be customized using `namePrefix()` or `{ActivityMethod.name()}` to ensure they are distinct.
To customize the Workflow Type set the `Name` parameter with `RegisterOptions` when registering your Workflow with a Worker.
The Workflow Type defaults to the short name of the Workflow interface, and can be customized with the `name` parameter.
Create a Query handler using the `@QueryMethod` annotation in the Workflow interface.
Structs should be used to define Signals and carry data.
An Activity interface can have any number of parameters.
Activity return values must be serializable and deserializable by the provided `DataConverter`
Define a Signal method with `@SignalMethod` annotation in the Workflow interface.
A method annotated with `@WorkflowMethod` can have any number of parameters.
Workflow method arguments and return values must be serializable and deserializable using the provided `DataConverter`.
Use the `newWorker` method on an instance of a `WorkerFactory` to create a new Worker in Java.
In the Temporal Java SDK programming model, a Workflow is a class which implements a Workflow interface.
In the Temporal Java SDK programming model, a Workflow is a class which implements a Workflow interface.
In the Temporal Java SDK programming model, Activities are classes which implement the Activity Interface.
In the Temporal Java SDK programming model, Activities are classes which implement the Activity Interface.
To emit metrics with the Java SDK, use `WorkflowServiceStubsOptions.Builder.setMetricsScope` to set the metrics scope in your Worker or Client code.
Use the SideEffect API from the `go.temporal.io/sdk/workflow` package to execute a Side Effect directly in your Workflow.
A synchronous Workflow Execution blocks your client thread until the Workflow Execution completes (or fails) and get the results (or error in case of failure). An asynchronous Workflow Execution immediately returns a value to the caller.
To get the results of an asynchronously invoked Activity method, use the `Promise` `get` method to block until the Activity method result is available.
To handle a Query in a Workflow, define a Query handler method using the `@QueryMethod` annotation in the Workflow interface.
Use the `@SignalMethod` annotation to handle Signals within the Workflow interface.
When defining Workflows using the Temporal Java SDK, the Workflow code must be written to execute effectively once and to completion.
To inform the Temporal service that the Activity is still alive, use `Activity.getExecutionContext().heartbeat()` in the Activity implementation code.
List Workflow Executions using the Client
Log from a Workflow
Providing authorization header to Temporal Server in Java SDK including JWT tokens
Use `worker.registerWorkflowImplementationTypes` to register Workflow type and `worker.registerActivitiesImplementations` to register Activity implementation with Workers.
How to remove Search Attributes from a Workflow
Use the `CancelWorkflow` API to cancel a Workflow Execution using its Id.
To send a Query to a Workflow Execution from an external process, call the Query method (defined in the Workflow) from a `WorkflowStub` within the Client code.
To send a Signal to a Workflow Execution from a Client, call the Signal method, annotated with `@SignalMethod` in the Workflow interface, from the Client code.
To send a Signal from within a Workflow to a different Workflow Execution, initiate an `ExternalWorkflowStub` in the implementation of the current Workflow and call the Signal method defined in the other Workflow.
To send Signals to a Workflow Execution whose status is unknown, use `SignalWithStart` with a `WorkflowStub` in the Client code.
Set the Cron Schedule with the `WorkflowStub` instance in the Client code using [`WorkflowOptions.Builder.setCronSchedule`
Set the Workflow Id with the `WorkflowStub` instance in the Client code using `WorkflowOptions.Builder.setWorkflowId`.
To set a Heartbeat Timeout, use `ActivityOptions.newBuilder.setHeartbeatTimeout`].
To set a Schedule-To-Close Timeout, use `ActivityOptions.newBuilder.setScheduleToCloseTimeout`].
To set a Schedule-To-Start Timeout, use `ActivityOptions.newBuilder.setScheduleToStartTimeout`].
To set a Start-To-Close Timeout, use `ActivityOptions.newBuilder.setStartToCloseTimeout`].
Set the Workflow Execution Timeout with the `WorkflowStub` instance in the Client code using `WorkflowOptions.Builder.setWorkflowExecutionTimeout`.
Set the Workflow Run Timeout with the `WorkflowStub` instance in the Client code using `WorkflowOptions.Builder.setWorkflowRunTimeout`.
Set the Workflow Task Timeout with the `WorkflowStub` instance in the Client code using `WorkflowOptions.Builder.setWorkflowTaskTimeout`.
To set a Heartbeat Timeout, use `ActivityOptions.newBuilder.setHeartbeatTimeout`].
Activity Timeouts
Use `ActivityOptions` to configure how to invoke an Activity Execution.
Used to set all Child Workflow Execution specific options
Set Child Workflow specific options with the `ChildWorkflowOptions` class.
Create an instance of `Options` from the `go.temporal.io/sdk/client` package and pass it the call to create a new Temporal Client.
Options to control optional connection params
Used to set local activity specific parameters that will be stored inside of a context
Use the `ConnectionOptions` API available in the `go.temporal.io/sdk/client` package to connect a Client with mTLS.
To set the mTLS configuration in Java, provide the certificate and private key in an instance of `WorkflowServiceStub`.
Set `Parent Close Policy` on an instance of `ChildWorkflowOptions` using `ChildWorkflowOptions.newBuilder().setParentClosePolicy`.
Create an instance of `RegisterOptions` from the `go.temporal.io/sdk/activity` package and pass it to the `RegisterActivityWithOptions` call when registering the Activity Type with the Worker.
Create an instance of `RegisterOptions` from the `go.temporal.io/sdk/workflow` package and pass it to the `RegisterWorkflowWithOptions` call when registering the Workflow Type with the Worker
Create an instance of `SessionOptions` and pass it to the `CreateSession()` API call.
Set the Workflow Task Queue with the `WorkflowStub` instance in the Client code using `WorkflowOptions.Builder.setTaskQueue`.
Create an instance of `Options` from the `go.temporal.io/sdk/worker` package, set any of the optional fields, and pass the instance to the `New` call.
Set Workflow Retry Options in the `WorkflowStub` instance using `WorkflowOptions.Builder.setWorkflowRetryOptions`.
Set the Workflow Execution Timeout with the `WorkflowStub` instance in the Client code using `WorkflowOptions.Builder.setWorkflowExecutionTimeout`.
Set `WorkflowClient` specific options with the `WorkflowClientOptions` class.
Set `WorkflowServiceStub` specific options with the `WorkflowServiceStubOptions` class.
The first call to the Child Workflow stub can be synchronous or asynchronous using `Async.function(Functions.Func)` or `Async.procedure(Functions.Proc)`, and must always be to a method annotated with `@WorkflowMethod`.
Use `WorkflowStub` to start a Workflow Execution from within a Client, and `ExternalWorkflowStub` to start a different Workflow Execution from within a Workflow.
Invoke Activities using `Workflow.newActivityStub`(type-safe) or `Workflow.newUntypedActivityStub` (untyped) from within a Workflow.
In advanced cases, you may want to dynamically update these attributes as the Workflow progresses.
A Query is sent from a Temporal Client to a Workflow Execution and is identified by its name.
Define a Query method inside the Workflow interface, annotated with the `@QueryMethod` annotation and call the method from an external process.
Initiate the Signal method with `@SignalMethod` annotation in the Workflow interface and call it either directly from the Client or from within another Workflow.
Add the Temporal Go SDK to your project.
Add the Temporal Java SDK to your project.
Use `ActivityOptions` to configure how to invoke an Activity Execution.
Create a `newWorkflowStub` in the Temporal Client code, call the instance of the Workflow, and set the Workflow options with the `WorkflowOptions.Builder` class.