Giter VIP home page Giter VIP logo

incubator-kie-kogito-docs's Introduction

Kogito Guides

The published guides can be found here.

Prerequisite

Running Antora with Lunr extension (required to generate self-hosted search) requires Node.js v16.0.0 or above.

Installing Dependencies

This folder contains package.json files that you can use to install dependencies. Run the following command.

$ npm install

Building the website locally

This folder contains an antora playbook, antora-playbook-author.yml to generate the documentation under the build folder.

To install and build the Antora site locally use: npm run local-install-build

To build Antora site when you have already installed npm dependencies, use: npm run local-build

How it works

This module builds a documentation website using Antora.

To simplify the maintenance, the documentation website is based on a pre-built default Antora UI bundle located in ui-bundle/ui-bundle.zip. Customizations are located in supplemental-ui that Antora uses to replace parts of the default ui-bundle.zip.

How to upgrade

Upgrade UI bundle

Download the latest ui-bundle.zip from Antora GitLab job and replace the existing one in the ui-bundle directory.

Be aware that the bundle is not versioned and in the future might not be compatible with the customizations this website uses.

Contributing

Before opening a PR, please read the contributing doc.

incubator-kie-kogito-docs's People

Contributors

ajayjagan avatar akumar074 avatar cristianonicolai avatar davidesalerno avatar dependabot[bot] avatar domhanak avatar ederign avatar fjtirado avatar gabriel-farache avatar hbelmiro avatar hmanwani-rh avatar jesuino avatar jstastny-cz avatar kaldesai avatar kie-ci avatar kie-ci3 avatar ljmotta avatar marianmacik avatar nmirasch avatar paulovmr avatar radtriste avatar rgolangh avatar ricardozanini avatar spolti avatar tchughesiv avatar tiagodolphine avatar tomasdavidorg avatar vaniharipriya avatar wmedvede avatar zdrapela avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

incubator-kie-kogito-docs's Issues

Holistic review of Sonataflow non-quarkus-guides

Summary
Holistically review every single guide. Test that it works and that the UX is smooth.
Take into consideration, the whole picture of Sonataflow.
This task will be split per chapter.

Goal
Review each chapter of our guides, look for everything that is unclear, find discrepancies.
Ensure the use case in the guide is possible to achieve, if there is no example for the use
case, validate it and create the example.

Tasks

  • Setup -> #588
  • Getting Started -> #583
  • Core Concepts -> #589
  • Tooling -> #590
  • Service Orchestration -> #591
  • Event Orchestration -> #592
  • Security -> #593
  • Executing, Testing and Troubleshooting -> #594
  • Persistence -> #595
  • Cloud -> #596
  • Job Service -> #597
  • Data Index -> #598

Prepare the serverless documentation for next release

Goal

  • Groom the documentation around serverless to be ready for next release.
  • Remove old stuff
  • Reorg Quarkus guides to separate section under /use-cases/advanced-developer-use-cases
  • Introduce couple of new guides that were spit from original ones

Document timeout format limitation

When I try to set a timeout to 2month: P2M I get an error:

[ERROR]         [error]: Build step org.kie.kogito.quarkus.common.deployment.KogitoAssetsProcessor#generateSources threw an exception: org.kie.kogito.codegen.process.ProcessCodegenException: Processes with errors are Invalid process: '/home/kogito/serverless-workflow-project/src/main/resources/m2k.sw.yml'. Found error: java.lang.IllegalArgumentException: An invalid "eventTimeout": "P2M" configuration was provided for the state "WaitForSaveTransformationCompletionEvent" in the serverless workflow: "Move2Kube workflow".When configured, it must be set with a greater than zero ISO 8601 time duration. For example PT30S. Or a valid expression, for example $CONST.myDuration, where 'myDuration' is defined in the constant section of the workflow

but according to https://en.wikipedia.org/wiki/ISO_8601#Durations it should be fine

To resolve ambiguity, "P1M" is a one-month duration and "PT1M" is a one-minute duration (note the time designator, T, that precedes the time value).

According to @wmedvede

a P1M (on month) in the context of the workflows can't be translated into how much time to wait.
When we say 1 month, are we talking about January -> 31 days, February -> 29/28 days, etc.

