Skip to content

Commit

Permalink
Add docs for kotlin usage #394
Browse files Browse the repository at this point in the history
  • Loading branch information
p-wunderlich committed Feb 16, 2024
1 parent d71245e commit 175d417
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ public class ApproveOrderTaskControllerTest {
}
```

### Kotlin

If you use kotlin, there is an own collection of factory methods by simple using `CamundaBpmDataKotlin` instead of `CamundaBpmDataKotlin`.
For usage examples, see here: [Examples Kotlin](https://www.holunda.io/camunda-bpm-data/snapshot/user-guide/examples-kotlin.html)

### Further documentation

For further details, please consult our [Quick Start](https://www.holunda.io/camunda-bpm-data/snapshot/quick-start)
Expand Down
17 changes: 17 additions & 0 deletions docs/user-guide/examples-kotlin.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ object Variables {
}
```

### Define nonNull variable

**IMPORTANT:** Since 1.5.0 all predefined variable types are nullable per default, therefore variables must be explicitly set to `nonNull`.
For more information, see here: [Github Issue](https://github.com/holunda-io/camunda-bpm-data/issues/394)

``` kotlin

import io.holunda.data.CamundaBpmDataKotlin

object Variables {
val ORDER_ID: VariableFactory<String> = stringVariable("orderId").nonNull
val CUSTOMER_ID: VariableFactory<String?> = stringVariable("orderId")
}
```

##

## Read variable from Java delegate

``` kotlin
Expand Down

0 comments on commit 175d417

Please sign in to comment.