cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2416
Views
0
Helpful
4
Replies

Grids in Forms

rruckley
Level 1
Level 1

Support Team,

I'm still learning CSP and haven't had the joy of any training yet but I have a question on the right way to do grid form components.

Currently I have a form to raise a change for a physical server. The server information is a normal form.

In addition I wish to have the ability to enter information for multiple network cards and multiple disks.

My solution was to create three seperate service items, server, networkcards and disk.

Then I created three seperate dictionaries from these specifying that networkcards and disk should be shown as grid.

I then created three seperate forms again having networkcards and disk show as grid.

Finally I created a service which included all three forms.

I'm thinking this isn't the right way to do it because inside the plan I can only generate a service item for the normal form, the grid forms aren't listed and thus I have to set my adaptor to send everything through to CPO in order to get at that data.

Can someone advise me if this is the right way to do it?

--

Ryan

1 Accepted Solution

Accepted Solutions

derevan
Level 4
Level 4

The method I have used to upgrade grids from the service delivery plan is to use a ServiceLink agent configured to use the NSAPI service item CUD methods (Service Item Update Listener Adapter). The key is to use a transformation to take the grid data from the form and convert it to an NS API request. Below is a document I wrote explaining my "Service Item Updater" agent. It requires certain conventions for the dictionary such as having a "Status" attribute, but this can be adjusted depending on your needs.

How to Create a Service Item Task for a Grid

Cisco Cloud Portal 9.3.2+

This document describes how to update service items in a grid using a ServiceLink agent.

The SIBG (Service Item Based Grid) dictionary should only include those properties you want to update plus an additional field called Status.

Status for each row can have a value of New, Update, Delete or blank. Rows in the grid with a blank Status value (or any other value for that matter) will remain untouched. Form rules that invoke JavaScript are used to set the appropriate status value for each row as users interact with the form.  An example of this can be found in the Modify Organization service in the MultiCloud Accelerator Kit for CIAC Starter Edition.

The form containing the dictionary needs to have each of the display property for editable on server side only disabled (ie. unchecked). Be mindful that hidden properties default to this option being checked, so you need to uncheck this option.

Service Item Updater Agent

Outbound Adapter: HTTP/WS Adapter

   WSDL:  http://localhost:8089/IntegrationServer/webservices/wsdl/ServiceItemTaskService.wsdl

   WSDL Operation:   ServiceItemTaskServiceHttpBinding.processMessage

   Routing URL: http://localhost:8089/IntegrationServer/services/TaskService

Inbound Adapter: Service Item Listener Adapter

Outbound Parameters

  ServiceItemName -- The Name of the Service Item (no "Si" prefix")

  Dictionary -- Name of SIBG (Service Item Based Grid Dictionary)

  OUName -- Name of org for assignment

  UpdateType -- New, Update or Delete

To accommodate all three types for a single grid, the service delivery plan needs to call this agent three times (one for each update type). A service that simply adds or delete rows would only need to call the agent once for that update type.

Outbound Transformation: Service Item Updater Transformation (for NSAPI)

Generates an NSAPI request to create, update or delete one or more service items. Agent parameter "UpdateType" determines the operation: New, Update, Delete. Other agent parameters include the SI name and the name of the SIBG (Service Item Based Grid) to use for the updates. The SIBG must include a Status column for matching the update type.

Request Transformation:

    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

    xmlns:ext="http://externaltask.api.newscale.com"

>

 

 

 

 

 

 

 

   http://schemas.xmlsoap.org/soap/envelope/" xmlns:ext="http://externaltask.api.newscale.com">

   

     

     

        

        

        

        

         

           

             

               

             

           

           

             

               

            

         

         

           

             

           

         

        

      

     

   

  

 

 

   

      

      

      

        

         

         

           

              

                

                  

                  

               

              

           

           

              

              

           

         

        

       

   

 

 

   

      

      

      

        

         

         

                

                  

                  

               

         

        

       

   

 

View solution in original post

4 Replies 4

derevan
Level 4
Level 4

The method I have used to upgrade grids from the service delivery plan is to use a ServiceLink agent configured to use the NSAPI service item CUD methods (Service Item Update Listener Adapter). The key is to use a transformation to take the grid data from the form and convert it to an NS API request. Below is a document I wrote explaining my "Service Item Updater" agent. It requires certain conventions for the dictionary such as having a "Status" attribute, but this can be adjusted depending on your needs.

How to Create a Service Item Task for a Grid

Cisco Cloud Portal 9.3.2+

This document describes how to update service items in a grid using a ServiceLink agent.

The SIBG (Service Item Based Grid) dictionary should only include those properties you want to update plus an additional field called Status.

Status for each row can have a value of New, Update, Delete or blank. Rows in the grid with a blank Status value (or any other value for that matter) will remain untouched. Form rules that invoke JavaScript are used to set the appropriate status value for each row as users interact with the form.  An example of this can be found in the Modify Organization service in the MultiCloud Accelerator Kit for CIAC Starter Edition.

The form containing the dictionary needs to have each of the display property for editable on server side only disabled (ie. unchecked). Be mindful that hidden properties default to this option being checked, so you need to uncheck this option.

Service Item Updater Agent

Outbound Adapter: HTTP/WS Adapter

   WSDL:  http://localhost:8089/IntegrationServer/webservices/wsdl/ServiceItemTaskService.wsdl

   WSDL Operation:   ServiceItemTaskServiceHttpBinding.processMessage

   Routing URL: http://localhost:8089/IntegrationServer/services/TaskService

Inbound Adapter: Service Item Listener Adapter

Outbound Parameters

  ServiceItemName -- The Name of the Service Item (no "Si" prefix")

  Dictionary -- Name of SIBG (Service Item Based Grid Dictionary)

  OUName -- Name of org for assignment

  UpdateType -- New, Update or Delete

To accommodate all three types for a single grid, the service delivery plan needs to call this agent three times (one for each update type). A service that simply adds or delete rows would only need to call the agent once for that update type.

Outbound Transformation: Service Item Updater Transformation (for NSAPI)

Generates an NSAPI request to create, update or delete one or more service items. Agent parameter "UpdateType" determines the operation: New, Update, Delete. Other agent parameters include the SI name and the name of the SIBG (Service Item Based Grid) to use for the updates. The SIBG must include a Status column for matching the update type.

Request Transformation:

    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

    xmlns:ext="http://externaltask.api.newscale.com"

>

 

 

 

 

 

 

 

   http://schemas.xmlsoap.org/soap/envelope/" xmlns:ext="http://externaltask.api.newscale.com">

   

     

     

        

        

        

        

         

           

             

               

             

           

           

             

               

            

         

         

           

             

           

         

        

      

     

   

  

 

 

   

      

      

      

        

         

         

           

              

                

                  

                  

               

              

           

           

              

              

           

         

        

       

   

 

 

   

      

      

      

        

         

         

                

                  

                  

               

         

        

       

   

 

That's a processes and a half. I was hoping it was something simple.

For now I can just pass the whole form data XML through to the CPO process and just create a service item based around the non grid form items. I know it's cheating but I'm still leaning and want to keep it simple.

I guess the other path is using a bundle but again I'm not sure how to tie each item together and it would result in multiple orchestration calls within CPO.

Ryan

Sent from Cisco Technical Support iPad App

A thought,

Can I pass the entire grid form data to CPO and get a process there to call the integration service on CSP to create the service items instead? Considering I need to process said service items in CPO anyway?

Ryan

Sent from Cisco Technical Support iPad App

Yes, this is an approach that is somewhat commonplace, especially when there's the need to iterate over a dataset.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: