10 Replies Latest reply on Aug 10, 2018 5:28 PM by Ed Harrold

    How to assign process objects to nested array in array in json

    vamshi itukala Seasoned Veteran

      Hi,

       

      My requirement is to add new source json array to the below sourceMappings json array. But, when I tried using process objects  to I am getting different json format I am not getting '[' (square) braces for values instead its generating only the flower braces and also I dont want quotes to true or false fields,

              "sourceMappings": [

                  {

                      "source": "x",

                      "values": [

                          {

                              "code": "00",

                              "value": "m",

                              "enabled": true,

                              "canonicalValue": true,

                              "downStreamDefaultValue": true

                          }

                      ]

                  },

                  {

                      "source": "y",

                      "values": [

                          {

                              "code": "00",

                              "value": "m",

                              "enabled": true,

                              "canonicalValue": false,

                              "downStreamDefaultValue": true

                          }

                      ]

                  }

              ]

       

      The output I am receiving is,

              "sourceMappings": [

                  {

                      "source": "x",

                      "values":

                          {

                              "code": "00",

                              "value": "m",

                              "enabled": "true",

                              "canonicalValue": "true",

                              "downStreamDefaultValue": "true"

                          }

                    

                  },

                  {

                      "source": "y",

                      "values":

                          {

                              "code": "00",

                              "value": "m",

                              "enabled": "true",

                              "canonicalValue": "false",

                              "downStreamDefaultValue": "true"

                          }

                  },

                  {

                      "source": "z",

                      "values":

                          {

                              "code": "00",

                              "value": "m",

                              "enabled": true,

                              "canonicalValue": false,

                              "downStreamDefaultValue": true

                          }

                  }

              ]

       

       

      Please help me on this

       

      Thanks

        • 1. Re: How to assign process objects to nested array in array in json
          bhim mantha Guru

          Hi Vamsi ,

           

          Define the PO like this , make sure that it's an object list and not a reference , that will help you with array .

           

          For Boolean values define it as type checkbox.

           

           

           

          And your I/P to Service Connector would be like this , I/P should be of type process object that you created.

           

           

          -Bhim

          • 2. Re: How to assign process objects to nested array in array in json
            vamshi itukala Seasoned Veteran

            Thanks Bhim for in detail explanation.

            But, still I am receiving the same error while posting that data.

             

            Error:

            {"errorCode":400,"errorMessage":"Could not read document: Can not deserialize instance of com.fasterxml.reltio.jackson.databind.node.ArrayNode out of START_OBJECT token\n at [Source: java.io.PushbackInputStream@44b99fc4; line: 1, column: 1]; nested exception is com.fasterxml.reltio.jackson.databind.JsonMappingException: Can not deserialize instance of com.fasterxml.reltio.jackson.databind.node.ArrayNode out of START_OBJECT token\n at [Source: java.io.PushbackInputStream@44b99fc4; line: 1, column: 1]","

             

             

            Please help me on this.

             

            Thanks

            • 3. Re: How to assign process objects to nested array in array in json
              bhim mantha Guru

              Can you send me the run time XML that you send to this service call.

               

              You can get this information from process console.

              • 4. Re: How to assign process objects to nested array in array in json
                vamshi itukala Seasoned Veteran

                The image shows how it is passing input to the service call in process,

                 

                From:
                expression=
                <sf:automatedStepRequest xmlns:sf="http://schemas.active-endpoints.com/appmodules/screenflow/2010/10/avosScreenflow.xsd">
                  
                <sf:userId>{ abx:getProcessInitiator() }</sf:userId>
                  
                <sf:correlationId/>
                  
                <sf:serviceName>Get-RDM-Data-By-Id-2:Post_RDM_By_Id</sf:serviceName>
                  
                <sf:avosServiceName>Get-RDM-Data-By-Id-2:Post_RDM_By_Id</sf:avosServiceName>
                  
                <sf:stepId>jkmldokg</sf:stepId>
                       { $initiate/sf:hostContext }
                      
                <sf:parameters>
                     
                <sf:parameter name="In_body"/>
                     
                <sf:parameter name="AccessToken"/>
                     
                <sf:parameter name="type"/>
                  
                </sf:parameters>
                </sf:automatedStepRequest>
                To:

                variable=automatedStepInput

                 

                From:
                expression=
                                          
                <sf:parameter name="In_body">{ iomap:getValue(
                               iomap:getElement($output/sf:field[sff:normalizeField(@name)='payload'])
                            ) }
                </sf:parameter>
                                          
                To:
                variable=automatedStepInput query=sf:parameters/sf:parameter[@name='In_body']

                 

                From:
                expression=
                                          
                <sf:parameter name="AccessToken">{ iomap:getValue(
                               iomap:getElement($output/sf:field[sff:normalizeField(@name)='access_token'])
                            ) }
                </sf:parameter>
                                          
                To:
                variable=automatedStepInput query=sf:parameters/sf:parameter[@name='AccessToken']

                 

                From:
                expression=
                                          
                <sf:parameter name="type">{ iomap:getValue(
                            iomap:getElement($input/child::element()[sff:normalizeField(@name)=sff:normalizeField('delimitedContent')])[iomap:convertToAtomicType(1)]/fileInfo[1]/name) }
                </sf:parameter>
                                          
                To:
                variable=automatedStepInput query=sf:parameters/sf:parameter[@name='type']

                 

                <messageData xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"
                            
                xmlns:ns2="http://schemas.active-endpoints.com/engineapi/2010/05/EngineAPITypes.xsd"
                            
                xmlns:ns3="http://schemas.active-endpoints.com/engineapi/2010/09/ProcessManagementTypes.xsd"
                            
                name="automatedStepFault"
                            
                namespaceURI="http://schemas.active-endpoints.com/wsdl/screenFlow/2010/10/avosAutomatedStep.wsdl">
                  
                <part name="automatedStepFaultResponse">
                     
                <aetgt:faultResponse xmlns:aetgt="http://schemas.active-endpoints.com/appmodules/screenflow/2010/10/avosScreenflow.xsd"
                                          
                xmlns:sf="http://schemas.active-endpoints.com/appmodules/screenflow/2010/10/avosScreenflow.xsd">
                        
                <sf:code>HTTP_400</sf:code>
                        
                <sf:reason>{"errorCode":400,"errorMessage":"Could not read document: Can not deserialize instance of com.fasterxml.reltio.jackson.databind.node.ArrayNode out of START_OBJECT token\n at [Source: java.io.PushbackInputStream@6263d967; line: 1, column: 1]; nested exception is com.fasterxml.reltio.jackson.databind.JsonMappingException: Can not deserialize instance of com.fasterxml.reltio.jackson.databind.node.ArrayNode out of START_OBJECT token\n at [Source: java.io.PushbackInputStream@6263d967; line: 1, column: 1]","innerErrorData":{"innerErrorData":{"exception":"com.fasterxml.reltio.jackson.databind.JsonMappingException:Can not deserialize instance of com.fasterxml.reltio.jackson.databind.node.ArrayNode out of START_OBJECT token\n at [Source: java.io.PushbackInputStream@6263d967; line: 1, column: 1]","stack":["com.fasterxml.reltio.jackson.databind.JsonMappingException.from at JsonMappingException.java, line 148","com.fasterxml.reltio.jackson.databind.DeserializationContext.mappingException at DeserializationContext.java, line 857","com.fasterxml.reltio.jackson.databind.DeserializationContext.mappingException at DeserializationContext.java, line 853","com.fasterxml.reltio.jackson.databind.deser.std.JsonNodeDeserializer$ArrayDeserializer.deserialize at JsonNodeDeserializer.java, line 126","com.fasterxml.reltio.jackson.databind.deser.std.JsonNodeDeserializer$ArrayDeserializer.deserialize at JsonNodeDeserializer.java, line 109","com.fasterxml.reltio.jackson.databind.ObjectMapper._readMapAndClose at ObjectMapper.java, line 3736","com.fasterxml.reltio.jackson.databind.ObjectMapper.readValue at ObjectMapper.java, line 2810","com.reltio.rdm.rest.mapper.RDMMappingJackson2HttpMessageConverter.readJavaType at RDMMappingJackson2HttpMessageConverter.java, line 156","com.reltio.rdm.rest.mapper.RDMMappingJackson2HttpMessageConverter.read at RDMMappingJackson2HttpMessageConverter.java, line 151","org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver.readWithMessageConverters at AbstractMessageConverterMethodArgumentResolver.java, line 197","org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.readWithMessageConverters at RequestResponseBodyMethodProcessor.java, line 147","org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.resolveArgument at RequestResponseBodyMethodProcessor.java, line 125","org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument at HandlerMethodArgumentResolverComposite.java, line 78","org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues at InvocableHandlerMethod.java, line 162","org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest at InvocableHandlerMethod.java, line 129","org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle at ServletInvocableHandlerMethod.java, line 110","org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod at RequestMappingHandlerAdapter.java, line 806","org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal at RequestMappingHandlerAdapter.java, line 729","org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle at AbstractHandlerMethodAdapter.java, line 85","org.springframework.web.servlet.DispatcherServlet.doDispatch at DispatcherServlet.java, line 959","org.springframework.web.servlet.DispatcherServlet.doService at DispatcherServlet.java, line 893","org.springframework.web.servlet.FrameworkServlet.processRequest at FrameworkServlet.java, line 970","org.springframework.web.servlet.FrameworkServlet.doPost at FrameworkServlet.java, line 872","javax.servlet.http.HttpServlet.service at HttpServlet.java, line 707","org.springframework.web.servlet.FrameworkServlet.service at FrameworkServlet.java, line 846","javax.servlet.http.HttpServlet.service at HttpServlet.java, line 790","org.eclipse.jetty.servlet.ServletHolder.handle at ServletHolder.java, line 848","org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter at ServletHandler.java, line 1772","com.googlecode.objectify.ObjectifyFilter.doFilter at ObjectifyFilter.java, line 48","org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter at ServletHandler.java, line 1759","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 316","org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke at FilterSecurityInterceptor.java, line 126","org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter at FilterSecurityInterceptor.java, line 90","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.web.access.ExceptionTranslationFilter.doFilter at ExceptionTranslationFilter.java, line 114","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter at AnonymousAuthenticationFilter.java, line 111","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter at SecurityContextHolderAwareRequestFilter.java, line 169","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter at OAuth2AuthenticationProcessingFilter.java, line 176","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal at HeaderWriterFilter.java, line 64","org.springframework.web.filter.OncePerRequestFilter.doFilter at OncePerRequestFilter.java, line 107","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal at WebAsyncManagerIntegrationFilter.java, line 53","org.springframework.web.filter.OncePerRequestFilter.doFilter at OncePerRequestFilter.java, line 107","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter at SecurityContextPersistenceFilter.java, line 91","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.web.FilterChainProxy.doFilterInternal at FilterChainProxy.java, line 213","org.springframework.security.web.FilterChainProxy.doFilter at FilterChainProxy.java, line 176","org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate at DelegatingFilterProxy.java, line 346","org.springframework.web.filter.DelegatingFilterProxy.doFilter at DelegatingFilterProxy.java, line 262","org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter at ServletHandler.java, line 1759","com.google.apphosting.utils.servlet.JdbcMySqlConnectionCleanupFilter.doFilter at JdbcMySqlConnectionCleanupFilter.java, line 60","org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter at ServletHandler.java, line 1759","org.eclipse.jetty.servlet.ServletHandler.doHandle at ServletHandler.java, line 582","org.eclipse.jetty.server.handler.ScopedHandler.handle at ScopedHandler.java, line 143","org.eclipse.jetty.security.SecurityHandler.handle at SecurityHandler.java, line 524","org.eclipse.jetty.server.session.SessionHandler.doHandle at SessionHandler.java, line 226","org.eclipse.jetty.server.handler.ScopedHandler.handle at ScopedHandler.java, line 143","org.eclipse.jetty.server.handler.HandlerWrapper.handle at HandlerWrapper.java, line 134","com.google.apphosting.runtime.jetty9.ParseBlobUploadHandler.handle at ParseBlobUploadHandler.java, line 120","org.eclipse.jetty.server.handler.ContextHandler.doHandle at ContextHandler.java, line 1182","com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.doHandle at AppEngineWebAppContext.java, line 171","org.eclipse.jetty.servlet.ServletHandler.doScope at ServletHandler.java, line 512","org.eclipse.jetty.server.session.SessionHandler.doScope at SessionHandler.java, line 185","org.eclipse.jetty.server.handler.ContextHandler.doScope at ContextHandler.java, line 1112","org.eclipse.jetty.server.handler.ScopedHandler.handle at ScopedHandler.java, line 141","com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.handle at AppVersionHandlerMap.java, line 297","org.eclipse.jetty.server.handler.HandlerWrapper.handle at HandlerWrapper.java, line 134","org.eclipse.jetty.server.Server.handle at Server.java, line 534","org.eclipse.jetty.server.HttpChannel.handle at HttpChannel.java, line 320","com.google.apphosting.runtime.jetty9.RpcConnection.handle at RpcConnection.java, line 202","com.google.apphosting.runtime.jetty9.RpcConnector.serviceRequest at RpcConnector.java, line 81","com.google.apphosting.runtime.jetty9.JettyServletEngineAdapter.serviceRequest at JettyServletEngineAdapter.java, line 123","com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchServletRequest at JavaRuntime.java, line 693","com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchRequest at JavaRuntime.java, line 655","com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run at JavaRuntime.java, line 625","com.google.apphosting.runtime.JavaRuntime$NullSandboxRequestRunnable.run at JavaRuntime.java, line 819","com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run at ThreadGroupPool.java, line 274","java.lang.Thread.run at Thread.java, line 745"]},"exception":"org.springframework.http.converter.HttpMessageNotReadableException:Could not read document: Can not deserialize instance of com.fasterxml.reltio.jackson.databind.node.ArrayNode out of START_OBJECT token\n at [Source: java.io.PushbackInputStream@6263d967; line: 1, column: 1]; nested exception is com.fasterxml.reltio.jackson.databind.JsonMappingException: Can not deserialize instance of com.fasterxml.reltio.jackson.databind.node.ArrayNode out of START_OBJECT token\n at [Source: java.io.PushbackInputStream@6263d967; line: 1, column: 1]","stack":["com.reltio.rdm.rest.mapper.RDMMappingJackson2HttpMessageConverter.readJavaType at RDMMappingJackson2HttpMessageConverter.java, line 158","com.reltio.rdm.rest.mapper.RDMMappingJackson2HttpMessageConverter.read at RDMMappingJackson2HttpMessageConverter.java, line 151","org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver.readWithMessageConverters at AbstractMessageConverterMethodArgumentResolver.java, line 197","org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.readWithMessageConverters at RequestResponseBodyMethodProcessor.java, line 147","org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.resolveArgument at RequestResponseBodyMethodProcessor.java, line 125","org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument at HandlerMethodArgumentResolverComposite.java, line 78","org.springframework.web.method.support.InvocableHandlerMethod.getMethodArgumentValues at InvocableHandlerMethod.java, line 162","org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest at InvocableHandlerMethod.java, line 129","org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle at ServletInvocableHandlerMethod.java, line 110","org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod at RequestMappingHandlerAdapter.java, line 806","org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal at RequestMappingHandlerAdapter.java, line 729","org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle at AbstractHandlerMethodAdapter.java, line 85","org.springframework.web.servlet.DispatcherServlet.doDispatch at DispatcherServlet.java, line 959","org.springframework.web.servlet.DispatcherServlet.doService at DispatcherServlet.java, line 893","org.springframework.web.servlet.FrameworkServlet.processRequest at FrameworkServlet.java, line 970","org.springframework.web.servlet.FrameworkServlet.doPost at FrameworkServlet.java, line 872","javax.servlet.http.HttpServlet.service at HttpServlet.java, line 707","org.springframework.web.servlet.FrameworkServlet.service at FrameworkServlet.java, line 846","javax.servlet.http.HttpServlet.service at HttpServlet.java, line 790","org.eclipse.jetty.servlet.ServletHolder.handle at ServletHolder.java, line 848","org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter at ServletHandler.java, line 1772","com.googlecode.objectify.ObjectifyFilter.doFilter at ObjectifyFilter.java, line 48","org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter at ServletHandler.java, line 1759","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 316","org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke at FilterSecurityInterceptor.java, line 126","org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter at FilterSecurityInterceptor.java, line 90","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.web.access.ExceptionTranslationFilter.doFilter at ExceptionTranslationFilter.java, line 114","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter at AnonymousAuthenticationFilter.java, line 111","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter at SecurityContextHolderAwareRequestFilter.java, line 169","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter at OAuth2AuthenticationProcessingFilter.java, line 176","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal at HeaderWriterFilter.java, line 64","org.springframework.web.filter.OncePerRequestFilter.doFilter at OncePerRequestFilter.java, line 107","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal at WebAsyncManagerIntegrationFilter.java, line 53","org.springframework.web.filter.OncePerRequestFilter.doFilter at OncePerRequestFilter.java, line 107","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter at SecurityContextPersistenceFilter.java, line 91","org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter at FilterChainProxy.java, line 330","org.springframework.security.web.FilterChainProxy.doFilterInternal at FilterChainProxy.java, line 213","org.springframework.security.web.FilterChainProxy.doFilter at FilterChainProxy.java, line 176","org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate at DelegatingFilterProxy.java, line 346","org.springframework.web.filter.DelegatingFilterProxy.doFilter at DelegatingFilterProxy.java, line 262","org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter at ServletHandler.java, line 1759","com.google.apphosting.utils.servlet.JdbcMySqlConnectionCleanupFilter.doFilter at JdbcMySqlConnectionCleanupFilter.java, line 60","org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter at ServletHandler.java, line 1759","org.eclipse.jetty.servlet.ServletHandler.doHandle at ServletHandler.java, line 582","org.eclipse.jetty.server.handler.ScopedHandler.handle at ScopedHandler.java, line 143","org.eclipse.jetty.security.SecurityHandler.handle at SecurityHandler.java, line 524","org.eclipse.jetty.server.session.SessionHandler.doHandle at SessionHandler.java, line 226","org.eclipse.jetty.server.handler.ScopedHandler.handle at ScopedHandler.java, line 143","org.eclipse.jetty.server.handler.HandlerWrapper.handle at HandlerWrapper.java, line 134","com.google.apphosting.runtime.jetty9.ParseBlobUploadHandler.handle at ParseBlobUploadHandler.java, line 120","org.eclipse.jetty.server.handler.ContextHandler.doHandle at ContextHandler.java, line 1182","com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.doHandle at AppEngineWebAppContext.java, line 171","org.eclipse.jetty.servlet.ServletHandler.doScope at ServletHandler.java, line 512","org.eclipse.jetty.server.session.SessionHandler.doScope at SessionHandler.java, line 185","org.eclipse.jetty.server.handler.ContextHandler.doScope at ContextHandler.java, line 1112","org.eclipse.jetty.server.handler.ScopedHandler.handle at ScopedHandler.java, line 141","com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.handle at AppVersionHandlerMap.java, line 297","org.eclipse.jetty.server.handler.HandlerWrapper.handle at HandlerWrapper.java, line 134","org.eclipse.jetty.server.Server.handle at Server.java, line 534","org.eclipse.jetty.server.HttpChannel.handle at HttpChannel.java, line 320","com.google.apphosting.runtime.jetty9.RpcConnection.handle at RpcConnection.java, line 202","com.google.apphosting.runtime.jetty9.RpcConnector.serviceRequest at RpcConnector.java, line 81","com.google.apphosting.runtime.jetty9.JettyServletEngineAdapter.serviceRequest at JettyServletEngineAdapter.java, line 123","com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchServletRequest at JavaRuntime.java, line 693","com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchRequest at JavaRuntime.java, line 655","com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run at JavaRuntime.java, line 625","com.google.apphosting.runtime.JavaRuntime$NullSandboxRequestRunnable.run at JavaRuntime.java, line 819","com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run at ThreadGroupPool.java, line 274","java.lang.Thread.run at Thread.java, line 745"]}}</sf:reason>
                     
                </aetgt:faultResponse>
                  
                </part>
                </messageData>

                 

                perform Outpu_mapping:

                 

                expression=
                             (:
                             Engine replaces conflicting CID with new one and reference within ipd process becomes invalid. (ICRT-5486)
                            
                             Collect Content-Id of attachments returned by service/subflow call that already exist in ipd process
                             Generate new CID, replace Content-Id with new value, and store the attachment
                            
                             let $existingCIDs :=
                                 for $attachmentIndex in 1 to abx:getAttachmentCount("initiate")
                                 let $attachmentId := abx:getAttachmentProperty('initiate', $attachmentIndex, 'Content-Id')
                                 return $attachmentId
                            
                             return
                               
                <attachments>{
                                 for $attachmentIndex in 1 to abx:getAttachmentCount("automatedStepResponse")
                                 let $attachmentId := abx:getAttachmentProperty("automatedStepResponse", $attachmentIndex, 'Content-Id')
                                
                                 (: argument added to prevent saxon optimization. See 2nd paragraph
                                    http://www.saxonica.com/html/documentation/changes/v9.2/optimization.html
                                 let $uuid := util:generateUUID($attachmentIndex)
                                 let $newCid := if($attachmentId = $existingCIDs)
                                                    then
                                                      if(abx:setAttachmentProperty("automatedStepResponse", $attachmentIndex, 'Orig-Content-Id', $attachmentId)
                                                         and abx:setAttachmentProperty("automatedStepResponse", $attachmentIndex, 'Content-Id', $uuid))
                                                      then $uuid else $uuid
                                                     
                                                    else ()

                                 return if($newCid)
                                        then
                <attachment id="{$attachmentIndex}" orig="cid:{$attachmentId}">cid:{$newCid}</attachment>
                                        else ()
                                 }
                </attachments>

                • 5. Re: How to assign process objects to nested array in array in json
                  vamshi itukala Seasoned Veteran

                  I sent you the xml request in run time. Is this what you are looking for?

                   

                  Please help me out on this.

                   

                  Thanks

                  • 6. Re: How to assign process objects to nested array in array in json
                    bhim mantha Guru

                    Can you please go into advanced view , filter by data change and get teh data from automatedStepInput

                     

                    • 7. Re: How to assign process objects to nested array in array in json
                      bhim mantha Guru

                      Please create a support ticket . I don't think exchanging information here is helping us debug this .

                       

                      -Bhim

                      • 8. Re: How to assign process objects to nested array in array in json
                        vamshi itukala Seasoned Veteran

                        Is there any way to assign that support ticket to you. Thanks

                        • 9. Re: How to assign process objects to nested array in array in json
                          bhim mantha Guru

                          Hi ,

                           

                          I am not from Support . Please create a ticket and you will get the help .

                           

                          Thanks.

                          • 10. Re: How to assign process objects to nested array in array in json
                            Ed Harrold New Member

                            I have a very similar question, however, I'm using the Salesforce connector and needing to create the array of related objects within the final payload returned to the consumer of the API:

                             

                            Note: complete composite object is one Process Object, array of related data is another process object. The model data and example response info is showing in the swagger file exactly as expected so I think the design is ok, but I'm struggling how to iterate over the data returned from the Salesforce connector to populate the main process object to yield the expected output:

                            {

                               "someField1": "the data",

                               "someField2": "more data",

                               ....,

                               "someFieldArray:" [

                               { "someOtherField1": "the related data",

                               "someOtherField2": "more related data",

                               ....},

                               { "someOtherField1": "different related data",

                               "someOtherField2": "more different related data",

                               ....},

                               ....,

                               ],

                               "someField10": "the data",

                               "someField15": "more data",

                               ....,

                            }

                             

                            PO 1:

                            someField1: text,

                            someField2: text,

                            ...

                            someFieldArray: Object List,

                            ...

                             

                            PO 2: (object in the Object List)

                            someOtherField1: text,

                            someOtherField2: text,

                            ...

                             

                            Any help is appreciated!