Parameters for the Resource handler pattern

Worklight
Pattern parameter Default Description
Worklight version Worklight v5.0

Specifies the target version of Worklight for the generated notification adapter. This pattern only supports Worklight v5.0.

Adapter description Worklight integration adapter

Additional information about the adapter, which is displayed in the Worklight Console.

Maximum concurrent connections 99

The maximum number of concurrent requests that can be performed on the service.

Enable audit Selected

Defines whether calls to the procedure should be logged in the Worklight audit log or not. The log file is /server/log/audit/audit.log starting in the Worklight Root Directory.

Service Configuration
Pattern parameter Default Description
Resource name

Name of the resource that will be accessed from this pattern instance - examples include Car, Person and InventoryItem. This name is used to construct the procedure names that are invoked by the mobile application - for example createCar and readInventoryItem.

Resource operations Full control (CRUD)

Select the combination of resource operations for this pattern instance. Three common choices are provided: Read only (R), Full control (CRUD) and Read and update (RU).

Read only is the simplest scenario, it provides no update mechanism to a set of resources.

Full control allows the mobile application to have complete control over the life cycle of the resources.

Read and update is useful for scenarios where the life cycle of the resources, particularly creation and deletion, is handled outside of the pattern instance. In this case, the creation and deletion of resources may be handled by direct updates on the back end application, not through the mobile application.

Cache results Cleared

If this box is checked, then whenever an instance of the resource is read, it is held in a cache. Any subsequent reads will return the resource without invoking the handler subflow. If an update or delete operation is invoked for a resource that is in the cache, then it will be removed from the cache.

Server address http://localhost:7080 This pattern parameter defines the server address, which is used as the HTTP address element in the generated adapter. Set the parameter to the actual HTTP URL at which the service is to be deployed. For testing purposes this address is often set to http://localhost:7080.
Security (LDAP)
Pattern parameter Default Description
Security required Cleared

This pattern parameter determines whether the resources are protected using an LDAP server.

If security is enabled, the mobile application must provide a user ID and password. The LDAP server is checked to verify that the password is correct (authentication) and that the user is in an appropriate group to access the target resource (authorization). There may be different groups for reading and writing (update, create, delete) resources.

Connection details ldap://localhost:389

Set the LDAP connection string using the following syntax:

ldap[s]://server[:port]

ldap:
(Required) Fixed protocol string.
s:
(Optional) Specifies whether SSL should be used. Default is not to use SSL.
server:
(Required) The name or IP address of the LDAP server to contact.
port:
(Optional) The port to connect to. Default is 389 (non-SSL). For LDAP servers with SSL enabled, the port is typically 636.

At deployment time, it is recommended to set an LDAP user ID and password using mqsisetdbparms. Message Broker will use these credentials to login into the LDAP server to perform authentication. If a user ID and password are not configured, Message Broker will bind to the LDAP server anonymously.

Authenticate users by searching in this directory tree location (dn) ou=users,o=ibm.com

This pattern parameter identifies a location in the LDAP directory tree. The location is used to authenticate requests made from Worklight to WebSphere Message Broker.

The mobile application provides a user ID and password when it makes a resource request (CRUD) to Worklight. The Worklight adapter generated by this pattern, adds this user ID and password to an HTTP basic authentication request to Message Broker. Message Broker searches the directory tree for the provided user ID starting from this location. If the user ID is found in the directory, the request is successfully authenticated and the resource request proceeds. If the user is not found, authentication fails and the request is returned to Worklight with an error message.

If users exist in different subtrees of the directory, specify a common parent location under which a search can find all relevant user IDs, and enable the search scope pattern parameter to search subtrees.

Directory search scope for authentication Allow directory subtrees to be searched

Defines whether subtrees can be searched to locate users for authentication. A subtree search is required if users are located in children of the authentication location in the directory tree. Limit searches to the specified directory location if users are always located in the authentication directory tree location.

Authenticate user IDs by matching against this LDAP attribute Unique identifier (uid)

The name of the attribute in the LDAP directory entry that matches the user ID provided by the mobile application. Three options are provided that match the common use cases of matching against the unique identifier (uid), email address (mail) and common name (cn).

Authorize readers by checking the members of this group (dn) cn=readers,ou=groups,o=ibm.com

Distinguished name of the group in which users must be members to be granted access to the read procedure. Subtrees of this directory entry are not searched.

Authorize writers by checking the members of this group (dn) cn=writers,ou=groups,o=ibm.com

Distinguished name of the group in which users must be members to be granted access to the create, update or delete procedures. Subtrees of this directory entry are not searched.

Logging
Pattern parameter Default Description
Logging required Cleared This pattern parameter determines whether the pattern instance includes the subflow for logging.

If this pattern parameter is cleared, the logging subflow is not included.

If this pattern parameter is selected, you must set values for Log queue manager and Log queue.

Log queue manager This pattern parameter defines the queue manager that is used for logging. You can leave this parameter blank if the broker queue manager is used for logging.

This pattern parameter is required only if Logging required is selected.

Log queue LOG This pattern parameter defines the queue that is used for logging.

This pattern parameter is required only if Logging required is selected.

Error handling
Pattern parameter Default Description
Error message required Selected This pattern parameter determines whether the pattern instance includes code for placing error messages on a queue.

If this pattern parameter is selected, values must be set for Error queue manager and Error queue.

Error queue manager This pattern parameter defines the queue manager that is used for error logging.

This pattern parameter is required only if Error message required is selected.

Error queue ERROR This pattern parameter defines the queue that is used for error messages.

This pattern parameter is required only if Error message required is selected.

General
Pattern parameter Default Description
Flow prefix This pattern parameter defines the prefix that is added to the start of all message flow names.
Flow suffix This pattern parameter defines the suffix that is added to the end of all message flow names.
Queue prefix This pattern parameter defines the prefix that is added to the start of all queue names.

If default queue names are used, the prefix, suffix, or both, must be set to identify queue names for each pattern instance.

Queue suffix This pattern parameter defines the suffix that is added to the end of all queue names.

If default queue names are used, the prefix, suffix, or both, must be set to identify queue names for each pattern instance.

Short description This pattern parameter defines the description that is added to the Short description property of all message flows that are generated.
Long description This pattern parameter defines the description that is added to the Long description property of all message flows that are generated.

All the pattern parameters are listed with their default values. Where no default is indicated, the default value is an empty string.

Back to the Resource handler pattern specification