DX Api - Refresh action error
I have the following section inside a case type:
The first button has a refresh section instruction with a data transform that sets “ValoreSemplice” to “value set”
The secondo button has a refresh section instruction with a data transform that adds an item to a pagelist (.Listarella). The contet of said data page is shown in a dynamic repeting layout. Below you can find an example of the section after both button are pressed
To reproduce the issue create a new case and get pzinskey of the assignment (example ASSIGN-WORKLIST REPLY-RD-PREDICTION-WORK D-44!LISTARELLA_FLOW). Then in pega dx api help screen run api
Please note that id has to be set with the pzinskey of the assignment, while actionid is always Listarella
The output of this api is the json of the section ad below
I have the following section inside a case type:
The first button has a refresh section instruction with a data transform that sets “ValoreSemplice” to “value set”
The secondo button has a refresh section instruction with a data transform that adds an item to a pagelist (.Listarella). The contet of said data page is shown in a dynamic repeting layout. Below you can find an example of the section after both button are pressed
To reproduce the issue create a new case and get pzinskey of the assignment (example ASSIGN-WORKLIST REPLY-RD-PREDICTION-WORK D-44!LISTARELLA_FLOW). Then in pega dx api help screen run api
Please note that id has to be set with the pzinskey of the assignment, while actionid is always Listarella
The output of this api is the json of the section ad below
{
"view": {
"reference": "",
"validationMessages": "",
"viewID": "Listarella",
"visible": true,
"name": "Listarella",
"appliesTo": "Reply-RD-Prediction-Work-DXRefresh",
"groups": [
{
"layout": {
"visible": true,
"titleFormat": "h2",
"containerFormat": "NOHEADER",
"groups": [
{
"field": {
"validationMessages": "",
"visible": true,
"labelReserveSpace": false,
"readOnly": false,
"control": {
"modes": [
{
"modeType": "ignore",
"tooltip": ""
},
{
"modeType": "readOnly",
"autoPrepend": "",
"controlFormat": "pzhc",
"tooltip": "",
"showReadOnlyValidation": "false",
"autoAppend": "",
"formatType": "text"
}
],
"actionSets": [
{
"actions": [
{
"action": "refresh",
"refreshFor": "cHlUZW1wbGF0ZUJ1dHRvbiNweEJ1dHRvbiMx"
}
],
"events": [
{
"event": "click"
}
]
}
],
"label": "SetValue",
"type": "pxButton"
},
"label": "Button",
"type": "Text",
"showLabel": false,
"required": false,
"reference": "pyTemplateButton",
"labelFormat": "Standard",
"disabled": false,
"testID": "2021012209212806633973",
"value": "",
"maxLength": 0,
"expectedLength": "",
"fieldID": "pyTemplateButton"
}
},
{
"field": {
"validationMessages": "",
"visible": true,
"labelReserveSpace": true,
"readOnly": true,
"control": {
"modes": [
{
"modeType": "editable",
"controlFormat": "Standard",
"textAlign": "Left",
"tooltip": "",
"maxChars": "",
"formatType": "none",
"specifySize": "auto",
"minChars": ""
},
{
"modeType": "readOnly",
"tooltip": "",
"showReadOnlyValidation": "false",
"formatType": "none"
}
],
"actionSets": [],
"type": "pxTextInput"
},
"label": "ValoreSemplice",
"type": "Text",
"required": false,
"reference": "ValoreSemplice",
"labelFormat": "Standard",
"disabled": false,
"testID": "2021012210493203927728",
"value": "",
"maxLength": 0,
"expectedLength": "",
"fieldID": "ValoreSemplice"
}
},
{
"field": {
"validationMessages": "",
"visible": true,
"labelReserveSpace": false,
"readOnly": false,
"control": {
"modes": [
{
"modeType": "ignore",
"tooltip": ""
},
{
"modeType": "readOnly",
"autoPrepend": "",
"controlFormat": "pzhc",
"tooltip": "",
"showReadOnlyValidation": "false",
"autoAppend": "",
"formatType": "text"
}
],
"actionSets": [
{
"actions": [
{
"action": "refresh",
"refreshFor": "cHlUZW1wbGF0ZUJ1dHRvbiNweEJ1dHRvbiMz"
}
],
"events": [
{
"event": "click"
}
]
}
],
"label": "AddList",
"type": "pxButton"
},
"label": "Button",
"type": "Text",
"showLabel": false,
"required": false,
"reference": "pyTemplateButton",
"labelFormat": "Standard",
"disabled": false,
"testID": "2021012210564202187853",
"value": "",
"maxLength": 0,
"expectedLength": "",
"fieldID": "pyTemplateButton"
}
}
],
"groupFormat": "Stacked",
"layoutFormat": "SIMPLELAYOUT",
"title": ""
}
},
{
"layout": {
"newRow": {
"listIndex": "{5844ab3b5162c641d4c27571546d5879_listIndex}",
"groups": [
{
"view": {}
}
],
"testID": "202101221236570494713-1"
},
"repeatContainerFormat": "NOHEADER",
"fieldListID": ".Listarella",
"referenceType": "List",
"readOnly": false,
"title": "",
"rows": [],
"repeatLayoutFormat": "Default",
"titleFormat": "h2",
"sourceType": "Property",
"testID": "202101221236570494713",
"groupFormat": "Dynamic",
"layoutFormat": "REPEATINGLAYOUT"
}
}
]
},
"caseID": "REPLY-RD-PREDICTION-WORK D-44",
"name": "Listarella",
"actionID": "Listarella"
}
Please note that both buttons have an associated refresh action with a refresh for id
In order to execute the action associated at the first button we can invoke the api PUT /assignments/{ID}/actions/{actionID}/refresh
Id and actionid value are as before. Refresh for is the same value taken from the previous json response associated with the first button. Below is the json response. As you can see the data transform associated with the button has been excuted because we can see the string value set
{
"view": {
"reference": "",
"validationMessages": "",
"viewID": "Listarella",
"visible": true,
"name": "Listarella",
"appliesTo": "Reply-RD-Prediction-Work-DXRefresh",
"groups": [
{
"layout": {
"visible": true,
"titleFormat": "h2",
"containerFormat": "NOHEADER",
"groups": [
{
"field": {
"validationMessages": "",
"visible": true,
"labelReserveSpace": false,
"readOnly": false,
"control": {
"modes": [
{
"modeType": "ignore",
"tooltip": ""
},
{
"modeType": "readOnly",
"autoPrepend": "",
"controlFormat": "pzhc",
"tooltip": "",
"showReadOnlyValidation": "false",
"autoAppend": "",
"formatType": "text"
}
],
"actionSets": [
{
"actions": [
{
"action": "refresh",
"refreshFor": "cHlUZW1wbGF0ZUJ1dHRvbiNweEJ1dHRvbiMx"
}
],
"events": [
{
"event": "click"
}
]
}
],
"label": "SetValue",
"type": "pxButton"
},
"label": "Button",
"type": "Text",
"showLabel": false,
"required": false,
"reference": "pyTemplateButton",
"labelFormat": "Standard",
"disabled": false,
"testID": "2021012209212806633973",
"value": "",
"maxLength": 0,
"expectedLength": "",
"fieldID": "pyTemplateButton"
}
},
{
"field": {
"validationMessages": "",
"visible": true,
"labelReserveSpace": true,
"readOnly": true,
"control": {
"modes": [
{
"modeType": "editable",
"controlFormat": "Standard",
"textAlign": "Left",
"tooltip": "",
"maxChars": "",
"formatType": "none",
"specifySize": "auto",
"minChars": ""
},
{
"modeType": "readOnly",
"tooltip": "",
"showReadOnlyValidation": "false",
"formatType": "none"
}
],
"actionSets": [],
"type": "pxTextInput"
},
"label": "ValoreSemplice",
"type": "Text",
"required": false,
"reference": "ValoreSemplice",
"labelFormat": "Standard",
"disabled": false,
"testID": "2021012210493203927728",
"value": "value set",
"maxLength": 0,
"expectedLength": "",
"fieldID": "ValoreSemplice"
}
},
{
"field": {
"validationMessages": "",
"visible": true,
"labelReserveSpace": false,
"readOnly": false,
"control": {
"modes": [
{
"modeType": "ignore",
"tooltip": ""
},
{
"modeType": "readOnly",
"autoPrepend": "",
"controlFormat": "pzhc",
"tooltip": "",
"showReadOnlyValidation": "false",
"autoAppend": "",
"formatType": "text"
}
],
"actionSets": [
{
"actions": [
{
"action": "refresh",
"refreshFor": "cHlUZW1wbGF0ZUJ1dHRvbiNweEJ1dHRvbiMz"
}
],
"events": [
{
"event": "click"
}
]
}
],
"label": "AddList",
"type": "pxButton"
},
"label": "Button",
"type": "Text",
"showLabel": false,
"required": false,
"reference": "pyTemplateButton",
"labelFormat": "Standard",
"disabled": false,
"testID": "2021012210564202187853",
"value": "",
"maxLength": 0,
"expectedLength": "",
"fieldID": "pyTemplateButton"
}
}
],
"groupFormat": "Stacked",
"layoutFormat": "SIMPLELAYOUT",
"title": ""
}
},
{
"layout": {
"newRow": {
"listIndex": "{5844ab3b5162c641d4c27571546d5879_listIndex}",
"groups": [
{
"view": {}
}
],
"testID": "202101221236570494713-1"
},
"repeatContainerFormat": "NOHEADER",
"fieldListID": ".Listarella",
"referenceType": "List",
"readOnly": false,
"title": "",
"rows": [],
"repeatLayoutFormat": "Default",
"titleFormat": "h2",
"sourceType": "Property",
"testID": "202101221236570494713",
"groupFormat": "Dynamic",
"layoutFormat": "REPEATINGLAYOUT"
}
}
]
},
"caseID": "REPLY-RD-PREDICTION-WORK D-44",
"name": "Listarella",
"actionID": "Listarella"
}
We can now try to run the refresh associated at the second button (please note that we are changing the refresh for id in the invocation)
{
"view": {
"reference": "",
"validationMessages": "",
"viewID": "Listarella",
"visible": true,
"name": "Listarella",
"appliesTo": "Reply-RD-Prediction-Work-DXRefresh",
"groups": [
{
"layout": {
"visible": true,
"titleFormat": "h2",
"containerFormat": "NOHEADER",
"groups": [
{
"field": {
"validationMessages": "",
"visible": true,
"labelReserveSpace": false,
"readOnly": false,
"control": {
"modes": [
{
"modeType": "ignore",
"tooltip": ""
},
{
"modeType": "readOnly",
"autoPrepend": "",
"controlFormat": "pzhc",
"tooltip": "",
"showReadOnlyValidation": "false",
"autoAppend": "",
"formatType": "text"
}
],
"actionSets": [
{
"actions": [
{
"action": "refresh",
"refreshFor": "cHlUZW1wbGF0ZUJ1dHRvbiNweEJ1dHRvbiMx"
}
],
"events": [
{
"event": "click"
}
]
}
],
"label": "SetValue",
"type": "pxButton"
},
"label": "Button",
"type": "Text",
"showLabel": false,
"required": false,
"reference": "pyTemplateButton",
"labelFormat": "Standard",
"disabled": false,
"testID": "2021012209212806633973",
"value": "",
"maxLength": 0,
"expectedLength": "",
"fieldID": "pyTemplateButton"
}
},
{
"field": {
"validationMessages": "",
"visible": true,
"labelReserveSpace": true,
"readOnly": true,
"control": {
"modes": [
{
"modeType": "editable",
"controlFormat": "Standard",
"textAlign": "Left",
"tooltip": "",
"maxChars": "",
"formatType": "none",
"specifySize": "auto",
"minChars": ""
},
{
"modeType": "readOnly",
"tooltip": "",
"showReadOnlyValidation": "false",
"formatType": "none"
}
],
"actionSets": [],
"type": "pxTextInput"
},
"label": "ValoreSemplice",
"type": "Text",
"required": false,
"reference": "ValoreSemplice",
"labelFormat": "Standard",
"disabled": false,
"testID": "2021012210493203927728",
"value": "",
"maxLength": 0,
"expectedLength": "",
"fieldID": "ValoreSemplice"
}
},
{
"field": {
"validationMessages": "",
"visible": true,
"labelReserveSpace": false,
"readOnly": false,
"control": {
"modes": [
{
"modeType": "ignore",
"tooltip": ""
},
{
"modeType": "readOnly",
"autoPrepend": "",
"controlFormat": "pzhc",
"tooltip": "",
"showReadOnlyValidation": "false",
"autoAppend": "",
"formatType": "text"
}
],
"actionSets": [
{
"actions": [
{
"action": "refresh",
"refreshFor": "cHlUZW1wbGF0ZUJ1dHRvbiNweEJ1dHRvbiMz"
}
],
"events": [
{
"event": "click"
}
]
}
],
"label": "AddList",
"type": "pxButton"
},
"label": "Button",
"type": "Text",
"showLabel": false,
"required": false,
"reference": "pyTemplateButton",
"labelFormat": "Standard",
"disabled": false,
"testID": "2021012210564202187853",
"value": "",
"maxLength": 0,
"expectedLength": "",
"fieldID": "pyTemplateButton"
}
}
],
"groupFormat": "Stacked",
"layoutFormat": "SIMPLELAYOUT",
"title": ""
}
},
{
"layout": {
"newRow": {
"listIndex": "{5844ab3b5162c641d4c27571546d5879_listIndex}",
"groups": [
{
"view": {}
}
],
"testID": "202101221236570494713-1"
},
"repeatContainerFormat": "NOHEADER",
"fieldListID": ".Listarella",
"referenceType": "List",
"readOnly": false,
"title": "",
"rows": [
{
"groups": [
{
"view": {}
}
],
"testID": "202101221236570494713-1"
}
],
"repeatLayoutFormat": "Default",
"titleFormat": "h2",
"sourceType": "Property",
"testID": "202101221236570494713",
"groupFormat": "Dynamic",
"layoutFormat": "REPEATINGLAYOUT"
}
}
]
},
"caseID": "REPLY-RD-PREDICTION-WORK D-44",
"name": "Listarella",
"actionID": "Listarella"
}
We get the following result
As you can see the data transform associated with the button has not been run. Since there is no new element in the page list and the label “prova” is nowhere to be found.
Is this a bug of the DX API? How should we overcome this problem?
Thanks, Nicolò