-
Notifications
You must be signed in to change notification settings - Fork 573
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5392: Dump feel-scala from 1.11.2 to 1.12.2 r=saig0 a=saig0 ## Description * dump `feel-scala` from `1.11.2` to `1.12.2` * implement the FEEL clock API using the ActorClock * update docs about FEEL expressions ## Related issues closes #5140 closes #4212 ## Definition of Done _Not all items need to be done depending on the issue and the pull request._ Code changes: * [x] The changes are backwards compatibility with previous versions * [ ] If it fixes a bug then PRs are created to [backport](https://github.com/zeebe-io/zeebe/compare/stable/0.24...develop?expand=1&template=backport_template.md&title=[Backport%200.24]) the fix to the last two minor versions Testing: * [x] There are unit/integration tests that verify all acceptance criterias of the issue * [ ] New tests are written to ensure backwards compatibility with further versions * [x] The behavior is tested manually * [ ] The impact of the changes is verified by a benchmark Documentation: * [x] The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.) * [x] New content is added to the [release announcement](https://drive.google.com/drive/u/0/folders/1DTIeswnEEq-NggJ25rm2BsDjcCQpDape) Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
- Loading branch information
Showing
6 changed files
with
157 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
expression-language/src/main/java/io/zeebe/el/impl/ZeebeFeelEngineClock.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH under | ||
* one or more contributor license agreements. See the NOTICE file distributed | ||
* with this work for additional information regarding copyright ownership. | ||
* Licensed under the Zeebe Community License 1.0. You may not use this file | ||
* except in compliance with the Zeebe Community License 1.0. | ||
*/ | ||
package io.zeebe.el.impl; | ||
|
||
import io.zeebe.util.sched.clock.ActorClock; | ||
import java.time.Instant; | ||
import java.time.ZoneId; | ||
import java.time.ZonedDateTime; | ||
import org.camunda.feel.FeelEngineClock; | ||
|
||
public final class ZeebeFeelEngineClock implements FeelEngineClock { | ||
|
||
private final ActorClock clock; | ||
|
||
public ZeebeFeelEngineClock(final ActorClock clock) { | ||
this.clock = clock; | ||
} | ||
|
||
@Override | ||
public ZonedDateTime getCurrentTime() { | ||
|
||
final long currentMillis = clock.getTimeMillis(); | ||
final var instant = Instant.ofEpochMilli(currentMillis); | ||
final var zone = ZoneId.systemDefault(); | ||
|
||
return instant.atZone(zone); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters