[midPoint] weird little bug with activiti / workflow / approvals

Pavol Mederly mederly at evolveum.com
Thu Sep 22 07:15:19 CEST 2016


Hello Patrick,

thank you for the report and fix. I've added it to the code.

Yes, we've been dealing with these "prismContext is null" issues some 
time ago - a lot. These are related to how tomcat serializes and 
deserializes objects, as prismContext is not serializable and has to be 
filled-in explicitly if it's missing.

Best regards,

Pavol Mederly
Software developer
evolveum.com

On 22.09.2016 0:03, pdbogen at cernu.us wrote:
> Hi!
>
> This is a strange bug report, and once you read it hopefully you'll understand
> why I didn't immediately open a ticket. (tl;dr: I encountered it, but I can't
> figure out how to reproduce it.)
>
> While fine-tuning my approval workflows, I ran across a situation wherein
> approving a work item failed.
>
> I apologize that I've now lost the full stack trace, but I tracked the error
> down to this line:
>
>      https://github.com/Evolveum/midpoint/blob/master/model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processes/itemApproval/ApprovalLevelImpl.java#L123
>
> I'm not sure why, and so I cannot now reproduce, but sometimes the
> PrismContext for the deserialized approverExpression is null. In such a case,
> getValue throws an exception; and long story short, the approval of the work
> item fails.
>
> While the problem was occuring, I was able to fix it by copying the code from
> just below,
> https://github.com/Evolveum/midpoint/blob/master/model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processes/itemApproval/ApprovalLevelImpl.java#L142,
> which checks for a null PrismContext for automaticallyApproved and sets it if
> it is null.
>
> I guess therefore this is a known problem, but an oversight that this check
> was not also done for the approverExpressions.
>
> I've attached a simple patch that adds this check in, which fixed the problem
> for me. But, as mentioned, I don't know how to reproduce it..
>
> Thanks!
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20160922/0728b845/attachment.htm>


More information about the midPoint mailing list