-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend the single file import to multiple files (DMN) on KIE Sandbox #2418
Comments
That's indeed an interesting use case... Extending the Let me know what you think. In any case, I think having a mechanism for more complex samples (i.e. multi-file samples) is a must have. |
@tiagobento In my case I work with a local folder of I've prepared script which is starting docker-compose with mapping project to
and then starting this project and opening link in the browser: start_project() {
local project_home=${1:-$(pwd)}
local dmn=$2
local kie_port
kie_port=$(get_kie_sandbox_port "$ENV_PATH")
if [[ -z $kie_port ]]; then
echo "Error: Could not find KIE_SANDBOX_DISTRIBUTION__kieSandboxExposedPort in $ENV_PATH"
exit 1
fi
# Start Docker Compose with the project home mapped to the container
PROJECT_HOME="$project_home" docker-compose -f "$DOCKER_COMPOSE_PATH" --env-file "$ENV_PATH" up -d
# Wait for the container to start
wait_for_container kie_sandbox
# Wait for the port to be exposed
wait_for_port "$kie_port"
# Generate the HTTP link
local link="http://localhost:$kie_port/#/import?url=http://localhost:$kie_port/samples/$dmn"
echo "Opening $link in the default browser..."
sleep 2
# Open the link in the default browser
if command -v xdg-open > /dev/null; then
xdg-open "$link"
elif command -v open > /dev/null; then
open "$link"
else
echo "Please open $link in your browser."
fi
} It is really useful when you work with many small projects, so you can switch between projects. My focus here is not on opening samples in browser, but rather how to optimize my daily work by improving environment for many small projects - with ability to switch between many small projects, usually 3-10 dmn files (up to 150 in extreme cases, but for it I would rather use VSCode extension). So I'm asking about a practical tool for local development when switching between contexts. I don't want to use a dedicated github repo with proxy, because 1) I have multiple small projects in the single monorepo. 2) I need a tool for local debugging and testing - it's usually 1-2 weeks of development and debugging without publishing. I think the main issue with Kie toolbox - it's not designed for TDD and code-first development, but rather for UI editing. For complex logic with many variations, I need to maintain a large set of test cases which I want to run regular, plus ability to quickly spin-up project, check how it works with some corner cases. |
@jomarko thank you, I'm aware about this option. I've requested another option to load the current dmn context to the I'm using also some additional scripting to call Unfortunately Kogito was not designed with focus on many small projects to support easy integration and switching context between them, but for me it's a best way to use DMN in the real world use-cases. |
Thank you @dmitry-buykin for clarification of your use case. To me it sounds, until the feature you require is implemented, the VS Code extension is the most suitable for you. It will have soon also the validation mechanism available - #2165 |
Thanks @jomarko , what is ETA for this new feature in VSCode plugin? As I could see, it's not yet merged into main. |
Really can not say any specific ETA. Just can say these days the review comments are being addressed. So my guess is rather weeks than months, but it is only a guess. |
@dmitry-buykin You're right that doing proper TDD on KIE Sandbox right now is not a great experience, as we lack support for .scesim files (unit tests for DMN models). KIE Sandbox was also not designed to connect with your local file system, but rather to integrate well with Git repositories. In fact, KIE Sandbox was created with the "small repo" approach in mind, although it would absolutely still work for a fairly large monorepo. I'm really interested in your use-case @dmitry-buykin, as there might be more people going through what you are right now. If I may, would you mind answering these questions?
Thanks a lot in advance! |
Sure @tiagobento , here are our points.
P.S. |
I'm using sandbox image to illustrate a specific file, by attaching my local folder to the sandbox container:
http://localhost:9090/#/import?url=http://localhost:9090/samples/dmns/primary.dmn
Unfortunately, I cannot import multiple files, which can be great for complex use cases.
I don't want to use github to host these examples, because I need it for a local development environment.
Is it possible to extend
/#/import
endpoint to support upload of multiple pre-defined files (or all files in the directory URL).The text was updated successfully, but these errors were encountered: