New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong process variable value order with type 'List' #26

Open
azinchenko-sc opened this Issue Feb 13, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@azinchenko-sc
Contributor

azinchenko-sc commented Feb 13, 2018

From time to time we have wrong order in 'List' variable. It is not always can be reproduced(every 2-7 workflow with 6+ approvers).

Everything is OK in database storage:
image

So there is a problem with data retrieval during variable initialization.

case LIST:
    if (variable) {
        Set<ProcessVarListItem> items = variable?.items
        List values = []
        items?.each() {
            values << getConvertedValue(it.content, variable?.subTypeName, variable)
        }
        return values
    }

The problem is that PersistentSet will not always have correct order so we need to save sorted result into List.

azinchenko-sc added a commit that referenced this issue Feb 15, 2018

#26 Backed out previous fix. Adjusted to return 'PersistentSortedSet'…
… instead of 'PersistentSet' for items collection.
@azinchenko-sc

This comment has been minimized.

Show comment
Hide comment
@azinchenko-sc

azinchenko-sc Feb 15, 2018

Contributor

e4e3b59 was reverted.
Adjusted to retrieve data from db in 'PersistentSortedSet' collection instead of 'PersistentSet' and further sorting.

Contributor

azinchenko-sc commented Feb 15, 2018

e4e3b59 was reverted.
Adjusted to retrieve data from db in 'PersistentSortedSet' collection instead of 'PersistentSet' and further sorting.

azinchenko-sc added a commit that referenced this issue Feb 16, 2018

#26 Improved 'compareTo' method to avoid cases when newly created(wit…
…hout id) items are not taken into collection.

@ivouchak-sc ivouchak-sc changed the title from Wrong approvers collection order. to Wrong process variable value order with type List Jun 28, 2018

@ivouchak-sc ivouchak-sc changed the title from Wrong process variable value order with type List to Wrong process variable value order with type 'List' Jun 28, 2018

@ivouchak-sc

This comment has been minimized.

Show comment
Hide comment
@ivouchak-sc

ivouchak-sc Jun 28, 2018

Contributor

The reason: wrong comparator, order can't be taken into account for a new created items.

Contributor

ivouchak-sc commented Jun 28, 2018

The reason: wrong comparator, order can't be taken into account for a new created items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment