Conversation
…ent as specified in the DTO
skosito
left a comment
There was a problem hiding this comment.
I think this seems logical, but have to be tested and confirmed.
It looks like we supported communication in a way that A sends suggestions, B provides feedbacks. This PR is giving possibility that next workstep suggestion can be sent by B. I can not remember if we did this intentionally or this is a bug. I we did this intentionally bug is that B can do it, we should at least prevent it somehow.
@lietho What happens with new version if B tries to send it in same scenario? I see code is the same there.
To proceed with this merge, we should make sure all current e2e tests are green, and we need to add new test that covers this scenario. What do you think?
cc: @ognjenkurtic
|
Hi @skosito. I left the code for But maybe there should be another check for |
|
Yes we should do that. But I think both new cases should be covered with new e2e tests and making sure existing ones are still green. |
When creating suggestions with
NEXTWORKSTEPandFINALWORKSTEPthe code acts a little bit strange in my opinion. The recipient of the new suggestion is taken form the latest trustmesh entry. Unfortunately, this prevents both parties from changing the workflow state.For example: Alice sends an initial suggestion to Bob. Bob accepts the message and sends a positive feedback. Now both parties have a latest trustmesh entry with Sender=Bob. If Bob now wants to execute the next workstep and sends a suggestion with workstep type
NEXTWORKSTEPorFINALWORKSTEP, the code will send the suggestion to Bob.I have fixed this issue by taking the recipient from the DTO instead from the latest trustmesh entry.