Docsity

Curam Developer Customization - Web Services and REST APIs, Exams of Advanced Education

Toggle sidebar
bg1
Curam Developer customizatinon - Web
service/ REST , additional processing
Web services - Curam SPM applications use web services to integrate with external systems
for payments, case processing, address validation, identity intelligence etc
Web services technologies and standards - UDDI- Registry for finding services
WSDL- The location and purpose of service
SOAP- A protocol to transfer messages
HTTP- the most common transport layer
Discovery - UDDI was intended as the discovery protocol so that web services can publish
their location and description centrally so that they are easier to discover. However DDI is
not commonly used and is not appropriate for government agencies
Description - WSDL is an XML based language that describes what the web service does
and where to find it. The WSDL for a web service provides everything a requesting
program needs to use the service
Packaging - SOAP is an XML based protocol that enables the packaging of web service
requests and responses. SOAP uses an envelope construct to specify what is in a message,
who should deal with it, and whether it is optional or mandatory
transport - web service requests that are encoded via SOAP are independent of any
operating system or transport protocol and can be transported by several internet
protocols, such as JMS, SMTP, MIME , and HTTP
Curam provides the following support for web services - -Inbound and outbound web
services ootb
-Course-grained business services for all major functional areas can be exposed as web
services
-Tools for developing inbound and outbound web services
-support for WS standards required by WS-I basic Protocol and WS-Security
-Built on Apache Axis2
Supported WSDL style use models - Curam w Axis2: RCP/literal, Document/literal
Curam w Axis1.4: RCP/encoded, document/literal
Outbound Web Services - -An outbound webservice connector allows Curam SPM
applications to access external applications that have exposed a web service interface
-A client stub (wrapper) is generated from the WSDL file that describes the interface
-Developers implement business logic in a client class (consumer)
pf3
pf4
pf5

Partial preview of the text

Download Curam Developer Customization - Web Services and REST APIs and more Exams Advanced Education in PDF only on Docsity!

Curam Developer customizatinon - Web

service/ REST , additional processing

Web services - Curam SPM applications use web services to integrate with external systems for payments, case processing, address validation, identity intelligence etc Web services technologies and standards - UDDI- Registry for finding services WSDL- The location and purpose of service SOAP- A protocol to transfer messages HTTP- the most common transport layer Discovery - UDDI was intended as the discovery protocol so that web services can publish their location and description centrally so that they are easier to discover. However DDI is not commonly used and is not appropriate for government agencies Description - WSDL is an XML based language that describes what the web service does and where to find it. The WSDL for a web service provides everything a requesting program needs to use the service Packaging - SOAP is an XML based protocol that enables the packaging of web service requests and responses. SOAP uses an envelope construct to specify what is in a message, who should deal with it, and whether it is optional or mandatory transport - web service requests that are encoded via SOAP are independent of any operating system or transport protocol and can be transported by several internet protocols, such as JMS, SMTP, MIME , and HTTP Curam provides the following support for web services - - Inbound and outbound web services ootb

  • Course-grained business services for all major functional areas can be exposed as web services
  • Tools for developing inbound and outbound web services
  • support for WS standards required by WS-I basic Protocol and WS-Security
  • Built on Apache Axis Supported WSDL style use models - Curam w Axis2: RCP/literal, Document/literal Curam w Axis1.4: RCP/encoded, document/literal Outbound Web Services - - An outbound webservice connector allows Curam SPM applications to access external applications that have exposed a web service interface
  • A client stub (wrapper) is generated from the WSDL file that describes the interface
  • Developers implement business logic in a client class (consumer)

