Skip to content
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

Parent Child Process - Child process not in data index #1672

Open
debu999 opened this issue Mar 14, 2023 · 3 comments
Open

Parent Child Process - Child process not in data index #1672

debu999 opened this issue Mar 14, 2023 · 3 comments

Comments

@debu999
Copy link

debu999 commented Mar 14, 2023

Describe the bug

Referred in Jira KOGITO-8852
Hi Team,
I am trying to use reuseable subprocess. So SampleParent calls SampleChild.
Only sample variables of Boolean type a and b added for testing.
When the same is triggered no SampleChild is persisted in SampleChild_domain collection.
Need to know what am I doing wrong in this.
Or if this is a bug to fix in data index.
PARENT PROCESS SAMPLE
Screenshot 2023-03-14 at 8 02 48 AM
CHILD PROCESS SAMPLE
Screenshot 2023-03-14 at 8 03 12 AM
Logs

Starting workflow 'sampleParent' (83c96e1e-46aa-4003-8da5-9d2e10b62054)

2023-03-14 08:06:41,560 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'a' value: 'true'
2023-03-14 08:06:41,560 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'b' value: 'true'
2023-03-14 08:06:41,560 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Triggered node 'Start' for process 'sampleParent' (83c96e1e-46aa-4003-8da5-9d2e10b62054)
2023-03-14 08:06:41,560 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Triggered node 'Sub-process' for process 'sampleParent' (83c96e1e-46aa-4003-8da5-9d2e10b62054)
2023-03-14 08:06:41,625 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Starting workflow 'sampleChild' (82c565dc-2201-4ed3-8596-e3e37bd9546e)
2023-03-14 08:06:41,625 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'a' value: 'true'
2023-03-14 08:06:41,625 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'b' value: 'true'
2023-03-14 08:06:41,626 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Triggered node 'Start' for process 'sampleChild' (82c565dc-2201-4ed3-8596-e3e37bd9546e)
2023-03-14 08:06:41,626 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Triggered node 'End' for process 'sampleChild' (82c565dc-2201-4ed3-8596-e3e37bd9546e)
2023-03-14 08:06:41,626 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Workflow 'sampleChild' (82c565dc-2201-4ed3-8596-e3e37bd9546e) completed
2023-03-14 08:06:41,659 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'a' changed value from: 'true', to: 'true'
2023-03-14 08:06:41,659 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'b' changed value from: 'true', to: 'true'
2023-03-14 08:06:41,659 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'a' changed value from: 'true', to: 'true'
2023-03-14 08:06:41,659 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Variable 'b' changed value from: 'true', to: 'true'
2023-03-14 08:06:41,659 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Triggered node 'End' for process 'sampleParent' (83c96e1e-46aa-4003-8da5-9d2e10b62054)
2023-03-14 08:06:41,663 INFO  [org.kie.kog.qua.pro.dev.DevModeWorkflowLogger] (executor-thread-0) Workflow 'sampleParent' (83c96e1e-46aa-4003-8da5-9d2e10b62054) completed 

I can clearly see the same in runtime engine that both Child and Parent process completed.
in processinstances collection both processes are captured.
Screenshot 2023-03-14 at 8 11 04 AM

Expected behavior

both sampleParent and sampleChild to be in dataindex if its spin off from the withing sampleParent then parentprocessinstanceid to be populated with the value.

Actual behavior

child is not persisted in domain.

How to Reproduce?

No response

Output of uname -a or ver

Darwin Mac-mini.local 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:04:44 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T8103 arm64

Output of java -version

openjdk version "19.0.1" 2022-10-18 OpenJDK Runtime Environment GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08) OpenJDK 64-Bit Server VM GraalVM CE 22.3.0 (build 19.0.1+10-jvmci-22.3-b08, mixed mode, sharing)

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)

