Encountered an error(Invalid rule UUID in expression) for using Groups in Appian Portal

Certified Senior Developer

Hi there,

I'm exploring Appian portals. I'm trying to implement self registration process using Appian portals. I have created interface, Integration object and Web API (kickoff the process model to create user). I have tested interface object separately to create user on clicking of submit button (On click of a submit button, call Integration to invoke Web API). It works absolutely fine. 

However, when I used this interface in portal and published it. Its throwing me below error.

The UUID mentioned in the error is a constant which is holding list of groups. I checked the security for constants and all groups, its all set fine. Not sure why this error is coming.

Can you please help me with this?

  Discussion posts and replies are publicly visible

  • Is it possible that you made changes to your interface to reference this constant since initially publishing it? Once you make any changes to precedent objects (like your interface), you need to republish the portal through the banner in the portal designer to ensure it gets the latest updates for those objects.

  • 0
    Certified Senior Developer
    in reply to Peter Lewis

    Hi ,

    Thanks for the reply. Drop-down field with the constants for labels and values were there initially only. However I republished the portals several times, it’s still not working.

  • 0
    Certified Senior Developer
    in reply to Peter Lewis

    I replaced the constant( having list of groups)  with the constant having list of numbers(group ids).  It will work. It looks like the problem is only with the groups.

  • Groups do not work in Appian Portals, so what's happening is that when you publish, the constant is correctly pulled into the published portal, but with its value stripped out.

    I'm very curious - what are you using this constant for in your portal?

  • 0
    Certified Senior Developer
    in reply to John Rogers

    Ahh Alright. Thanks for the response

    I was trying a scenario where there can be different users (roles) like boxers, boxing organization users etc. So when they are registering, if they can select which group they belong to, I can add them to the corresponding Appian groups after user creation. Hence I had given dropdown to select groups while registering in portal.

  • 0
    Certified Senior Developer
    in reply to John Rogers

    Has this been mentioned in Appian portals documentation ?

  • Makes sense - that's a great way to add additional functionality into a self-registration portal! I agree that using the group IDs is your best bet.

  • We're working on adding a clarification after seeing your question. No changes yet, but only because we're discussing what to add where.

  • I have the same problem, did you solve it?

    The portal was working correctly, I have not made any changes, i republished the portal and again show me this error (image bellow)

    "cast" parameter 2 [line 75] refers to an integration 

    I use an integration to call values for the "dropdownField" at  [line 175] 

    This is the expression of my interface

    a!localVariables(
      local!coecstatus,
      local!coecnacionalidad,
      local!coeccedula,
      local!coecperfil,
      local!coecnombres,
      local!coecapellidos,
      local!coecgenero,
      local!coecedad,
      local!coeccorreo,
      local!coectelefono,
      local!coeccelular,
      local!coecnivelinstruccion,
      local!coecinstruccion,
      local!coecformacion,
      local!coecprovincia,
      local!coeccanton,
      local!coecparroquia,
      local!coecdireccion,
      local!coecdiscapacidad,
      local!coectipodiscapacidad,
      local!coecdeseasocioempleo,
      local!coecvalorpago,
      local!coecmediopago,
      local!coecbranding,
      local!coecnombreempresa,
      local!coectiempomeses,
      local!coecactividadcargo,
      local!coecultimotrabajo,
      local!coecautoidentificacion,
      local!coecactualmentetrabaja,
      local!coectipoocupacion,
      local!coecocupacionactual,
      local!coechorastrabajosemanal,
      local!coecareatrabajo,
      local!coecvaloringresomensual,
      local!coecrecibeporempleador,
      local!coeccambiopuestoascensoempresa,
      local!coecsatisfechoempleoactual,
      local!coecagotadoporcargatrabajo,
      local!coecrespetantrabajocapacidades,
      local!coecjefesreconocencalidadtrabajo,
      local!coectrabajoexistenriesgoslaborales,
      local!coecdeseariaccambiartrabajo,
      local!coecrazonesencuentradesocupado,
      local!coecmotivosdejoultimotrabajo,
      local!coectiempobusquedatrabajomeses,
      local!coecjefehogar,
      local!coecposeeseguromedico,
      local!coectienehijos,
      local!coeccuantoshijos,
      local!coechijosentretresymenoresdieciocho,
      local!coecasisteninstituconeducativa,
      local!coecpersonasmiembroshogar,
      local!coecvivienda,
      local!coecaccesoservicionbasicos,
      local!coecfile1,
      local!cwaaddedby,
      local!cwadateadded,
      local!cwalastmodifiedby,
      local!cwalastmodifieddate,
      local!coecfile2,
      local!coecfile3,
      local!coecdata1,
      local!coecdata2,
      local!coecdata3,
      local!CaErrorMessage,
      local!CaComplete,
      local!buttonSubmit: false(),
      
      
    
      local!perfildata: cast(
        'type!{urn:com:appian:types:CWA}CWA_OEC_Perfil?list',
        rule!CWA_OEC_PerfilNames_Integration().result.body),
      local!perfilname: local!perfildata.perfil,
      
    
      
      
      local!provincedata: cast(
        'type!{urn:com:appian:types:CWA}CWA_dropdown_Provinces_Ec?list', 
        rule!CWA_provinceEcuadorNames_Integration().result.body),
      local!provincename: property(local!provincedata,"province",null),
      local!provinceid: property(local!provincedata,"id",null),
      local!cityname: if(
        isnull(local!coecprovincia),{},
      cast(
        'type!{urn:com:appian:types:CWA}CWA_dropdown_Cities_Ec?list',
        rule!CWA_citiesEcuadorNames_Integration(provinceID: local!coecprovincia).result.body).city),
        
    
        local!listvendorsdata: cast(
          'type!{urn:com:appian:types:CWA}CWA_OEC_ListVendors?list',
          rule!CWA_OEC_ListVendors_Integration().result.body),
        local!listvendorsname: local!listvendorsdata.CWAName,
        
        
      a!formLayout(
        label: "",
        contents: {
          a!sectionLayout(
            label: "",
            contents: {
              {
                a!localVariables(
                  local!currentSurveyPage: 1,
                  local!totalSurveyPages: 9,
                  {
                    a!boxLayout(
                      label: "CORFOPYM",
                      contents: {
                        a!columnsLayout(
                          columns: {
                            a!columnLayout(
                              contents: {
                                a!richTextDisplayField(
                                  value: {
                                    a!richTextHeader(
                                      text: { "Encuesta de Registro -Certificación-" }
                                    )
                                  }
                                )
                              }
                            )
                          }
                        )
                      },
                      style: "ACCENT",
                      shape: "SEMI_ROUNDED",
                      padding: "NONE",
                      marginBelow: "EVEN_LESS"
                    ),
                    a!columnsLayout(
                      columns: {
                        a!columnLayout(
                          contents: {
                            a!cardLayout(
                              contents: {
                                /* Visual indicator to show the current survey page */
                                a!richTextDisplayField(
                                  labelPosition: "COLLAPSED",
                                  value: a!forEach(
                                    items: enumerate(local!totalSurveyPages),
                                    expression: {
                                      a!richTextIcon(
                                        icon: "circle",
                                        color: if(
                                          fv!index = local!currentSurveyPage,
                                          "ACCENT",
                                          "SECONDARY"
                                        )
                                      ),
                                      "  "
                                    }
                                  ),
                                  accessibilityText: "Page" & " " & local!currentSurveyPage & " " & "of" & " " & local!totalSurveyPages
                                ),
                                choose(
                                  local!currentSurveyPage,
                                  /* Page 1 */
                                  {
                                    a!sectionLayout(
                                      label: "Sección 1 de 8",
                                      contents: {
                                        a!sectionLayout(
                                          label: "",
                                          contents: {
                                            a!columnsLayout(
                                              columns: {
                                                a!columnLayout(
                                                  contents: {
                                                    
                      
                                                    a!dropdownField(
                                                      label: "Perfil",
                                                      labelPosition: "ABOVE",
                                                      placeholder: "--- Perfil ---",
                                                      choiceLabels: local!perfilname,
                                                      choiceValues: local!perfilname,
                                                      value: tostring(local!coecperfil),
                                                      saveInto: local!coecperfil,
                                                      required: true,
                                                      validations: {}
                                                    )

    help please