Package io.dapr.workflows.runtime

# Class WorkflowRuntimeBuilder

java.lang.Object
io.dapr.workflows.runtime.WorkflowRuntimeBuilder

public class WorkflowRuntimeBuilder extends Object

## Constructor Summary

Constructors
Constructor
Description
`WorkflowRuntimeBuilder()`
Constructs the WorkflowRuntimeBuilder.
`WorkflowRuntimeBuilder(io.dapr.config.Properties properties)`
Constructs the WorkflowRuntimeBuilder.
`WorkflowRuntimeBuilder(org.slf4j.Logger logger)`

## Method Summary

Modifier and Type
Method
Description
`WorkflowRuntime`
`build()`
Returns a WorkflowRuntime object.
`<T extends WorkflowActivity>
WorkflowRuntimeBuilder`
`registerActivity(Class<T> clazz)`
Registers an Activity object.
`<T extends WorkflowActivity>
WorkflowRuntimeBuilder`
`registerActivity(T instance)`
Registers an Activity object.
`<T extends Workflow>
WorkflowRuntimeBuilder`
`registerWorkflow(Class<T> clazz)`
Registers a Workflow object.
`<T extends Workflow>
WorkflowRuntimeBuilder`
`registerWorkflow(T instance)`
Registers a Workflow object.
`WorkflowRuntimeBuilder`
`withExecutorService(ExecutorService executorService)`
Register Executor Service to use with workflow.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### WorkflowRuntimeBuilder

public WorkflowRuntimeBuilder()
Constructs the WorkflowRuntimeBuilder.

### WorkflowRuntimeBuilder

public WorkflowRuntimeBuilder(io.dapr.config.Properties properties)
Constructs the WorkflowRuntimeBuilder.

Parameters:
  `properties` - Properties to use.

### WorkflowRuntimeBuilder

public WorkflowRuntimeBuilder(org.slf4j.Logger logger)

## Method Details

### build

public WorkflowRuntime build()
Returns a WorkflowRuntime object.

Returns:
  A WorkflowRuntime object.

### withExecutorService

public WorkflowRuntimeBuilder withExecutorService(ExecutorService executorService)
Register Executor Service to use with workflow.

Parameters:
  `executorService` - to be used.
Returns:
  `WorkflowRuntimeBuilder`.

### registerWorkflow

public <T extends Workflow> WorkflowRuntimeBuilder registerWorkflow(Class<T> clazz)
Registers a Workflow object.

Type Parameters:
  `T` - any Workflow type
Parameters:
  `clazz` - the class being registered
Returns:
  the WorkflowRuntimeBuilder

### registerWorkflow

public <T extends Workflow> WorkflowRuntimeBuilder registerWorkflow(T instance)
Registers a Workflow object.

Type Parameters:
  `T` - any Workflow type
Parameters:
  `instance` - the workflow instance being registered
Returns:
  the WorkflowRuntimeBuilder

### registerActivity

public <T extends WorkflowActivity> WorkflowRuntimeBuilder registerActivity(Class<T> clazz)
Registers an Activity object.

Type Parameters:
  `T` - any WorkflowActivity type
Parameters:
  `clazz` - the class being registered
Returns:
  the WorkflowRuntimeBuilder

### registerActivity

public <T extends WorkflowActivity> WorkflowRuntimeBuilder registerActivity(T instance)
Registers an Activity object.

Type Parameters:
  `T` - any WorkflowActivity type
Parameters:
  `instance` - the class instance being registered
Returns:
  the WorkflowRuntimeBuilder