*the consumer connects to the web service by using the stub *The consumer handles the data that is returned from the web service Steps for building outbound web services using Axis2 - - Include the WSDL file in our components file system (add to EJBServer\compnents\custom\axis

  • Add to the location of the WSDL file to ws_outbound.xml
  • generate the web service stubs from the WSDL file (build wsconnector2)
  • Create a client(consumer) and invoke the web service (client uses generated stubs)
  • test Inbound Web services - - Inbound web services exposes the functionality within the Curam SPM application to other internal or external applications within the network.
  • Developers write business logic for the web service
  • Infrastructure generates necessary deployment artifacts and packages them for redeployment
  • Once deployed, any external party that wishes to communicate with the Curam SPM application will have to implement the appropriate client functionality defining Inbound web services - - model the inbound web service (model the class as wsinbound and add operations
  • build the server application as normal (generates WSDL, stub, and other outputs)
  • implement the business logic for the server
  • build the web services EAR file and install in the app server
  • provide security information for the service REST - an architectural principle to 'manipulate representations of Web resources using a uniform set of stateless operations' REST cont. - Clients and servers exchange representations of resources in self descriptive messages over HTTP REST APIs provide CRUD operations for resources - Create (POST) Read(GET) Update(PUT) Delete(DELETE)
  • resources can be described in JavaScript Object Notation (JSON) Swagger - a specification for documenting REST APIs using JSON
  • view the API 5.Test and troubleshoot API references - - web services reference guide
  • Integrating curam rest API
  • Developing curam rest API guide
  • IBM curam REST API accelerator Supported processing types in Curam - Online Deferred Timed Event Based Workflow Batch Deferred processes - - executed asynchronously
  • Curam uses deferred processes for time consuming tasks that are invoked online such as: Authorizing programs, approving cases, and checking eligibility curam provides the following elements to support deferred processing - - Enactment service engine
  • deferred processing tables
  • deferred processing queues, which are implemented in the application server or by using JMS lite in a dev environment Developing a deferred process steps - - model the deferred process
  • implement the deferred process
  • add the deferred process to the DPProcess table
  • write code to enact the deferred process
  • test and troubleshoot Model the Deferred process - model for BPO
  • Specify parameters for the following attributes: *ticketID(long): Ticket ID of the DPTicket record generated by DP Engine *inst_data_id(long): Instance ID of the WMInstanceData record *flag(boolean): Used by the DP infrastructure Add deferred process to the DPProcess Table - - Deferred processes must be defined in the DPProcess table (the entry associates the process name with its implementation)
  • Load the process from a DMX file when a deferred process fails to complete successfully - 1. retry for the maximum redelivery attempts that are configured
  1. if it still fails, add an item to the DPError queue
  2. invoke the callback handler to notify the client and take some action

Error handling can be configured in two ways: - - Global error handler callback

  • error handling for a specific deferred process implement error handling - curam.util.deferredprocessing.impl.DPCallback.dpHandleError
  • set the property for the name of the handler Event Handling implements the Observer pattern - - the observers or listeners register to receive events from the subject
  • The subject simply raises an event to inform its observers
  • the subject requires no knowledge of the observers' intentions Curam provides two mechanisms for implementing events - - Persistence Infastructure events
  • Event (EVX) files Developers can perform the following tasks for EVX - - Define custom listeners to add custom code for OOTB events
  • Define custom events, listeners, and raise events Defining Events and Event Handlers - - Define the event in an EVX file
  • Define event handlers and filters in handler_config.xml
  • build evgen then build database
  • write code to raise event
  • write code for the event filter and event handler Defining an Event- EVX file - EVX files are stored in the events subdirectory of the component, for ex: EJBServer/components/core/events/Person.evx Define Event Handlers and Filters - Define the event handler and filter in handler_config.xml:
  • Define in EJBServer\components<component>\events
  • handler_config.xml files are merged based on component order
  • Specify the fully qualified name of the handler and filter
  • List the event classes for which the handler is registered Event handler builds - build evgen generates:
  • A java class to allow you to access the event in your code, which is generated to EJBServer\build\svr\events\gen\package
  • DMX files to load the event definitions into the database, which are generated to EJBServer\build\svr\events\gen\package Refresh Eclipse to compile generated class Build database (to load DMX files into EventClass and EventType tables)
  • check the BatchLauncher<Date_Time>.log file for errors Batch streaming architecture - - You can run multiple instances of streams of the same batch process to process chunks of records on different processors
  • The chunk size and stream commit size are configurable
  • Each chunk is processed in a separate database transaction, which provides commit-point processing
  • Ensure that no dependencies exist between chunks Chunking and Streaming Operation - - The chunker separates the data into chunks and hands control to the Batch Stream Helper
  • The batch Stream Helper then passes chunks of data to streams
  • Once each Stream completes, control returns to the chunker to finish the job Batch Classes - - Chunker class
  • Stream class
  • wrappers are required to implement the batch iterfaces
  • chunker wrapper
  • stream wrapper Developing a batch job - - model batch(chunk) job and streaming job
  • add an entry to the BatchProcessName code table
  • Define streaming properties in Application.prx
  • Code the batch(chunk) job class and wrapper
  • Code the streaming job class and wrapper
  • test
  • Configure an ant task and job administration Streaming configuration - - Define properties for the batch job in application.prx in your custom component
  • Review the properties in line with changes to the associated dataset
  • The OOTB application.prx file cotains global properties for wait intervals and batch tracing