You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "andleosab (via GitHub)" <gi...@apache.org> on 2023/11/16 17:48:32 UTC

[I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

andleosab opened a new issue, #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286

   ### 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:
   
   1. have a process with subprocess
   2. start the process with businesskey included
   3. query the subprocess to check the result
   
   { ProcessInstances 
     (where: {parentProcessInstanceId: {equal: "c8b3e3e3-7f6d-47ce-847d-a3fcee26793d"}} ) 
     {
     id,
     businessKey,
     parentProcessInstanceId,
     processId,
     processName,
     state
     } 
   }
   
   
   
   ### Output of `uname -a` or `ver`
   
   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` or `gradlew --version`)
   
   _No response_
   
   ### Additional information
   
   _No response_


-- 
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: commits-unsubscribe@kie.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "ricardozanini (via GitHub)" <gi...@apache.org>.
ricardozanini commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2018852405

   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 `businessKey` issue you're currently working on?


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "gurrierim (via GitHub)" <gi...@apache.org>.
gurrierim commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2342052387

   @elguardian for me it's a little ambiguous on how to do this:
   For instance you can set a variable in the subprocess called orderId and set the variable.
   You create a correlation key containing the expresion #{order} (taking for granted that order is a process variable)
   Now for the message you create a correlation key as well to compute the same order.
   
   Could you give me an example with bpmn file ? 


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "aapthorp (via GitHub)" <gi...@apache.org>.
aapthorp commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2801899435

   Likewise. I can only get throwing and catching of intermediate events to work by using a businesskey, without resorting to some programmatic solution. This then falls down if you happen to have a called sub process.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "dekaido (via GitHub)" <gi...@apache.org>.
dekaido commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2012536716

   Any action on this issue?


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "elguardian (via GitHub)" <gi...@apache.org>.
elguardian commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2227846575

   @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 create a correlation key containing the expresion #{order} (taking for granted that order is a process variable)
   Now for the message you create a correlation key as well to compute the same order.
   
   You don't need anymore the  business key.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "nerodall (via GitHub)" <gi...@apache.org>.
nerodall commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2782213369

   I have the same question. Everywhere it says that you can use the correlation mechanism, but nowhere is it described how and no one answers this question.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "andleosab (via GitHub)" <gi...@apache.org>.
andleosab commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2245675430

   @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. 
   Also, if I can get the main process by it business key and then use its process id to get all of its sub-processes, then why not allow to do the same using just a business key and thus saving on additional logic/component(i.e gateway)/etc?
   That should allow external apps to control the process flow w/o getting into kogito runtime internals. 
   


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2030405430

   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.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2029597641

   @elguardian Wdyt? Should the business key of the parent propagated to the subprocess?


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "elguardian (via GitHub)" <gi...@apache.org>.
elguardian commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2249554352

   @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.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2029646682

   @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 subprocessed. 
   So, the question here is, besides providing an easier mapping between all the subprocesses opened by the process associated with that business key, what do you need the business key in the subprocess for?
   @krisv I think this might also interest you. 


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "dekaido (via GitHub)" <gi...@apache.org>.
dekaido commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2030278188

   @fjtirado okay... so the "HTTP request" with the "same reference ID" was a lie? 😞 
   
    > You could also delete the process instance by sending an HTTP delete request with the same reference ID:
   
   


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "elguardian (via GitHub)" <gi...@apache.org>.
elguardian commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2033706824

   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.
   @fjtirado ^^


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "elguardian (via GitHub)" <gi...@apache.org>.
elguardian commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2033707805

   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.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2030264755

   @dekaido 
   But thats a completely different issue ;)
   I mean, GET and DELETE using business key is not supported by runtimes API (that expects the process instance id). You can use business key in your data index queries and as header of cloud event to resume a paused workflow. 
   I do not think business key being null for a subprocess is necesarily wrong. 
   


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2030284530

   @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?


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "fjtirado (via GitHub)" <gi...@apache.org>.
fjtirado commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2034098920

   @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. 
   CorrelationKeyFactory is still there in the kie api (what was basically imported as it was when the initial fork was done), but also as part of this fork it seems the implementation was removed (I guess following the rational that there is not use case for embedded subprocess business key) 


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org


Re: [I] The kogitobusinesskey process attribute is not propagated to subprocess [incubator-kie-kogito-runtimes]

Posted by "dekaido (via GitHub)" <gi...@apache.org>.
dekaido commented on issue #3286:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/issues/3286#issuecomment-2030244307

   @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](https://developers.redhat.com/blog/2020/03/20/kogito-0-8-0-features-online-editors-and-cloud-native-business-automation).
   
   >  If you wanted to start an order process correlated to the business key ORDER-0001, for instance, you would issue a request like this one:
   > 
   > POST /orders?businessKey=ORDER-0001
   > You would then be able to retrieve the new process instance with the new reference ID:
   > 
   > GET /orders/ORD-0001
   > You could also delete the process instance by sending an HTTP delete request with the same reference ID:
   > 
   > DELETE /orders/ORD-0001
   
   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.


-- 
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: commits-unsubscribe@kie.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org