fjtirado opened a new issue, #1857:
URL: https://github.com/apache/incubator-kie-issues/issues/1857

   Kogito currently support 
[retrigger](https://github.com/apache/incubator-kie-kogito-runtimes/blob/main/addons/common/process-management/src/main/java/org/kie/kogito/process/management/BaseProcessInstanceManagementResource.java#L204-L215)
 operation. 
   This operation allows an user to resume execution of a process instance that 
failed in a particular node (either after updating the model or after fixing 
the external service that failed)
   
   On the other hand, Data index stores a list of executed node instances 
associated to a particular process instance. There is also an error property 
associated to the process instance, which contains the error message, but not a 
pointer to the node instance that failed
   
   When the node is re-triggered, a new list of nodes, consequence of the 
dispatching of the re trigger request, is added to the existing list.
   
   There is a problem for users that want to know  what are the nodes that are 
part of the re-trigger execution.  To cope with it, the proposal is to add a 
new `resume` property to data index process instance object, which will contain 
a list of item ( a workflow instance can be resumed many times), each item 
containing the nodeinstanceid that was retriggered and the date of the 
retriggered. 
   
   Related with that, Data index is fed by events published by runtimes. 
Runtimes only publishes the events that fed data index when an unit of work is 
completed. A unit of work is completed when the process instance state is 
completed, error or waiting (if the workflow is waiting for event)
   
   For workflows that basically invoke synchronous operations, this means that 
once the retrigger is executed, the state that the user will see in data index 
will be either completed or error. If the retrigger was executed when the 
process instance was in failed state (most typical situation) and the retrigger 
failed again (which can happen) the user wont see any change in process state 
(he will see more node instances added to the process instance, though). 
Therefore, it will be convenient to add error message to the node instance that 
failed. This way, a user can query by node instances which error messages are 
not null to find out how many times the process instance has failed. 
   
   Also, it is probably sound (although not sure it is really required) to send 
a State Process instance event before dispatching the retrigger operation to 
set the status to active in data-index. This might be useful in case the 
workflow contains long operations and the event with the 
completed/error/waiting state result of the retrigger operation takes a while 
to be published.  
   
   


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