-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
229 changed files
with
103,706 additions
and
91 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,16 @@ name: Development branches | |
on: | ||
push: | ||
branches: | ||
- '*' # matches every branch that doesn't contain a '/' | ||
- '*/*' # matches every branch containing a single '/' | ||
- '**' # matches every branch | ||
- '!master' | ||
pull_request: | ||
branches: | ||
- '*' # matches every branch that doesn't contain a '/' | ||
- '*/*' # matches every branch containing a single '/' | ||
- '**' # matches every branch | ||
- '!master' | ||
|
||
jobs: | ||
build: | ||
|
@@ -13,14 +21,14 @@ jobs: | |
steps: | ||
# Checkout the code | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Expose branch name | ||
run: echo ${{ github.ref }} | ||
|
||
# Setup JDK and Maven | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: 'zulu' | ||
|
@@ -34,12 +42,8 @@ jobs: | |
- name: Build with Maven | ||
run: ./mvnw clean verify -U -B -ntp -T4 | ||
|
||
# itest | ||
- name: Run itest | ||
run: ./mvnw integration-test failsafe:verify -Pitest -ntp -U -B -T4 | ||
|
||
# - name: Upload coverage to Codecov | ||
# if: github.event_name == 'push' && github.actor != 'dependabot[bot]' | ||
# uses: codecov/[email protected] | ||
# with: | ||
# token: ${{secrets.CODECOV_TOKEN}} | ||
- name: Upload coverage to Codecov | ||
if: github.event_name == 'push' && github.actor != 'dependabot[bot]' | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{secrets.CODECOV_TOKEN}} |
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,62 @@ | ||
name: Build the docs | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
cache: pip | ||
|
||
- name: Upgrade pip | ||
run: | | ||
# install pip=>20.1 to use "pip cache dir" | ||
python3 -m pip install --upgrade pip | ||
- name: Install dependencies | ||
run: python3 -m pip install -r ./docs/requirements.txt | ||
|
||
- name: Set git username and email | ||
run: | | ||
# | ||
git config --global user.email "${GH_USERNAME}@users.noreply.github.com" | ||
git config --global user.name "${GH_USERNAME}" | ||
env: | ||
GH_USERNAME: ${{ github.actor }} | ||
|
||
- name: Pre-fetch the gh-pages branch | ||
run: git fetch --depth=1 | ||
|
||
- name: Build docs with MkDocs | ||
run: mkdocs build | ||
|
||
- name: Read the tag name | ||
id: get_tag_name | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: echo ::set-output name=TAG_NAME::${GITHUB_REF/refs\/tags\//} | ||
|
||
# This is for a tagged version | ||
- name: Create a new version of documentation and push to GH pages. | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: mike deploy ${{ steps.get_tag_name.outputs.TAG_NAME }} stable --push --update-aliases | ||
|
||
- name: Make stable to default. | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: mike set-default stable --push | ||
|
||
# This is for develop | ||
- name: Deploy latest develop snapshot docs to GH pages. | ||
if: github.ref == 'refs/heads/develop' | ||
run: mike deploy snapshot --push --update-aliases |
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
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
71 changes: 71 additions & 0 deletions
71
api/src/main/kotlin/dev/bpmcrafters/processengineapi/CommonRestrictions.kt
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,71 @@ | ||
package dev.bpmcrafters.processengineapi | ||
|
||
/** | ||
* Helper to build restrictions for subscriptions or correlations. | ||
* @since 0.0.1 | ||
*/ | ||
object CommonRestrictions { | ||
|
||
/** | ||
* FIXME: consider to remove restriction names to adapters. | ||
*/ | ||
|
||
const val ACTIVITY_ID = "activityId" | ||
const val BUSINESS_KEY = "businessKey" | ||
const val CORRELATION_KEY = "correlationKey" | ||
const val PROCESS_DEFINITION_KEY = "processDefinitionKey" | ||
const val PROCESS_INSTANCE_ID = "processInstanceId" | ||
const val PROCESS_DEFINITION_ID = "processDefinitionId" | ||
const val PROCESS_DEFINITION_VERSION_TAG = "processDefinitionVersionTag" | ||
const val TASK_DEFINITION_KEY = "taskDefinitionKey" | ||
const val TENANT_ID = "tenantId" | ||
const val WITHOUT_TENANT_ID = "withoutTenantId" | ||
const val MESSAGE_ID = "messageId" | ||
const val MESSAGE_TTL = "messageTTL" | ||
const val EXECUTION_ID = "executionId" | ||
|
||
/** | ||
* Creates a helper restrictions builder. | ||
*/ | ||
@JvmStatic | ||
fun builder(): RestrictionsBuilder = RestrictionsBuilder() | ||
|
||
class RestrictionsBuilder internal constructor() { | ||
|
||
private val restrictions = mutableMapOf<String, String>() | ||
|
||
fun withProcessDefinitionKey(processDefinitionKey: String) = this.apply { | ||
restrictions[PROCESS_DEFINITION_KEY] = processDefinitionKey | ||
} | ||
|
||
fun withTaskDefinitionKey(taskDefinitionKey: String) = this.apply { | ||
restrictions[TASK_DEFINITION_KEY] = taskDefinitionKey | ||
} | ||
|
||
fun withTenantId(tenantId: String) = this.apply { | ||
restrictions[TENANT_ID] = tenantId | ||
} | ||
|
||
fun withInstanceId(instanceId: String) = this.apply { | ||
restrictions[PROCESS_INSTANCE_ID] = instanceId | ||
} | ||
|
||
fun withActivityId(activityId: String) = this.apply { | ||
restrictions[ACTIVITY_ID] = activityId | ||
} | ||
|
||
fun withBusinessKey(businessKey: String) = this.apply { | ||
restrictions[BUSINESS_KEY] = businessKey | ||
} | ||
|
||
fun withCorrelationKey(correlationKey: String) = this.apply { | ||
restrictions[CORRELATION_KEY] = correlationKey | ||
} | ||
|
||
fun withRestriction(restriction: String, value: String) = this.apply { | ||
restrictions[restriction] = value | ||
} | ||
|
||
fun build(): Map<String, String> = restrictions.toMap() | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
api/src/main/kotlin/dev/bpmcrafters/processengineapi/Empty.kt
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,11 @@ | ||
package dev.bpmcrafters.processengineapi | ||
|
||
/** | ||
* Special empty marker, to be able to deliver the Void / Unit, independent of Java / Kotlin. | ||
*/ | ||
object Empty { | ||
/** | ||
* Comply with hashcode contract in Java. | ||
*/ | ||
override fun hashCode(): Int = 1983210398 | ||
} |
4 changes: 4 additions & 0 deletions
4
api/src/main/kotlin/dev/bpmcrafters/processengineapi/MetaInfo.kt
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
package dev.bpmcrafters.processengineapi | ||
|
||
/** | ||
* Meta info to express capability of an API. | ||
* @since 0.0.1 | ||
*/ | ||
interface MetaInfo |
9 changes: 9 additions & 0 deletions
9
api/src/main/kotlin/dev/bpmcrafters/processengineapi/MetaInfoAware.kt
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 |
---|---|---|
@@ -1,5 +1,14 @@ | ||
package dev.bpmcrafters.processengineapi | ||
|
||
/** | ||
* APIs capable to describe a meta-aware instance. | ||
* @since 0.0.1 | ||
*/ | ||
interface MetaInfoAware { | ||
/** | ||
* Provides meta information based on passed instance. | ||
* @param instance to provide info for. | ||
* @return meta info. | ||
*/ | ||
fun meta(instance: MetaInfoAware): MetaInfo | ||
} |
10 changes: 7 additions & 3 deletions
10
api/src/main/kotlin/dev/bpmcrafters/processengineapi/PayloadSupplier.kt
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 |
---|---|---|
@@ -1,5 +1,9 @@ | ||
package dev.bpmcrafters.processengineapi | ||
|
||
interface PayloadSupplier { | ||
fun payload(): () -> Map<String, Any> | ||
} | ||
import java.util.function.Supplier | ||
|
||
/** | ||
* Supplier for the payload. | ||
* @since 0.0.1 | ||
*/ | ||
fun interface PayloadSupplier : Supplier<Map<String, Any>> |
Oops, something went wrong.