Topic
  • 2 replies
  • Latest Post - ‏2013-10-17T16:22:29Z by MatteoMarzuola
MatteoMarzuola
MatteoMarzuola
11 Posts

Pinned topic ICN 2.0.2 create table for non statndard object model

‏2013-10-17T14:00:14Z |

Hi all,

I am trying to develop a new plugin fetaure that provides a mechanism of real time monitoring on the number of work items in the public queues of some Application Spaces.

I have implemented a service that retrieves in each inbaskets the number of workitem. Now I would rendering this information in a simple table with three columns (App. space name, queue name, number of work item).

I started from the SamplePluginFeature where in the content pane there is a simple search in repository and a result area of ContentList dojo type; each item is an istance of ContentItem beacause the result are documents in the repositoty.

In my case, I haven't any standard object model but only simple information to render in the result area.

Which is the best widget to use for this goal?

I tried to use the same widget that comes with the SamplePluginFeature, but I have some errors (javascript and servers side) beacause each row id that I have created in the table is not a repository object id (I haven't any object).

Thanks in advance

 

  • damorris
    damorris
    825 Posts

    Re: ICN 2.0.2 create table for non statndard object model

    ‏2013-10-17T15:32:58Z  

    ContentList is the right widget.  You just need to format your service return so that it's in the ResultSet model.  There should be helper Java classes in ICN 2.0.2 now to generate the JSON response properly,

  • MatteoMarzuola
    MatteoMarzuola
    11 Posts

    Re: ICN 2.0.2 create table for non statndard object model

    ‏2013-10-17T16:22:29Z  
    • damorris
    • ‏2013-10-17T15:32:58Z

    ContentList is the right widget.  You just need to format your service return so that it's in the ResultSet model.  There should be helper Java classes in ICN 2.0.2 now to generate the JSON response properly,

    Hi Dana,

    I already tried using the JSONResultSetResponse, but when I build each row I have to insert an id_row (in the sample plugin the id is the concatenation of class name, object store id and doc id); in my test the row_id is row_X.

    The json response is:

    {"pageSize":200,"magazineColumns":[],"rows":[{"privileges":0,"attributes":{"workItemsNumber":[1,"xs:integer",null,"1"],"queueName":["MKL_Distacchi","xs:string",null,"MKL_Distacchi"]},"name":"row_1","id":"row_1","mimetype":null},{"privileges":0,"attributes":{"workItemsNumber":[4,"xs:integer",null,"4"],"queueName":["MKL_PromesseDiPagamento","xs:string",null,"MKL_PromesseDiPagamento"]},"name":"row_2","id":"row_2","mimetype":null},{"privileges":0,"attributes":{"workItemsNumber":[7,"xs:integer",null,"7"],"queueName":["MKL_Variazioni","xs:string",null,"MKL_Variazioni"]},"name":"row_3","id":"row_3","mimetype":null},{"privileges":0,"attributes":{"workItemsNumber":[14,"xs:integer",null,"14"],"queueName":["MKL_PrestazioniNonAPreventivo","xs:string",null,"MKL_PrestazioniNonAPreventivo"]},"name":"row_4","id":"row_4","mimetype":null},{"privileges":0,"attributes":{"workItemsNumber":[14,"xs:integer",null,"14"],"queueName":["MKL_PostaEContratti","xs:string",null,"MKL_PostaEContratti"]},"name":"row_5","id":"row_5","mimetype":null},{"privileges":0,"attributes":{"workItemsNumber":[11,"xs:integer",null,"11"],"queueName":["MKT_Distacchi","xs:string",null,"MKT_Distacchi"]},"name":"row_6","id":"row_6","mimetype":null},{"privileges":0,"attributes":{"workItemsNumber":[376,"xs:integer",null,"376"],"queueName":["MKT_PromesseDiPagamento","xs:string",null,"MKT_PromesseDiPagamento"]},"name":"row_7","id":"row_7","mimetype":null},{"privileges":0,"attributes":{"workItemsNumber":[3,"xs:integer",null,"3"],"queueName":["MKT_VariazioneRecapito","xs:string",null,"MKT_VariazioneRecapito"]},"name":"row_8","id":"row_8","mimetype":null},{"privileges":0,"attributes":{"workItemsNumber":[4,"xs:integer",null,"4"],"queueName":["MKT_VariazioneAnagrafica","xs:string",null,"MKT_VariazioneAnagrafica"]},"name":"row_9","id":"row_9","mimetype":null},{"privileges":0,"attributes":{"workItemsNumber":[187,"xs:integer",null,"187"],"queueName":["MKT_IstanzeRientriTutelato","xs:string",null,"MKT_IstanzeRientriTutelato"]},"name":"row_10","id":"row_10","mimetype":null},{"privileges":0,"attributes":{"workItemsNumber":[85,"xs:integer",null,"85"],"queueName":["MKT_DisdetteECessazioni","xs:string",null,"MKT_DisdetteECessazioni"]},"name":"row_11","id":"row_11","mimetype":null},{"privileges":0,"attributes":{"workItemsNumber":[2,"xs:integer",null,"2"],"queueName":["ATO2_Distacchi","xs:string",null,"ATO2_Distacchi"]},"name":"row_12","id":"row_12","mimetype":null},{"privileges":0,"attributes":{"workItemsNumber":[0,"xs:integer",null,"0"],"queueName":["ATO2_PromesseDiPagamento","xs:string",null,"ATO2_PromesseDiPagamento"]},"name":"row_13","id":"row_13","mimetype":null},{"privileges":0,"attributes":{"workItemsNumber":[98,"xs:integer",null,"98"],"queueName":["MKT_VariazioneRetroattivaResidenza","xs:string",null,"MKT_VariazioneRetroattivaResidenza"]},"name":"row_14","id":"row_14","mimetype":null}],"columns":{"cells":[[{"width":"200px","sortable":true,"field":"queueName","name":"Nome coda pubblica"},{"width":"125px","sortable":true,"field":"workItemsNumber","name":"Numero attivit\u00e0 in coda"}]]}}

    In the content pane of the custom feature it is displayed the table but in server log there are these errors (one for each row):

    com.ibm.ecm.struts.actions.p8.P8GetItemAction.executeAction()
    com.filenet.api.exception.EngineRuntimeException: FNRCE0007E: E_BAD_PARAMETER: Invalid input parameter: Name=id, Value=row_12

        at com.filenet.api.util.Id.<init>(Id.java:75)
        at com.ibm.ecm.util.p8.P8Util.getPersistableObject(P8Util.java:1043)
        at com.ibm.ecm.util.p8.P8Util.getPersistableObject(P8Util.java:1014)
        at com.ibm.ecm.struts.actions.p8.P8GetItemAction.executeAction(P8GetItemAction.java:143)
        at com.ibm.ecm.struts.actions.p8.P8BaseAction.executeBaseAction(P8BaseAction.java:187)
        at com.ibm.ecm.struts.actions.BaseAction.execute(BaseAction.java:181)
        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
        at com.ibm.ecm.struts.controller.ControllerServlet.process(ControllerServlet.java:234)

    When I click in the rows (left or right click) there are javascript errors (all related that a document object is expected )