# Get Step State

You have 2 options to get step state:

* CurrentStep
* CompletedSteps

```swift
BiometridStandard.getInstance().getStepState(processId: processId, state: StepState, callback: self)

Example:
//Current step
BiometridStandard.getInstance().getStepState(processId: processId, state: .CurrentStep, callback: self)

//Completed steps
BiometridStandard.getInstance().getStepState(processId: processId, state: .CompletedSteps, callback: self)
```

| Parameter                     | Description    |
| ----------------------------- | -------------- |
| processId: **String**         | Process id     |
| state: **StepState**          | StepState enum |
| callback: **ProcessCallback** | callback       |

## Implementation example

```swift
import UIKit
import BiometridStandardSDK

class ViewController: UIViewController, ProcessCallback {

    let processId = "nodkthhdhdhdd"
    
    override func viewDidLoad() {
        super.viewDidLoad()
    }
    
    @IBAction func getStepStateBtn(_ sender: Any) {
        BiometridStandard.getInstance().getStepState(processId: processId, state: .CompletedSteps, callback: self)
    }

    func getStepStateCallback(status: Bool, response: String?, error: Errors?) {
        print("status get step state", status)
        if error != nil {
            print(error?.rawValue)
            return
        }
        print("response getStepState", response)
    }
}

```

## Callback params

| Parameter             | Description                   |
| --------------------- | ----------------------------- |
| status: **Bool**      | Method request status         |
| response: **String?** | All the response from the api |
| error: **Errors?**    | Errors associated enum        |
