-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved the bpmn files. Updated the UI. Added a new GH based workflow.
- Loading branch information
1 parent
7f9d05c
commit d430088
Showing
50 changed files
with
5,754 additions
and
154 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
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 |
---|---|---|
|
@@ -25,6 +25,9 @@ | |
import org.slf4j.Logger; | ||
|
||
import io.apicurio.common.apps.content.IoUtil; | ||
import io.apicurio.lifecycle.rest.clients.workflows.LifecycleWorkflowsClient; | ||
import io.apicurio.lifecycle.rest.clients.workflows.models.Event; | ||
import io.apicurio.lifecycle.rest.clients.workflows.models.EventContext; | ||
import io.apicurio.lifecycle.rest.v0.ApisResource; | ||
import io.apicurio.lifecycle.rest.v0.beans.Api; | ||
import io.apicurio.lifecycle.rest.v0.beans.ApiSearchResults; | ||
|
@@ -45,15 +48,12 @@ | |
import io.apicurio.lifecycle.storage.dtos.UpdateVersionContentDto; | ||
import io.apicurio.lifecycle.storage.dtos.VersionContentDto; | ||
import io.apicurio.lifecycle.storage.dtos.VersionSearchResultsDto; | ||
import io.apicurio.lifecycle.workflows.rest.client.LifecycleWorkflowsClient; | ||
import io.apicurio.lifecycle.workflows.rest.client.models.Event; | ||
import io.apicurio.lifecycle.workflows.rest.client.models.EventContext; | ||
import jakarta.enterprise.context.ApplicationScoped; | ||
import jakarta.inject.Inject; | ||
import jakarta.servlet.http.HttpServletRequest; | ||
import jakarta.validation.constraints.NotNull; | ||
import jakarta.ws.rs.core.Response; | ||
import jakarta.ws.rs.core.Context; | ||
import jakarta.servlet.http.HttpServletRequest; | ||
import jakarta.ws.rs.core.Response; | ||
|
||
/** | ||
* @author [email protected] | ||
|
@@ -145,11 +145,15 @@ public void createVersion(String apiId, @NotNull NewVersion data) { | |
storage.createVersion(apiId, ToDto.newVersion(data)); | ||
|
||
// Fire event (trigger workflow) | ||
String workflow = "default"; | ||
if (data.getWorkflow() != null && data.getWorkflow().trim().length() > 0) { | ||
workflow = data.getWorkflow(); | ||
} | ||
Event event = new Event(); | ||
event.setType("version:create"); | ||
event.setId(UUID.randomUUID().toString()); | ||
event.setContext(new EventContext()); | ||
event.getContext().setAdditionalData(Map.of("apiId", apiId, "version", data.getVersion())); | ||
event.getContext().setAdditionalData(Map.of("apiId", apiId, "version", data.getVersion(), "workflow", workflow)); | ||
workflowsClient.events().post(event); | ||
} | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,3 +73,6 @@ app.description=${alh.description} | |
app.version=${alh.version} | ||
app.date=${alh.date} | ||
|
||
quarkus.http.test-port=7071 | ||
|
||
|
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 |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
import com.microsoft.kiota.authentication.AnonymousAuthenticationProvider; | ||
import com.microsoft.kiota.http.OkHttpRequestAdapter; | ||
|
||
import io.apicurio.lifecycle.rest.client.LifecycleHubClient; | ||
import io.apicurio.lifecycle.rest.clients.self.LifecycleHubClient; | ||
|
||
/** | ||
* @author [email protected] | ||
|
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
Oops, something went wrong.