-
Notifications
You must be signed in to change notification settings - Fork 213
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
The kogitobusinesskey process attribute is not propagated to subprocess #3286
Comments
Any action on this issue? |
There are a few issues we are working on related to this topic. This issue missed my sight, sorry. @fjtirado can you include this in the |
@elguardian Wdyt? Should the business key of the parent propagated to the subprocess? |
@dekaido From my point of view, businessKey is intended to optionally provide a human readable identifier to a given workflow. Therefore, it can be argued that businesskey attribute does not really belong to the subprocess and the steps to associate a subprocess to a process given a businnes key are the ones that you are following, first get the process id given the business key, then use the parent process id to get the subprocesses. |
@fjtirado I am with you, I was expecting to use the businessKey as a human readable identifier. Maybe the wording is wrong here, or I have another issue. But I can't find anything in the documentation so I expect functionality to work as it's stated in this article.
When I am creating instances with the businessKey set, POST returns success and a new process instance is deployed. But the service does not recognize the businessKey (i.e. ORD-0001) as an identifier for any GET/DELETE/etc request. This is where I am assuming the attribute/field is not being saved to the subprocess/instance. Edit: the documentation only mentions businessKey in the managment console and dev ui. |
@dekaido |
@fjtirado okay... so the "HTTP request" with the "same reference ID" was a lie? 😞
|
@dekaido Not necesarily a lie, this is not supported by runtime API, but might be supported in the gateway API (which migh translate businesskey into process instance id) , which one are you calling? |
In any case, I think GET and DELETE using business key on runtimes should be addressed with a different issue. Lets keep this one focus on businesskey on subprocess. |
business key should be unique among process instances. so propagate the same business keys is a no go from my point of view. In the past we have a way to generate unique keys. I am not sure whay is the use case for sonata flow for business keys but in the case of bpmn2 requires to be unique. |
And option that was in the past was a BusinesskeyFactory to be used and plug anytime a subprocess instances was created (CorrelationKeyFactory) in the past. |
@elguardian I think the scenario is the same both for bpmn and swf, embedded subprocess should have either a unique business key or not business key at all. To be honest, I do not see a use case for embedded subprocess business key, maybe the author of the issue, @andleosab can provide one. |
Hi all, thank you all for looking into this. The use case I have as follows:
Here is an example of the event sent by external process:
An external app may not be aware of kogito internal process IDs (An event could be triggered from UI, etc) Currently I have a work around where I'd use a parent process Id to lookup a subprocess to send the event to the subprocess to resume it. I need to make an extra call or more for it to work. Instead I could use just one call if a parent shares its business key with its subprocesses. |
@andleosab IMO if you are trying to target a process over its ID you are coupling things. You should use common information shared among process instance to communicate among them. You can use correlated messages instead of process intance id. For instance you can set a variable in the subprocess called orderId and set the variable. You don't need anymore the business key. |
@elguardian That's exactly what I am trying to avoid, using any internal IDs. As I mentioned earlier that's just a work around. And I was thinking that the business key could be naturally that common piece of information shared between the process and its subprocesses. I don't see how using correlation key would be any different. |
@andleosab business key is a subrogate primary key. you query use CTE queries to get the entire subprocess stuff based on parent process instanace id. |
@elguardian for me it's a little ambiguous on how to do this: Could you give me an example with bpmn file ? |
Describe the bug
The kogitobusinesskey process attribute does not get propagated to subprocess from the parent process
Expected behavior
the parent process's business key should be set in its subprocess(es)
Actual behavior
the business key is null:
{
"data": {
"ProcessInstances": [
{
"id": "236945bc-6363-4eb5-86c4-9e6c2e7246dd",
"businessKey": null,
"parentProcessInstanceId": "c8b3e3e3-7f6d-47ce-847d-a3fcee26793d",
"processId": "subProcess",
"processName": "subProcess",
"state": "COMPLETED",
How to Reproduce?
to reproduce:
{ ProcessInstances
(where: {parentProcessInstanceId: {equal: "c8b3e3e3-7f6d-47ce-847d-a3fcee26793d"}} )
{
id,
businessKey,
parentProcessInstanceId,
processId,
processName,
state
}
}
Output of
uname -a
orver
kogito runtime 1.27.0.Final
Output of
java -version
11
GraalVM version (if different from Java)
No response
Kogito version or git rev (or at least Quarkus version if you are using Kogito via Quarkus platform BOM)
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: