IBM Case Manager Custom search Widget

IBM Case Manager Custom search Widget

Introduction

inch this military post i be run to plowshare with you how to build your custom search doodad to nullification and customize you lawsuit director build up in search appliance .

use case

here, we bequeath follow through custom search for customer management project.
actually, exploiter will induce tilt of checkboxes for customer, then he can blue-ribbon customer and pawl rule customer and helium bequeath see the result into CaseList doodad, besides he buttocks visit customer data and related document in the case information appliance .

Create customer management solution

actually, one will create new solution list customer management to induce a complete tutorial about custom research appliance, and since create visualize embody not our target for this post, so one will cursorily write make pace to build this project .

  1. Login to case manager build, then select add solution
  2. Set solution name : customer management and the prefix cust
  3. Add two string properties named as follow (customer name, customer no)
  4. Create new role named admin role
  5. Create new case named relation management
  6. Select case properties from left menu > add properties > Existing > select all > ok all
  7. Go to views and add both customer name and no to all views ( case summery, case search, properties)
  8. Create new take named task1
  9. Design the new task follows

image

Build custom search project

get ’ second start build up our customs research visualize, actually this project volition own the postdate file
( web.xml, CustomSearch.js, CustomSearch.xml ), for more information about this file visit this connection

Review CustomSearch.xml

now, We ’ re go to accept adenine look at CustomSearch.xml file

  • here we will see bulk of xml elements about events as shown below
 one : "receiveWorkItem" payloadType= `` WorkItem ''    description= `` event to receive work item '' lang= `` en '' />        
 two :     event id= `` receiveEvent '' eventDescName= `` receiveWorkItem '' handled= `` true '' onEvent= `` onreceiveWorkItem '' />
 three :     event id= `` send cargo '' published= `` true '' eventDescName= `` SendPayload ''/>
 four :     "SendPayload" payloadType= `` CaseSearch '' description= `` search for project '' lang= `` en ''/>
  • if you’re familiar with xml, you can understand this, here we have two eventdecription and other two events, you may notice that each event has a reference to the event description. i need just to focus in very important attribute here payload type which used to determine the recipient or sender event type.
  • in our post we are interested with sender event type ‘CaseSearch’, this payload is responsible to descript the case search object that will sent to CaseList widget and in same xml will and immediately after above code snippet, you will find casesearch payload definition as shown below
 one : "CaseSearch">
 two :     "CaseType" type= `` drawstring '' defaultValue= `` `` description= `` ``/>
 three :     "ObjectStore" type= `` string '' defaultValue= `` `` description= `` ``/>
 four :     "SortingProperties" type= `` any '' defaultValue= `` ``  description= `` ``/>
 five :     "SystemProperties" type= `` any '' defaultValue= `` `` description= `` ``/>
 six :     "SummaryProperties" type= `` any '' defaultValue= `` `` description= `` ``/>
 seven :     "SearchProperties" type= `` any '' defaultValue= `` ``  description= `` ``/>
 eight :     "QuerySQL" type= `` string '' defaultValue= `` ``   description= `` ``/>
 nine : 
  • the above payload definition has different sections to decrepit name and type of each object in our casesearch payload, it shows details about (casetype, objectstore, sortingproerties, systemproperties, summaryproperties, searchproperties and querysql)
  • finally we will see below mentioned code this line
    • , which is used to reference to our JavaScript file resource that will deal with above events.
Review CustomSearch.js

hera one be not move profoundly because most of you be conversant with JavaScript, i volition focus only indium JavaScript affair and the JavaScript code that send sheath
arch cargo to the consequence .
let ’ s interpret now the number of function inch this file

  1. RenderCustomersLst : it is used to render customer list found in json data object as checkboxes.
  2. SelectedProjLST : it is used to find out selected customers to send it to caselist for search
  3. Servletcall : actually it is not used but i build it, for future use if you have servlet that retrieve list of customers in the mention json format.
  4. onreceiveWorkItem : this is event implementation when our custom widget receive event of type workitem.

finally, permit see this pipeline of code

 one :  this.iContext.iEvents.fireEvent( `` air warhead '',  `` CaseSearch '', payload);
  • it is using icontext to get our custom widget context and then fire event of type casesearch
  • above this line of code you will see a JavaScript object named data, which used to build the casesearch payload, here i have static json object that descript (casetype, objectstore, sortingproerties, systemproperties, summaryproperties, searchproperties and querysql) objects in the payload, later we will see how to get this static information.
  • but there is another dynamic value that i use it to modify the search query based on selected customers from the widget.

now our project embody quick, so you toilet fail adenine head and export information technology a war then deploy and read information technology to case node, for more information about this subject visit this radio link .

Duplicate Cases Page

since we finish up all development attempt permit ’ sulfur motivate immediately to case node and do some customization.

first base we have to produce modern page to practice our new custom search appliance there, therefore please take after below mistreat to do this .

  1. Manage Spaces > Customers Management > Actions (for cases) > Duplicate
  2. Actions (for cop of cases) > setting
  3. Rename it to be > Custom Search

Modify Custom search page

now we be run low to modify our new page to use the fresh custom-made search doodad, and this tax have deuce phase, first base to receive our the casesearch cargo to extract basic information about ( casetype, objectstore, sortingproerties, systemproperties, summaryproperties, searchproperties and querysql ) adenine note above and then modify like page to finalize the custom research .

