is it possible to put workflow post functions in a transaction ? Edited

Consider, for example, you have a workflow post function which runs on a transition. The function might make many changes. Is there a way to rollback all changes if any errors occur along the way?

1 answer

This widget could not be displayed.

No.  There's no way Jira can know what a post-function might do, so it can't roll-back anything.

If it’s not possible that’s one thing..but Jira is backed by a database...and databases can be transactional...so theoretically it should be possible without Jira knowing the details of the post functions.

In theory, yes.  In reality, no.

Jira is not really backed by a database.  It uses a database as a data store for convenience, avoiding writing its own data storage mechanisms and to take advantage of some database functions that aren't particularly data related.

To make it transactional, you'd need to add code to every place where Jira might write to its data store.  That's a massive re-engineering project, and Atlassian sees that as pointless.  (I don't, but I don't care about the cost or time, I just want more, better, functions.  But I've got a massive list of those above making it transactional too)

Fair enough...thanks for the clarification!

What about this?

https://docs.atlassian.com/jira/7.0.6/com/atlassian/jira/transaction/package-summary.html

 

Are you sure that Jira isn't doing a transaction which can be rolled back by throwing an exception?

 

That's probably how validators work, no?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

54 views 1 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you