So this needs to be documented

Revisit use-cases & advanced-developer-use-cases chapters ambiguity

The use-cases & advanced-developer-use-cases is a bit counter intuitive as we do not have any other use cases there.
Intention was to have also advanced use case without java and for Administrator persona there in the future.

Goal
Revisit the section to make the chapters more intuitive.

issue running kogito examples in kubernetes/minikube - connection refused internal

when running kogito examples such as serverless-workflow-custom-function-knative or serverless-workflow-loanbroker-showcase with minikube/kubernetes, I can call the service from my local host to kickoff the workflow, but the internal service to service calls fail with connection refused.

I assume since kourier load balancer external-ip is 127.0.0.1, thats where its picking that ip. Not sure what I need to do to fix this issue. The workflow json function is referencing "operation": "knative:custom-function-knative-service",

Example,

Caused by: java.util.concurrent.CompletionException: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: custom-function-knative-service.default.127.0.0.1.sslip.io/127.0.0.1:80 at io.smallrye.mutiny.operators.uni.UniBlockingAwait.await(UniBlockingAwait.java:79) at io.smallrye.mutiny.groups.UniAwait.atMost(UniAwait.java:65) at org.kie.kogito.addons.quarkus.knative.serving.customfunctions.PlainJsonKnativeServiceRequestClient.sendRequest(PlainJsonKnativeServiceRequestClient.java:86) at org.kie.kogito.addons.quarkus.knative.serving.customfunctions.KnativeServiceRequestClient.execute(KnativeServiceRequestClient.java:56) at org.kie.kogito.addons.quarkus.knative.serving.customfunctions.PlainJsonKnativeServiceRequestClient_ClientProxy.execute(Unknown Source) at org.kie.kogito.addons.quarkus.knative.serving.customfunctions.KnativeServerlessWorkflowCustomFunction.execute(KnativeServerlessWorkflowCustomFunction.java:58) at org.kie.kogito.addons.quarkus.knative.serving.customfunctions.KnativeServerlessWorkflowCustomFunction_ClientProxy.execute(Unknown Source) at org.kie.kogito.addons.quarkus.knative.serving.customfunctions.KnativeWorkItemHandler.internalExecute(KnativeWorkItemHandler.java:42) at org.kie.kogito.serverless.workflow.WorkflowWorkItemHandler.executeWorkItem(WorkflowWorkItemHandler.java:40) at org.kie.kogito.addons.quarkus.knative.serving.customfunctions.KnativeWorkItemHandler_ClientProxy.executeWorkItem(Unknown Source) at org.jbpm.process.instance.LightWorkItemManager.internalExecuteWorkItem(LightWorkItemManager.java:79) at org.jbpm.workflow.instance.node.WorkItemNodeInstance.lambda$internalTrigger$0(WorkItemNodeInstance.java:161) at org.jbpm.workflow.instance.node.WorkItemNodeInstance.processWorkItemHandler(WorkItemNodeInstance.java:174) ... 90 more

Keep only Postgres references to the docs