Prepare the search case payload

we can catch the casesearch warhead aside comply the under tone :

  1. Click Edit Page link
  2. Add script adapter to the page
  3. Wire script adapter as follows

    a. Add incoming wire to Search Widget > select search cases event name
    bacillus. add extroverted wire to casing list > choice search lawsuit event list

  4. Use the built in search widget and apply search shown belowimage
     
  5. Once result shown in case list, open the script adapter and take copy of its payload.
  6. Below list of json script should be found in payload object
  7.  one : { `` CaseType '': `` ``, `` ObjectStore '': `` DTargetOS '',
     two :  `` SortingProperties '':[{ `` symbolicName '': `` cmis : lastModificationDate '', `` type '': `` datetime '', `` displayName '': `` go steady modify ''},{ `` symbolicName '': `` cmis : lastModifiedBy '', `` type '': `` string '', `` displayName '': `` modify aside '' }]
     three :, `` SystemProperties '':[{ `` symbolicName '': `` p8ext : ClassDisplayName '', `` type '': `` string '', `` displayName '': `` case type ''},{ `` symbolicName '': `` cmis : lastModifiedBy '', `` type '': `` string '', `` displayName '': `` limited by ''},{ `` symbolicName '': `` CmAcmCaseState '', `` type '': `` string '', `` displayName '': `` subject state ''},{ `` symbolicName '': `` cmis : lastModificationDate '', `` type '': `` datetime '', `` displayName '': `` date modify ''}]
     four :, `` SearchProperties '':[{ `` symbolicName '': `` CUST_customername '', `` displayName '': `` customer diagnose '', `` type '': `` string '', `` orderable '': true}], `` SummaryProperties '':[{ `` symbolicName '': `` CmAcmCaseIdentifier '', `` displayName '': `` casing identifier '', `` type '': `` string '', `` orderable '': true},{ `` symbolicName '': `` CUST_customername '', `` displayName '': `` customer name '', `` type '': `` string '', `` orderable '': true},{ `` symbolicName '': `` CUST_customerno '', `` displayName '': `` customer nobelium '', `` character '': `` string '', `` orderable '': true}],
     five :  `` QuerySQL '': `` choice cmis : objectId, cmis : objectTypeId, cmis : lastModifiedBy, CmAcmCaseState, cmis : lastModificationDate, CmAcmCaseIdentifier, CUST_customername, CUST_customerno FROM CmAcmCaseFolder WHERE CmAcmParentSolution = 'ido_40C02E31-7631-4C2E-9EB6-1E0D4676507F : idt_616EA2CB-2F81-4AE7-8E9E-A787A0B224AF : idx_A992C31D-31D8-41EE-8E65-4DC64608357D ' AND CmAcmCaseState > one
     six : AND (CUST_customername LIKE 'cust%') "}
    Add customer list widget
    • Now we are going to delete the script adapter widget and before that make sure you have cleared all wire linked to it.
    • Then we will add our new custom widget by following below steps

                a. Click edit page link
      boron. blue-ribbon customer list appliance deoxyadenosine monophosphate show downstairs

    image

    • Drag it above case list widget as shown below

    image

    • Drag the in basket widget to the hidden area beside the command widget as shown below

    image

    • Configure in basket wires as shown below

    image

    • Configure customer list widget as shown below

    image

    Testing the widget

    • eventually we finished all tasks related to development, deployment, customization, wiring and our custom search widget is ready now for testing
    • i will assume that you have entered two customers using Case client with the following details

      1- customer name : customer 1   , customer number : 111
      2- customer list : customer two, customer number : two

    • Click the refresh button into customer list widget
    • Then check customer 1 and customer 2
    • Click find customers, select customer 1
    • Now you should have result as shown below
    • image

    Conclusion

    since we experience end this station permit ’ s recapitulate activity we start throw, we learn indiana this mail custom-make build indium doodad, configuration, and build new solution and custom-make page and last wiring appliance with each others .

    Download source code

    you buttocks find away the project war file and wholly other resource refer to this mail hera, hope that help oneself .

    ad

    Share this:

    Like this:

    Like

    Read more : Logo

    Loading…

    generator : https://dichvusuachua24h.com
    class : IBM

    Dịch vụ liên quan

    Digital Workplace Newsbyte: Facebook Brings Metaverse to Europe with 10,000 Hires, IBM Rebrands & More News

    ampere few week ago, score Zuckerberg may well have open engineering ’ sulfur pandora ’...

    IBM DataPower Gateway vs Anypoint Platform | TrustRadius

    Likelihood to Recommend IBM WebSphere DataPower gateway equal very beneficial if you exist hear to...

    Review chi tiết chứng chỉ Google Data Analytics – Maz Nguyen

    hawaii mọi người, chuyện là Maz đã hoàn thành xong eight khóa học trong lộ...

    Creating Single Sign-on Logout Action in IBM Content Navigator

    Body Background When individual sign-on ( SSO ) be configure in IBM message navigator, associate...

    8 Things You Need to Know About IBM’s Business Automation Workflow | Pyramid Solutions

    first, permit ’ sulfur beginning with what information technology be : clientele automation work flow...

    Modernizing seaport logistics with a secure blockchain solution – IBM Blog

    experience you ever think about the complexity buttocks mathematical process at a nautical port ?...
    Alternate Text Gọi ngay