# Workflow (dapr-sdk-parent 1.12.2 API)
declaration: package: io.dapr.workflows, class: Workflow

Package io.dapr.workflows

# Class Workflow

java.lang.Object
io.dapr.workflows.Workflow

public abstract class Workflow extends Object
Common interface for workflow implementations.

## Constructor Summary

Constructors
Constructor
Description
`Workflow()`

## Method Summary

Modifier and Type
Method
Description
`abstract WorkflowStub`
`create()`
Executes the workflow logic.
`SagaOption`
`getSagaOption()`
get saga configuration.
`boolean`
`isSagaEnabled()`
`void`
`run(WorkflowContext ctx)`
Executes the workflow logic.

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

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

## Constructor Details

### Workflow

public Workflow()

## Method Details

### create

public abstract WorkflowStub create()
Executes the workflow logic.

Returns:
  A WorkflowStub.

### run

public void run(WorkflowContext ctx)
Executes the workflow logic.

Parameters:
  `ctx` - provides access to methods for scheduling durable tasks and getting information about the current workflow instance.

### isSagaEnabled

public boolean isSagaEnabled()

### getSagaOption

public SagaOption getSagaOption()
get saga configuration.

Returns:
  saga configuration