We have to remove references from Infinispan, MongoDB, and Oracle (everything that's not Postgres) from our documentation since we are not distributing these images anymore.

Broken links in `Deploying a New Workflow` section

In Deploying a New Workflow section, there are two broken links:

Deploying the greeting Workflow example

kubectl apply -f https://raw.githubusercontent.com/kiegroup/kogito-serverless-operator/main/test/testdata/sw.kogito_v1alpha08_sonataflow_devmode.yaml -n <your_namespace>

The link should be replaced with https://github.com/kiegroup/kogito-serverless-operator/blob/main/test/testdata/sonataflow.org_v1alpha08_sonataflow_devmode.yaml

At the end of the same section, there is a similar issue with

For example using VSCode, there are the commands needed:

curl -S https://raw.githubusercontent.com/kiegroup/kogito-serverless-operator/main/config/samples/sw.kogito_v1alpha08_sonataflow_devmode.yaml > workflow_devmode.yaml
code workflow_devmode.yaml
kubectl apply -f workflow_devmode.yaml -n <your_namespace>

In this case, there is no sonataflow.org_v1alpha08_sonataflow_devmode.yaml in /config/samples folder. Since the guide require sonataflow.org/profile: dev the only applicable config seems to be sonataflow.org_v1alpha08_sonataflow_devmodeWithConfigMapAndExternalResource.yaml
Is it correct?

I'd be happy to open a PR to fix this, but I need a bit of guidance here :)

Confusing placeholder for version when uninstalling the swf operator

In https://sonataflow.org/serverlessworkflow/latest/cloud/operator/install-serverless-operator.html#_uninstall_3, the command to uninstall the operator is:

kubectl delete -f https://raw.githubusercontent.com/kiegroup/kogito-serverless-operator/<version>.x/operator.yaml

When version should be replaced by the version get by

$ kubectl get deployment sonataflow-operator-controller-manager -n sonataflow-operator-system -o jsonpath="{.spec.template.spec.containers[?(@.name=='manager')].image}"
quay.io/kiegroup/kogito-serverless-operator:1.43

So based on what is written in the doc:

The operator manager image reflects the current operator’s version. Replace the major and minor version names in the command below. For example, if the image version is 1.41.0 use 1.41

The command should be

kubectl delete -f https://raw.githubusercontent.com/kiegroup/kogito-serverless-operator/1.43/operator.yaml

But that is not working as we got a 404, the correct command seems to be:

kubectl delete -f https://raw.githubusercontent.com/kiegroup/kogito-serverless-operator/v1.43.0/operator.yaml

So, using the same URL as the one when installing the operator:

kubectl create -f https://raw.githubusercontent.com/kiegroup/kogito-serverless-operator/v1.43.0/operator.yaml

So either the placeholder should be kubectl delete -f https://raw.githubusercontent.com/kiegroup/kogito-serverless-operator/v<version>/operator.yaml without any changes on the minor version.
Or, the aforementioned URL should be made available

"RevisionMissing" when following instructions from "Serverless Workflow plug-in for Knative CLI"

When running kn service list after following the instructions from Serverless Workflow plug-in for Knative CLI "RevisionMissing : Configuration "my-project" does not have any ready Revision." is shown.

Steps to reproduce:

kn workflow create
cd new-project
kn workflow build --image my-project
kn workflow deploy
kn service list

Output:

NAME                              URL                                                                    LATEST   AGE     CONDITIONS   READY   REASON
my-project                        http://my-project.default.10.99.29.228.sslip.io                                 3m42s   0 OK / 3     False   RevisionMissing : Configuration "my-project" does not have any ready Revision.

This issue blocks https://issues.redhat.com/browse/KOGITO-7694.

EPIC - Introduce same non-quarkus guides for SonataFlow as we have with quarkus

Summary
As we are shifting towards more java-less guides we need to introduce such examples
where no Quarkus and Java is exposed to the user.

Goal

  • Introduce getting-started-with-events guide for core/handling-events-on-workflows.adoc
  • Introduce getting-started-with-callbacks guide for core/working-with-callbacks.adoc
  • Update reference to a guides without quarkus for core/understanding-jq-expressions.adoc
  • Introduce getting-started-with-inputs for core/defining-an-input-schema-for-workflows.adoc
  • Introduce getting-started-with-outputs for core/defining-an-input-schema-for-workflows.adoc
  • Review any other guide and ensure we reference non-quarkus examples in non-quarkus section

Implement KIND cluster as a prerequisite instead of Minikube

Summary
Currently our serverless docs are referencing Minikube. In community we already switched to test on Kind.
It would be nice to unify this and use something we test on daily in guides

Goal
Exchange Minikube with Kind in documentation of serverless

OpenShift Serverless Logic Hello World sample fails with "return value of com.github.dockerjava.api.model.PullResponseItem.getStatus() is null"

I am trying the Hello World Sample for OpenShift Serverless Logic under https://openshift-knative.github.io/docs/docs/latest/serverless-logic/getting-started/create-your-first-workflow-service.html

The build step is fine but when running quarkus dev I run into the following issue relating to an image pull:

quarkus dev
[INFO] Scanning for projects...
[INFO]
[INFO] --------------< org.acme:serverless-workflow-hello-world >--------------
[INFO] Building serverless-workflow-hello-world 1.0.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- quarkus-maven-plugin:2.16.7.Final:dev (default-cli) @ serverless-workflow-hello-world ---
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:resources @ serverless-workflow-hello-world
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO] Invoking io.quarkus.platform:quarkus-maven-plugin:2.16.7.Final:generate-code @ serverless-workflow-hello-world
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile @ serverless-workflow-hello-world
[INFO] Nothing to compile - all classes are up to date
[INFO] Invoking org.apache.maven.plugins:maven-resources-plugin:2.6:testResources @ serverless-workflow-hello-world
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/fch/dev/serverless-workflow-hello-world/src/test/resources
[INFO] Invoking io.quarkus.platform:quarkus-maven-plugin:2.16.7.Final:generate-code-tests @ serverless-workflow-hello-world
[INFO] Invoking org.apache.maven.plugins:maven-compiler-plugin:3.10.1:testCompile @ serverless-workflow-hello-world
[INFO] Nothing to compile - all classes are up to date
Listening for transport dt_socket at address: 5005
2023-06-13 13:28:06,190 INFO  [org.kie.kog.cod.api.uti.AddonsConfigDiscovery] (build-44) Performed addonsConfig discovery, found: AddonsConfig{usePersistence=false, useTracing=false, useMonitoring=false, usePrometheusMonitoring=false, useCloudEvents=true, useExplainability=false, useProcessSVG=false, useEventDrivenDecisions=false, useEventDrivenRules=false}
2023-06-13 13:28:06,632 INFO  [org.kie.kog.cod.cor.uti.ApplicationGeneratorDiscovery] (build-39) Generator discovery performed, found [processes]
2023-06-13 13:28:07,029 INFO  [doc.1.0]] (build-49) Creating container for image: testcontainers/sshd:1.1.0
2023-06-13 13:28:07,034 INFO  [org.tes.uti.RegistryAuthLocator] (build-49) Failure when attempting to lookup auth config. Please ignore if you don't have images in an authenticated registry. Details: (dockerImageName: testcontainers/sshd:1.1.0, configFile: /Users/fch/.docker/config.json. Falling back to docker-java default behaviour. Exception message: /Users/fch/.docker/config.json (No such file or directory)
2023-06-13 13:28:07,051 INFO  [doc.3.4]] (build-49) Creating container for image: testcontainers/ryuk:0.3.4
2023-06-13 13:28:07,172 INFO  [doc.3.4]] (build-49) Container testcontainers/ryuk:0.3.4 is starting: bc7292d6f2866551cc311bcc7ecc9fb401785b76cbb0cc9862c1ad397685b130
2023-06-13 13:28:07,909 INFO  [doc.3.4]] (build-49) Container testcontainers/ryuk:0.3.4 started in PT0.865798S
2023-06-13 13:28:07,948 INFO  [doc.1.0]] (build-49) Container testcontainers/sshd:1.1.0 is starting: 95d59ae804b4ccc8a10fe285f0f82a2078890d1e83ee62c95cd251b01e3c6885
2023-06-13 13:28:08,340 INFO  [doc.1.0]] (build-49) Container testcontainers/sshd:1.1.0 started in PT1.454878S
2023-06-13 13:28:08,523 INFO  [doc.red.io/.28]] (docker-java-stream--1713804985) Starting to pull image
2023-06-13 13:28:08,791 ERROR [com.git.doc.api.asy.ResultCallbackTemplate] (docker-java-stream--1713804985) Error during callback: java.lang.NullPointerException: Cannot invoke "String.matches(String)" because the return value of "com.github.dockerjava.api.model.PullResponseItem.getStatus()" is null
	at com.github.dockerjava.api.command.PullImageResultCallback.checkForDockerSwarmResponse(PullImageResultCallback.java:48)
	at com.github.dockerjava.api.command.PullImageResultCallback.onNext(PullImageResultCallback.java:35)
	at org.testcontainers.images.LoggedPullImageResultCallback.onNext(LoggedPullImageResultCallback.java:48)
	at org.testcontainers.images.TimeLimitedLoggedPullImageResultCallback.onNext(TimeLimitedLoggedPullImageResultCallback.java:73)
	at org.testcontainers.images.TimeLimitedLoggedPullImageResultCallback.onNext(TimeLimitedLoggedPullImageResultCallback.java:24)
	at org.testcontainers.shaded.com.github.dockerjava.core.exec.AbstrAsyncDockerCmdExec$1.onNext(AbstrAsyncDockerCmdExec.java:41)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder$JsonSink.accept(DefaultInvocationBuilder.java:315)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder$JsonSink.accept(DefaultInvocationBuilder.java:298)
	at org.testcontainers.shaded.com.github.dockerjava.core.DefaultInvocationBuilder.lambda$executeAndStream$1(DefaultInvocationBuilder.java:275)
	at java.base/java.lang.Thread.run(Thread.java:833)