1.35.0.Final

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: /opt/apache-maven-3.8.6 Java version: 19.0.1, vendor: GraalVM Community, runtime: /Library/Java/JavaVirtualMachines/graalvm-ce-java19-22.3.0/Contents/Home Default locale: en_IN, platform encoding: UTF-8 OS name: "mac os x", version: "13.1", arch: "aarch64", family: "mac"

Additional information

No response

@debu999
Copy link
Author

debu999 commented Mar 14, 2023

@nmirasch @cristianonicolai
Following is the logs from dataindex

2023-03-14 08:17:48,873 DEBUG [org.kie.kog.ind.ser.mes.ReactiveMessagingEventConsumer] (vert.x-eventloop-thread-7) Process instance consumer received ProcessInstanceDataEvent: 
AbstractDataEvent{specVersion=1.0, id='f41e67b5-214d-45d5-bd55-6a5fa2e29045', source=http://localhost:8080//sampleParent, type='ProcessInstanceEvent', time=2023-03-14T02:47:48.737327Z, subject='null', dataContentType='application/json', dataSchema=null, data=ProcessInstanceEventBody{id='a7f70302-304e-40d0-8b9d-b958350fb33d', version='1.0', parentInstanceId='null', rootInstanceId='null', processId='sampleParent', processType='null', rootProcessId='null', processName='sampleParent', startDate=Tue Mar 14 08:17:48 IST 2023, endDate=Tue Mar 14 08:17:48 IST 2023, state=2, businessKey='d5', nodeInstances=[NodeInstance [id=b34f92f1-5bbb-4c09-a5aa-b6b378b24299, nodeId=3, nodeName=Start, nodeType=StartNode, triggerTime=Tue Mar 14 08:17:48 IST 2023, leaveTime=Tue Mar 14 08:17:48 IST 2023], NodeInstance [id=b54aaba5-6a94-45b9-b20a-05d06b6e5c0d, nodeId=2, nodeName=Sub-process, nodeType=SubProcessNode, triggerTime=Tue Mar 14 08:17:48 IST 2023, leaveTime=Tue Mar 14 08:17:48 IST 2023], NodeInstance [id=e874ca6b-d9df-4716-84ca-f8811fe9222b, nodeId=1, nodeName=End, nodeType=EndNode, triggerTime=Tue Mar 14 08:17:48 IST 2023, leaveTime=Tue Mar 14 08:17:48 IST 2023]], variables={a=false, b=true}, error=null, roles=null, milestones=[]}, kogitoProcessInstanceId='a7f70302-304e-40d0-8b9d-b958350fb33d', kogitoRootProcessInstanceId='null', kogitoProcessId='sampleParent', kogitoRootProcessId='null', kogitoAddons='mongodb-persistence,process-management,source-files,task-management,jobs-management,cloudevents,task-notification,jobs-messaging
,process-svg,mail', extensionAttributes={kogitoprocinstanceid=a7f70302-304e-40d0-8b9d-b958350fb33d, kogitoprocist=2, kogitoprocversion=1.0, kogitoprocid=sampleParent, kogitoaddons=mongodb-persistence,process-management,source-files,task-management,jobs-management,cloudevents,task-notification,jobs-messaging
,process-svg,mail}}
----------------------------------------------------------------------------------
2023-03-14 08:17:48,998 DEBUG [org.kie.kog.ind.ser.mes.DomainEventConsumer] (vert.x-eventloop-thread-7) Processing domain event: AbstractDataEvent{specVersion=1.0, id='f41e67b5-214d-45d5-bd55-6a5fa2e29045', source=http://localhost:8080//sampleParent, type='ProcessInstanceEvent', time=2023-03-14T02:47:48.737327Z, subject='null', dataContentType='application/json', dataSchema=null, data=ProcessInstanceEventBody{id='a7f70302-304e-40d0-8b9d-b958350fb33d', version='1.0', parentInstanceId='null', rootInstanceId='null', processId='sampleParent', processType='null', rootProcessId='null', processName='sampleParent', startDate=Tue Mar 14 08:17:48 IST 2023, endDate=Tue Mar 14 08:17:48 IST 2023, state=2, businessKey='d5', nodeInstances=[NodeInstance [id=b34f92f1-5bbb-4c09-a5aa-b6b378b24299, nodeId=3, nodeName=Start, nodeType=StartNode, triggerTime=Tue Mar 14 08:17:48 IST 2023, leaveTime=Tue Mar 14 08:17:48 IST 2023], NodeInstance [id=b54aaba5-6a94-45b9-b20a-05d06b6e5c0d, nodeId=2, nodeName=Sub-process, nodeType=SubProcessNode, triggerTime=Tue Mar 14 08:17:48 IST 2023, leaveTime=Tue Mar 14 08:17:48 IST 2023], NodeInstance [id=e874ca6b-d9df-4716-84ca-f8811fe9222b, nodeId=1, nodeName=End, nodeType=EndNode, triggerTime=Tue Mar 14 08:17:48 IST 2023, leaveTime=Tue Mar 14 08:17:48 IST 2023]], variables={a=false, b=true}, error=null, roles=null, milestones=[]}, kogitoProcessInstanceId='a7f70302-304e-40d0-8b9d-b958350fb33d', kogitoRootProcessInstanceId='null', kogitoProcessId='sampleParent', kogitoRootProcessId='null', kogitoAddons='mongodb-persistence,process-management,source-files,task-management,jobs-management,cloudevents,task-notification,jobs-messaging
,process-svg,mail', extensionAttributes={kogitoprocinstanceid=a7f70302-304e-40d0-8b9d-b958350fb33d, kogitoprocist=2, kogitoprocversion=1.0, kogitoprocid=sampleParent, kogitoaddons=mongodb-persistence,process-management,source-files,task-management,jobs-management,cloudevents,task-notification,jobs-messaging
,process-svg,mail}}
----------------------------------------------------------------------------------
2023-03-14 08:17:49,130 DEBUG [org.kie.kog.ind.ser.mes.ReactiveMessagingEventConsumer] (vert.x-eventloop-thread-7) Process instance consumer received ProcessInstanceDataEvent: 
AbstractDataEvent{specVersion=1.0, id='1da09219-39b0-4021-91e1-07b95a922bac', source=http://localhost:8080//sampleChild, type='ProcessInstanceEvent', time=2023-03-14T02:47:48.737661Z, subject='null', dataContentType='application/json', dataSchema=null, data=ProcessInstanceEventBody{id='f0055951-0511-406b-b9eb-e88da3a93d31', version='1.0', parentInstanceId='a7f70302-304e-40d0-8b9d-b958350fb33d', rootInstanceId='a7f70302-304e-40d0-8b9d-b958350fb33d', processId='sampleChild', processType='null', rootProcessId='sampleParent', processName='sampleChild', startDate=Tue Mar 14 08:17:48 IST 2023, endDate=Tue Mar 14 08:17:48 IST 2023, state=2, businessKey='null', nodeInstances=[NodeInstance [id=0e146418-5158-461b-a845-314327b0e3b0, nodeId=1, nodeName=End, nodeType=EndNode, triggerTime=Tue Mar 14 08:17:48 IST 2023, leaveTime=Tue Mar 14 08:17:48 IST 2023], NodeInstance [id=c42d5674-9573-4053-9e18-de2b4cdb6697, nodeId=2, nodeName=Start, nodeType=StartNode, triggerTime=Tue Mar 14 08:17:48 IST 2023, leaveTime=Tue Mar 14 08:17:48 IST 2023]], variables={a=false, b=true}, error=null, roles=null, milestones=[]}, kogitoProcessInstanceId='f0055951-0511-406b-b9eb-e88da3a93d31', kogitoRootProcessInstanceId='a7f70302-304e-40d0-8b9d-b958350fb33d', kogitoProcessId='sampleChild', kogitoRootProcessId='sampleParent', kogitoAddons='mongodb-persistence,process-management,source-files,task-management,jobs-management,cloudevents,task-notification,jobs-messaging
,process-svg,mail', extensionAttributes={kogitorootprocid=sampleParent, kogitoparentprociid=a7f70302-304e-40d0-8b9d-b958350fb33d, kogitoprocinstanceid=f0055951-0511-406b-b9eb-e88da3a93d31, kogitoprocist=2, kogitoprocversion=1.0, kogitorootprociid=a7f70302-304e-40d0-8b9d-b958350fb33d, kogitoprocid=sampleChild, kogitoaddons=mongodb-persistence,process-management,source-files,task-management,jobs-management,cloudevents,task-notification,jobs-messaging
,process-svg,mail}}
----------------------------------------------------------------------------------
2023-03-14 08:17:49,225 DEBUG [org.kie.kog.ind.ser.mes.DomainEventConsumer] (vert.x-eventloop-thread-7) Processing domain event: AbstractDataEvent{specVersion=1.0, id='1da09219-39b0-4021-91e1-07b95a922bac', source=http://localhost:8080//sampleChild, type='ProcessInstanceEvent', time=2023-03-14T02:47:48.737661Z, subject='null', dataContentType='application/json', dataSchema=null, data=ProcessInstanceEventBody{id='f0055951-0511-406b-b9eb-e88da3a93d31', version='1.0', parentInstanceId='a7f70302-304e-40d0-8b9d-b958350fb33d', rootInstanceId='a7f70302-304e-40d0-8b9d-b958350fb33d', processId='sampleChild', processType='null', rootProcessId='sampleParent', processName='sampleChild', startDate=Tue Mar 14 08:17:48 IST 2023, endDate=Tue Mar 14 08:17:48 IST 2023, state=2, businessKey='null', nodeInstances=[NodeInstance [id=0e146418-5158-461b-a845-314327b0e3b0, nodeId=1, nodeName=End, nodeType=EndNode, triggerTime=Tue Mar 14 08:17:48 IST 2023, leaveTime=Tue Mar 14 08:17:48 IST 2023], NodeInstance [id=c42d5674-9573-4053-9e18-de2b4cdb6697, nodeId=2, nodeName=Start, nodeType=StartNode, triggerTime=Tue Mar 14 08:17:48 IST 2023, leaveTime=Tue Mar 14 08:17:48 IST 2023]], variables={a=false, b=true}, error=null, roles=null, milestones=[]}, kogitoProcessInstanceId='f0055951-0511-406b-b9eb-e88da3a93d31', kogitoRootProcessInstanceId='a7f70302-304e-40d0-8b9d-b958350fb33d', kogitoProcessId='sampleChild', kogitoRootProcessId='sampleParent', kogitoAddons='mongodb-persistence,process-management,source-files,task-management,jobs-management,cloudevents,task-notification,jobs-messaging
,process-svg,mail', extensionAttributes={kogitorootprocid=sampleParent, kogitoparentprociid=a7f70302-304e-40d0-8b9d-b958350fb33d, kogitoprocinstanceid=f0055951-0511-406b-b9eb-e88da3a93d31, kogitoprocist=2, kogitoprocversion=1.0, kogitorootprociid=a7f70302-304e-40d0-8b9d-b958350fb33d, kogitoprocid=sampleChild, kogitoaddons=mongodb-persistence,process-management,source-files,task-management,jobs-management,cloudevents,task-notification,jobs-messaging
,process-svg,mail}}

@debu999
Copy link
Author

debu999 commented Mar 22, 2023

Thanks @cristianonicolai on the details on how to get parent/child relation on parent domain. Can we have a enhancement so the child process shows up in its domain which is currently not being done.

@debu999
Copy link
Author

debu999 commented Oct 8, 2023

@cristianonicolai @nmirasch can this be picked up anytime soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant