Hi,
I have a “connector in” which sends the a query result (list) to one Process Variable.
The resulting array has 2 “columns”.
When calling the Process variable from the UI form, using a UI variable (with External API call), I don’t know how to parse the result.
The select widget is supposed to show a list of departments. i.e.:
Aires Acondicionados"
Administrativo
Aprovisionamiento
…etc
but when calling the values through the variable using this statement departments.value … all I get is this:
[ “AA”, “Aires Acondicionados” ]
[ “AD”, “Administrativo” ]
[ “AP”, “Aprovisionamiento” ]
… etc
Here are my questions:
Could you please tell me what I am doing wrong when parsing the result?
Could you please tell how to send back the selected option from the Select widget? (do I need a contract variable?)
Could you please tell me how to set a default selected option? (option selected in previous step)
Thanks for your help.
By the way, this is the actual json result I get from the Process variable:
{ “name”: “listaDepartamentosSAP”, “description”: null, “transientData”: false, “className”: “java.util.List”, “containerType”: “PROCESS_INSTANCE”, “tenantId”: 0, “tenantId_string”: “0”, “id”: 35011, “id_string”: “35011”, “containerId”: 17005, “containerId_string”: “17005”, “value”: [ [ “AA”, “Aires Acondicionados” ], [ “AD”, “Administrativo” ], [ “AP”, “Aprovisionamiento” ], [ “AU”, “Auditoria Interna” ], [ “CD”, “Centro Datos” ], [ “CO”, “Comercial” ], [ “DI”, “Distribuciones” ], [ “DP”, “Directores & Presidencia” ], [ “EL”, “Electromecánicos” ], [ “FI”, “Financiero & Aprov.” ], [ “GE”, “Gerencia” ], [ “GH”, “Gestión Humana” ], [ “GN”, “Generadores” ], [ “IN”, “Ingeniería & Logistica” ], [ “IS”, “Instalaciones” ], [ “LE”, “Legal” ], [ “LO”, “Logística” ], [ “MC”, “Mantenimiento Correctivo” ], [ “ME”, “Mercadeo” ], [ “MP”, “Mantenimiento Preventivo” ], [ “NO”, “NOC” ], [ “OP”, “Operaciones” ], [ “PO”, “Potencia” ], [ “PR”, “Proyectos” ], [ “QE”, “Calidad Energia” ], [ “SCE”, “Servicio Cableado Estruct.” ], [ “TI”, “Tecnologías de Información” ] ], “value_string”: “[[AA, Aires Acondicionados], [AD, Administrativo], [AP, Aprovisionamiento], [AU, Auditoria Interna], [CD, Centro Datos], [CO, Comercial], [DI, Distribuciones], [DP, Directores & Presidencia], [EL, Electromecánicos], [FI, Financiero & Aprov.], [GE, Gerencia], [GH, Gestión Humana], [GN, Generadores], [IN, Ingeniería & Logistica], [IS, Instalaciones], [LE, Legal], [LO, Logística], [MC, Mantenimiento Correctivo], [ME, Mercadeo], [MP, Mantenimiento Preventivo], [NO, NOC], [OP, Operaciones], [PO, Potencia], [PR, Proyectos], [QE, Calidad Energia], [SCE, Servicio Cableado Estruct.], [TI, Tecnologías de Información]]” }