Note that the images testcontainers/ryuk:0.3.4 and testcontainers/sshd:1.1.0 were pulled and the containers successfully started.

I have macOS with podman 4.5.1. and a rootful VM. I have also set ryuk.container.privileged=true following these instructions.

Document and give example of JSON in data

Document and give example of how a JSON string shall be formatted in data field when using data in context and jq expression

transition:
      nextState: WaitForSaveTransformationCompletionEvent
      produceEvents:
        - eventRef: saveTransformationEvent
          data: '{"gitRepo":".repositoryURL", "branch": ".targetBranch", "token": ".token", "workspaceId": ".workspaceId", "projectId": ".projectId", "transformId": ".transformId ", "workflowCallerId": "$WORKFLOW.instanceId"}'

was not working as the data was not parsed as expected when publishing event:

ProcessInstanceDataEvent {specVersion=1.0, id='338d205f-c266-42c5-9187-bd988dd1f756', source=/process/m2k, type='save-transformation', time=2024-01-30T08:48:05.895695548Z, subject='null', dataContentType='null', dataSchema=null, data={"gitRepo":".repositoryURL","branch":".targetBranch","token":".token","workspaceId":".workspaceId","projectId":".projectId","transformId":".transformId ","workflowCallerId":"$WORKFLOW.instanceId"}, kogitoProcessInstanceId='6311bf4e-c490-4473-8e22-bba027730530', kogitoRootProcessInstanceId='null', kogitoProcessId='m2k', kogitoRootProcessId='null', kogitoAddons='null', kogitoIdentity='null', extensionAttributes={kogitoproctype=SW, kogitoprocinstanceid=6311bf4e-c490-4473-8e22-bba027730530, kogitoprocist=Active, kogitoprocversion=1.0, kogitoprocid=m2k}}

