gmunozfe commented on code in PR #620:
URL:
https://github.com/apache/incubator-kie-kogito-docs/pull/620#discussion_r1553588112
##########
serverlessworkflow/modules/ROOT/pages/getting-started/java-embedded-workflows.adoc:
##########
@@ -78,11 +84,37 @@ Therefore, you can modify the previous example to generate
the same output when
<6> Build the workflow definition
<7> Execute and print as in previous example
-
-== Further reading
+=== Additional fluent examples
You can find additional and commented examples of fluent API usage (including
jq expression evaluation and orchestration of rest services)
link:{kogito_sw_examples_url}/sonataflow-fluent[here]
+== Dependencies explanation
+
+In order to keep the number of required dependencies as smaller as possible,
embedded workflow uses a modular approach. The rationale is to avoid adding to
the dependency set something that you are not going to use. This means the
link:{swf_executor_core_maven_repo_url}[Core] dependency does not include the
stuff to use
link:{spec_doc_url}#using-functions-for-rpc-service-invocations[gRPC] or
https://github.com/serverlessworkflow/specification/blob/0.8.x/specification.md#using-functions-for-restful-service-invocations[OpenAPI]
function types. These modules indirectly include Guava and Swagger libraries,
which you do not need if you are not invoking gRPC or OpenAPI services from
your workflow.
Review Comment:
rephrase and typo
```suggestion
The embedded workflow uses a modular approach to keep the number of required
dependencies as small as possible. The rationale is to avoid adding something
that you are not going to use to the dependency set. This means the
link:{swf_executor_core_maven_repo_url}[Core] dependency does not include the
stuff to use
link:{spec_doc_url}#using-functions-for-rpc-service-invocations[gRPC] (which
will add the Guava libraries to the dependency set) or
https://github.com/serverlessworkflow/specification/blob/0.8.x/specification.md#using-functions-for-restful-service-invocations[OpenAPI]
(which will add Swagger libraries to the dependency set) function types. They
need to be included explicitly.
```typos
```suggestion
The embedded workflow uses a modular approach to keep the number of required
dependencies as small as possible. The rationale is to avoid adding something
that you are not going to use to the dependency set. This means the
link:{swf_executor_core_maven_repo_url}[Core] dependency does not include the
stuff to use
link:{spec_doc_url}#using-functions-for-rpc-service-invocations[gRPC] (which
will add the Guava libraries to the dependency set) or
https://github.com/serverlessworkflow/specification/blob/0.8.x/specification.md#using-functions-for-restful-service-invocations[OpenAPI]
(which will add Swagger libraries to the dependency set) function types. They
need to be included explicitly.
```
##########
serverlessworkflow/modules/ROOT/pages/core/custom-functions-support.adoc:
##########
@@ -535,6 +535,7 @@ kogito.sw.functions.greet.timeout=5000 <1>
----
<1> Time in milliseconds
+[[con-func-rest]]
== Rest custom function
Review Comment:
```suggestion
== REST custom function
```
##########
serverlessworkflow/modules/ROOT/pages/getting-started/java-embedded-workflows.adoc:
##########
@@ -78,11 +84,37 @@ Therefore, you can modify the previous example to generate
the same output when
<6> Build the workflow definition
<7> Execute and print as in previous example
-
-== Further reading
+=== Additional fluent examples
You can find additional and commented examples of fluent API usage (including
jq expression evaluation and orchestration of rest services)
link:{kogito_sw_examples_url}/sonataflow-fluent[here]
+== Dependencies explanation
+
+In order to keep the number of required dependencies as smaller as possible,
embedded workflow uses a modular approach. The rationale is to avoid adding to
the dependency set something that you are not going to use. This means the
link:{swf_executor_core_maven_repo_url}[Core] dependency does not include the
stuff to use
link:{spec_doc_url}#using-functions-for-rpc-service-invocations[gRPC] or
https://github.com/serverlessworkflow/specification/blob/0.8.x/specification.md#using-functions-for-restful-service-invocations[OpenAPI]
function types. These modules indirectly include Guava and Swagger libraries,
which you do not need if you are not invoking gRPC or OpenAPI services from
your workflow.
+
+This is list of additional dependencies you might need to add depending on the
functionality you are using:
+
+* link:{swf_executor_rest_maven_repo_url}[Rest]: Add if you use
xref:core/custom-functions-support#con-func-rest[custom Rest] function type.
Review Comment:
```suggestion
* link:{swf_executor_rest_maven_repo_url}[REST]: Add if you use
xref:core/custom-functions-support#con-func-rest[custom Rest] function type.
```
##########
serverlessworkflow/modules/ROOT/pages/getting-started/java-embedded-workflows.adoc:
##########
@@ -54,7 +60,7 @@ Workflow execution result is {"greeting":"Hello
World","mantra":"Serverless Work
[[embedded-fluent-quick-start]]
== Hello world (using fluent API)
-Using the same Maven setup as in the previous section, you can
programmatically generate that workflow definition rather than loading it from
a file definition by using the
link:{kogito_runtimes_url}/kogito-serverless-workflow/kogito-serverless-workflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/fluent[fluent
API]
+Adding link:{swf_fluent_maven_repo_url} dependency to the Maven setup in the
previous section, you can programmatically generate that workflow definition
rather than loading it from a file definition by using the
link:{kogito_runtimes_url}/kogito-serverless-workflow/kogito-serverless-workflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/fluent[fluent
API]
Review Comment:
Missing link text:
```suggestion
Adding link:{swf_fluent_maven_repo_url}[kogito-serverless-workflow-fluent]
dependency to the Maven setup in the previous section, you can programmatically
generate that workflow definition rather than loading it from a file definition
by using the
link:{kogito_runtimes_url}/kogito-serverless-workflow/kogito-serverless-workflow-fluent/src/main/java/org/kie/kogito/serverless/workflow/fluent[fluent
API]
```
##########
serverlessworkflow/modules/ROOT/pages/getting-started/java-embedded-workflows.adoc:
##########
@@ -78,11 +84,37 @@ Therefore, you can modify the previous example to generate
the same output when
<6> Build the workflow definition
<7> Execute and print as in previous example
-
-== Further reading
+=== Additional fluent examples
You can find additional and commented examples of fluent API usage (including
jq expression evaluation and orchestration of rest services)
link:{kogito_sw_examples_url}/sonataflow-fluent[here]
+== Dependencies explanation
+
+In order to keep the number of required dependencies as smaller as possible,
embedded workflow uses a modular approach. The rationale is to avoid adding to
the dependency set something that you are not going to use. For example,
OpenAPI module is based on Swagger parser, if you are not going to call any
OpenAPI service, it is better to avoid adding Swagger to the dependency set.
This means the link:{swf_executor_core_maven_repo_url}[Core] dependency does
not include the stuff to use gRPC, OpenAPI or most custom function types.
+
+This is list of additional dependencies you might need to add depending on the
functionality you are using:
+
+* link:{swf_executor_rest_maven_repo_url}[Rest]: Add if you use
xref:core/custom-functions-support#con-func-rest[custom Rest] function type.
+* link:{swf_executor_service_maven_repo_url}[Service]: Add if your use
xref:core/custom-functions-support#con-func-java[custom Service] function type.
+* link:{swf_executor_openapi_maven_repo_url}[OpenAPI]: Add if you use
link:{spec_doc_url}#using-functions-for-restful-service-invocations[OpenAPI]
function type. See
link:{kogito_runtimes_swf_test_url}/OpenAPIWorkflowApplicationTest.java[example].
+* link:{swf_executor_grpc_maven_repo_url}[gRPC]: Add if you use
link:{spec_doc_url}#using-functions-for-rpc-service-invocations[gRPC] function
type. See
link:{kogito_runtimes_swf_test_url}/RPCWorkflowApplicationTest.java[example].
+* link:{swf_executor_python_maven_repo_url}[Python]: Add if you use
xref:core/custom-functions-support#con-func-python[custom Python] function
type. See
link:{kogito_runtimes_swf_url}/kogito-serverless-workflow-executor-python/src/test/java/org/kie/kogito/serverless/workflow/executor/PythonFluentWorkflowApplicationTest.java[example].
+* link:{swf_executor_events_maven_repo_url}[Events]: Add if you use Event or
Callback state in your workflow. Only Kafka events are supported right now. See
link:{kogito_runtimes_swf_url}/kogito-serverless-workflow-executor-kafka/src/test/java/org/kie/kogito/serverless/workflow/executor/WorkflowEventPublisherTest.java[Publisher]
and
link:{kogito_runtimes_swf_url}/kogito-serverless-workflow-executor-kafka/src/test/java/org/kie/kogito/serverless/workflow/executor/WorkflowEventSusbcriberTest.java[Subscriber]
examples.
+
+== Persistence support
+
+To enable persistence, you need to include the desired {product_name}
persistence add-on as dependency and setup `StaticWorkflowApplication` to use
the `ProcessInstances` implementation provided by the add-on.
+
+Since, within an embedded environment, you usually do not want to contact an
external database, the recommendation is to use link:{rocksdb_url}[rocksdb]
embedded database. You do that by adding the
link:{rocksdb_addon_maven_repo_url}[rocksdb add-on] dependency and adding the
following code snippet when you create your `StaticWorkflowApplication` object
+
+[source,java]
+----
+ StaticWorkflowApplication.create().processInstancesFactory(new
RocksDBProcessInstancesFactory(new Options().setCreateIfMissing(true),
tempDir.toString()))
+----
+
+See
link:{kogito_runtimes_swf_test_url}/PersistentApplicationTest.java[persistence
example]
Review Comment:
Missing article and dot:
```suggestion
See the
link:{kogito_runtimes_swf_test_url}/PersistentApplicationTest.java[persistence
example].
```
##########
serverlessworkflow/modules/ROOT/pages/getting-started/java-embedded-workflows.adoc:
##########
@@ -78,11 +84,37 @@ Therefore, you can modify the previous example to generate
the same output when
<6> Build the workflow definition
<7> Execute and print as in previous example
-
-== Further reading
+=== Additional fluent examples
You can find additional and commented examples of fluent API usage (including
jq expression evaluation and orchestration of rest services)
link:{kogito_sw_examples_url}/sonataflow-fluent[here]
+== Dependencies explanation
+
+In order to keep the number of required dependencies as smaller as possible,
embedded workflow uses a modular approach. The rationale is to avoid adding to
the dependency set something that you are not going to use. For example,
OpenAPI module is based on Swagger parser, if you are not going to call any
OpenAPI service, it is better to avoid adding Swagger to the dependency set.
This means the link:{swf_executor_core_maven_repo_url}[Core] dependency does
not include the stuff to use gRPC, OpenAPI or most custom function types.
Review Comment:
rephrase and typo
```suggestion
The embedded workflow uses a modular approach to keep the number of required
dependencies as small as possible. The rationale is to avoid adding something
that you are not going to use to the dependency set. This means the
link:{swf_executor_core_maven_repo_url}[Core] dependency does not include the
stuff to use
link:{spec_doc_url}#using-functions-for-rpc-service-invocations[gRPC] (which
will add the Guava libraries to the dependency set) or
https://github.com/serverlessworkflow/specification/blob/0.8.x/specification.md#using-functions-for-restful-service-invocations[OpenAPI]
(which will add Swagger libraries to the dependency set) function types. They
need to be included explicitly.
```typos
```suggestion
The embedded workflow uses a modular approach to keep the number of required
dependencies as small as possible. The rationale is to avoid adding something
that you are not going to use to the dependency set. This means the
link:{swf_executor_core_maven_repo_url}[Core] dependency does not include the
stuff to use
link:{spec_doc_url}#using-functions-for-rpc-service-invocations[gRPC] (which
will add the Guava libraries to the dependency set) or
https://github.com/serverlessworkflow/specification/blob/0.8.x/specification.md#using-functions-for-restful-service-invocations[OpenAPI]
(which will add Swagger libraries to the dependency set) function types. They
need to be included explicitly.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]