SendMailActionDecorator in Shopware 6 Commercial Plugin should check if flow has "employee" of specific type
In the shopware commercial plugin, the class src/B2B/EmployeeManagement/Domain/Flow/SendMailActionDecorator.php decorates the SendMailAction. However, in the handleFlow() method it only checks if a flow has the data "employee", but does not further check, if said employee is actually of the type as is implemented by the commercial plugin before assigning languageId etc. to the flow's Context.
This results in any plugin, that also implements their own employee system or simply uses flows that also contain an "employee", but don't have a languageId implemented on it, can not send any mails out, as the decorated handleFlow will never actually be run.
A simple if ( $employeem instanceof EmployeeEntity) statement surrounding the "$flow->getContext()->assign()" should fix this.