Instead the data string shall be:

data: "{gitRepo:.repositoryURL|sub(\"http(s)?://\";\"ssh://\"), branch: .targetBranch, token: .token, workspaceId: .workspaceId, projectId: .projectId, transformId: .transformId, workflowCallerId: $WORKFLOW.instanceId}"

When published:

ProcessInstanceDataEvent {specVersion=1.0, id='293b7596-1253-4c98-ac12-4e9825f01bce', source=/process/m2k, type='save-transformation', time=2024-01-30T13:24:14.595998574Z, subject='null', dataContentType='null', dataSchema=null, data={"gitRepo":"ssh://bitbucket.org/gfarache31/m2k-test","branch":"aaaaaaasssss","token":null,"workspaceId":"b93980cb-3943-4223-9441-8694c098eeb9","projectId":"9b305fe3-d441-48ce-b01b-d314e86e14ec","transformId":"723dce89-c25c-4c7b-9ef3-842de92e6fe6","workflowCallerId":"7ddb5193-bedc-4942-a857-596b31f377ed"}, kogitoProcessInstanceId='7ddb5193-bedc-4942-a857-596b31f377ed', kogitoRootProcessInstanceId='null', kogitoProcessId='m2k', kogitoRootProcessId='null', kogitoAddons='null', kogitoIdentity='null', extensionAttributes={kogitoproctype=SW, kogitoprocinstanceid=7ddb5193-bedc-4942-a857-596b31f377ed, kogitoprocist=Active, kogitoprocversion=1.0, kogitoprocid=m2k}}

Unify the environment configuration for SonataFlow guides

Currently the prerequisites mention different technologies and it is a mess overall.

Goal
Review prerequisites for non-quarkus guides.
Review prerequisites for quarkus guides.
Unify the environment configuration for non-quarkus guides
Unify the environment configuration for quarkus guides

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.