GenericTransactionException: Commit failed, rollback previously requested by nested transaction.

Issue #302 resolved
Ben Howell created an issue

Hello,

I seem to be getting a very similar issue to #248.

We have a parent issue 'Site' which has many linked issues 'Investigations'

The site WF has two main statuses 'No Investigation' and 'Investigation Open'. Whenever a linked investigation is opened the linked Site is changed from 'No Investigation' to 'Investigation Open'. Each time an Investigation is closed it changes (or tried to change) the status of the site to 'Investigation Closed' the site has a WF condition validator making sure all linked issues are closed before it will transition.

Now when ever we try to transition a investigation to closed and the linked site has other investigations that are still open it failes with that transaction error.

This was all working fine in jira 6.3.x. We transitioned to Jira 7.1.4 last night and now its broken the workflows using these delayed writes. Running 2.2.9 (i have also tried 2.2.8).

Can you please help!

I have attached some pictures to help.

Comments (16)

  1. Fidel Castro Armario repo owner

    Hi Ben,

    I suspect that "Write linked issues and subtasks recursively" parameter in "Write field on linked issues or subtasks" post-function might have something to do with the problem, and I think that you don't actually need it in your use case, so please UNCHECK it, and let me know whether it solves your problem.

  2. Ben Howell reporter

    Hello,

    Thanks for the quick reply, i have disabled the recursive option as suggested and get the same error.

  3. Ben Howell reporter

    Hello, no problems, i have attached the two WF's the GLIS is the investigation. I will email the logs shortly.

  4. Fidel Castro Armario repo owner

    Ben, I still don't know the cause of your problem, but I think that the following workaround will solve it:

    Edit post-function "Write field on linked issues or subtasks" in transition "Close Issue" of GLIS WF workflow and set parameter "Conditional execution" with the following boolean expression:

    toString(filterByPredicate(linkedIssues("Owner, Investigation", %{00041}), ^%{00016} != "Closed")) = %{00015}
    

    Please, let me know if it solves your problem.

  5. Ben Howell reporter

    Hi Fidel,

    I have added the condition and i can confirm that i can now close the investigation (no errors in the GUI or logs) but the site is not transitioning to 'No Investigations' when all of the linked issues are closed!

    Eg. My Test site had two open investigations, I closed the first and the site status remained in 'Investigation Open' (as expected as there is still one open). I then closed the last investigation but the site status did not transition to 'No Investigations'

  6. Fidel Castro Armario repo owner

    Please, set logging level for package com.fca.jira.plugins.workflowToolbox to DEBUG. To do it you should navigate to Administration > System > Logging & Profiling > Configure logging level for another package. Then, try reproducing the problem, and then share with me your server's log file. You can send it to support@workflowarts.com.

    Do it with your current configuration, i.e., with the boolean expression at "Conditional execution" parameter.

  7. Fidel Castro Armario repo owner

    Hi Ben,

    Can we have a screen-share by Skype? I would like to see the problem in direct.

    My Skype user is fidel100r.

  8. Fidel Castro Armario repo owner

    I made a mistake in the expression I gave to you initially. The expression you should use is:

    toString(filterByPredicate(linkedIssues("Investigation", linkedIssues("Site")), ^%{00016} != "Closed")) = %{00015}
    

    This boolean expression is used to check that the validation in the Site issue is going to pass, otherwise the post-function will not be actually executed. More concretely, it checks that the only issue linked to the Site through Investigation issue link type and in status different from Closed, is current issue, i.e., is the Investigation issue which is executing the post-function.

    Note that:

    • %{00015} is field code for "Issue key" of current issue, i.e., of Investigation issue.
    • ^%{00016} is field code for "Issue status" of issues returned by subexpression linkedIssues("Investigation", linkedIssues("Site"))
  9. Ben Howell reporter

    Hi Fidel,

    Thank you for your assistance again, it was fantastic to get such a quick response and a work arround in place to enable us to operate again.

  10. Log in to comment