Truncated list when state is persisted in Mongo

16 views
Skip to first unread message

Ivan Cordon

unread,
Mar 17, 2022, 12:14:50 PM3/17/22
to Kogito development mailing list
I'm having a problem using Mongo to persist states. When the user's task state is persisted, the lists get cut off:

create new request:

{
"request" : {
"idenpn": "232jjjG",
"isclient": false
}
}

and the response shows the two consents (list):

{
"id": "bba52957-973b-4bf2-9232-cdc31adff736",
"request": {
"idenpn": "232jjjG",
"isclient": false,
"consentTypes": [
"c",
"d"
]
},
"consents": [
{
"type": "c",
"accepted": false
},
{
"type": "d",
"accepted": false
}
]
}


but when I get the task, only receive one consent:

[
{
"id": "6fa308e5-fb9b-4f43-85ae-93f74ac6af0f",
"name": "accept",
"state": 0,
"phase": "active",
"phaseStatus": "Ready",
"parameters": {
"request": {
"idenpn": "232jjjG",
"isclient": false,
"consentTypes": [
"d"
]
},
"consents": [
{
"type": "d",
"accepted": false
}
]
},
"results": {}
}
]


The problem only occurs when persist the state in Mongo. When the state is only in memory the list is complete:


[
    {
        "id": "817f634a-0b9d-406e-99a4-4494babce2c6",
        "name": "accept",
        "state": 0,
        "phase": "active",
        "phaseStatus": "Ready",
        "parameters": {
            "request": {
                "idenpn": "4567890H",
                "isclient": false,
                "consentTypes": [
                    "c",
                    "d"
                ]
            },
            "consents": [
                {
                    "type": "c",
                    "accepted": false
                },
                {
                    "type": "d",
                    "accepted": false
                }
            ]
        },
        "results": {}
    }
]


The git repository with both examples (wit and without mongo) is here:




Thanks in advance!

Cristiano Nicolai

unread,
Mar 21, 2022, 5:13:48 AM3/21/22
to Kogito development mailing list
Hi Ivan,

Thanks for the details, I managed to replicate the issue locally and created the following JIRA https://issues.redhat.com/browse/KOGITO-6892.
The fix should be available soon, likely Kogito 1.20.

--
You received this message because you are subscribed to the Google Groups "Kogito development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kogito-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kogito-development/686f85c5-f0f0-4256-beb8-25ea40221481n%40googlegroups.com.


--
Best regards,

Cristiano Nicolai
Reply all
Reply to author
Forward
0 new messages