wmedvede commented on PR #4094:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/4094#issuecomment-3666777555

   @gabriel-farache Regarding the filtering, I think the initial attempt to 
"reduce" the number of generated "Spans" is good, and we shoud try this 
approach by generating a Span for each "logical" WF state.  
   
   I think we should "merge" the intial idea, with a more acurate way to 
"group" the jbpm nodes, with the "real" WF states. Somethinig that IIRC, is 
currently also being done in the Dev UI, to make that view match the WF states, 
and not the jbpm nodes that implement the states.
   
   To make the correspondence between "which jbpm" nodes belongs to the same WF 
state, each jbpm node, has "state" attribute in the metadata. And, that "state" 
attribute can then be used to "group" the jbpm nodes into the WF state.
   
   Below we can see the generated  Process corresponding to the greet WF.
   
   And for the WF state -> ChooseOnLanguage, we can see that the follwoing jbpm 
nodes are really implementing it.
   
   ```
           startNode1.name("Start");
           startNode1.interrupting(false);
           startNode1.metaData("UniqueId", "1");
           startNode1.metaData("EventType", "none");
           startNode1.metaData("state", "ChooseOnLanguage");
           
           splitNode3.name("ChooseOnLanguage");
           splitNode3.type(2);
           splitNode3.metaData("UniqueId", "3");
           splitNode3.metaData("MetricName", "ChooseOnLanguage");
           splitNode3.metaData("Variable", "workflowdata");
           splitNode3.metaData("state", "ChooseOnLanguage");
           splitNode3.metaData("Default", "3_12");
   ```
   
   While the "GreetPerson" state is composed of this jbpm nodes:
   
   ```
           endNode2.name("End");
           endNode2.terminate(true);
           endNode2.metaData("UniqueId", "2");
           endNode2.metaData("state", "GreetPerson");
   
   
           compositeContextNode6.name("GreetPerson");
           compositeContextNode6.metaData("UniqueId", "6");
           compositeContextNode6.metaData("MetricName", "GreetPerson");
           compositeContextNode6.metaData("state", "GreetPerson");
   
           actionNode9.name("greetFunction");
           actionNode9.metaData("UniqueId", "9");
           actionNode9.metaData("action", "greetAction");
           actionNode9.metaData("state", "GreetPerson");
   
   
           joinNode13.name("Join-GreetPerson");
           joinNode13.type(5);
           joinNode13.metaData("UniqueId", "13");
           joinNode13.metaData("state", "GreetPerson");
   ```
           
                  
   
   
   
[GreetProcess.java](https://github.com/user-attachments/files/24220049/GreetProcess.java)
   
   


-- 
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]

Reply via email to