We believe it is caused by the asynchronous nature of workflows, since workflow operations run on the task queue. Our runtime experts were already aware of this issue, and it should be fixed in one of the upcoming releases. Executing the microflow that starts the workflow on the task queue should do the trick though, so you could try that approach for now.
Best of luck, let me know if this helps!
I had comparable issues and got it fixed by first committing the object you want to perform the workflow on. In your case the ApprovalDiscountRequest, which is passed as a parameter. I assume that the workflow (which runs in the background/server) tries to retrieve the object when you kick off the workflow and cannot find it when not committed yet.
Hope this helps..
Thanks, also a good idea. Now I found the following. To me it seems that the workflow is only instantiated and not committed. Maybe this could be the problem?
@Jef Hellemans: hereby confirmation that my entity indeed has the generalization WorkflowContext:
Thanks for also looking into this!
Added this remark that now this seems relevant:
By the way: I am using version 9.1.1 of Mendix Studio, but I could not choose this version while entering this question.
Hello! I have same issue. I have no error. In my case I have Statement from WorkflowContext entity. I created all statement firstly then loop WF call for all of them. I can see WF's are created but tasks are empty sometimes. So not assigned to some of my customers. Sometimes work well sometimes not .I added taskque but result is same. Do you have advice?