Skip to content

Commit 9b6259b

Browse files
committed
migration guide
1 parent cbb30c0 commit 9b6259b

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

docs/documentation/v4-3-migration.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
title: Migrating from v4.2 to v4.3
3+
description: Migrating from v4.2 to v4.3
4+
layout: docs
5+
permalink: /docs/v4-3-migration
6+
---
7+
8+
# Migrating from v4.2 to v4.3
9+
10+
## Condition API Change
11+
12+
In Workflows the target of the condition was the managed resource itself, not a dependent resource. This changed, from
13+
not the API contains the dependent resource.
14+
15+
New API:
16+
17+
```java
18+
public interface Condition<R, P extends HasMetadata> {
19+
20+
boolean isMet(DependentResource<R, P> dependentResource, P primary, Context<P> context);
21+
22+
}
23+
```
24+
25+
Former API:
26+
27+
```java
28+
public interface Condition<R, P extends HasMetadata> {
29+
30+
boolean isMet(P primary, R secondary, Context<P> context);
31+
32+
}
33+
```
34+
35+
Migration is trivial. Since the secondary resource can be accessed from the dependent resource. So to access the secondary
36+
resource just use `dependentResource.getSecondaryResource(primary,context)`.

0 commit comments

Comments
 (0)