Monday, 16 February 2015

IBM Case Manager Solution Deployment (Exporting and Importing)

IBM Case Manager Solution Deployment (Exporting and Importing) through Commends 

Deploying solution from one system to another system 

(Example : Dev -> UAT or Dev -> Prod )
  

1. Export Solution (Ex: Dev): The exportSolution command exports a case management solution or solution template from the development environment domain before you move the solution to another environment.

Syntax: 

configmgr_cl exportSolution -profile myprofile 
 -solutionName solution_name | -solutionTemplateName template_name 
 -solutionPackage package_file

Example: 

Unix or AIX: 

1st step:  Change current directory

cd /installed path/CaseManagement/configure/

2nd Step: Execute below export command 

configmgr_cl exportSolution -profile Dev123 -solutionName "Sample" -solutionPackage "/opt/Solutions/Soultion_16Feb15.zip" 

Windows:

1st step: Change Current directory

cd C:\Program Files\IBM\CaseManagement\configure\

2nd Step: Execute below export command

configmgr_cl exportSolution -profile Dev123 -solutionName "Sample" -solutionPackage "C:\Solutions\Soultion_16Feb15.zip" 

  • Sample is a solution name
  • Dev123 is a profile name (The full path to the profile directory, such as "C:\Program Files\IBM\CaseManagement\configure\profiles\Dev123" (For Windows) or "/opt/IBM/CaseManagement/configure/profiles/Dev123"(For UNIX or AIX)).
  • "C:\Solutions\Soultion_16Feb15.zip" and "/opt/Solutions/Soultion_16Feb15.zip"  are
    Specify the full path and file name for the exported solution package ZIP file. If the path includes spaces, put the entire path in double quotation marks.

2. Copying (Dev  to UAT or Prod): After Export the solution Soultion_16Feb15.zip file is created in Dev, need to copy the above zip file in Prod or UAT

3. Import Solution (UAT or Prod): The importSolution command imports a case management solution or solution template package into another environment.

Syntax: 

 configmgr_cl importSolution -profile myprofile -projectAreaName project_area_name -solutionPackage package_file


Example: 

Unix or AIX: 

1st step:  Change current directory

cd /installed path/CaseManagement/configure/

2nd Step: Execute below export command 

configmgr_cl importSolution -profile myDevelop1 -solutionPackage "/opt/Solutions/Soultion_16Feb15.zip"
 
(or)

 configmgr_cl importSolution -profile myDevelop1 -projectAreaName prodProjectArea -solutionPackage "/opt/Solutions/Soultion_16Feb15.zip

Windows:

1st step: Change Current directory

cd C:\Program Files\IBM\CaseManagement\configure\

2nd Step: Execute below export command


configmgr_cl importSolution -profile myDevelop1 -solutionPackage "C:\Solutions\Soultion_16Feb15.zip"
 
(or)

 configmgr_cl importSolution -profile myDevelop1 -projectAreaName prodProjectArea -solutionPackage "C:\Solutions\Soultion_16Feb15.zip"

  • prodProjectArea is Specifies the name of the project area for the solution. This option is valid only for importing a solution package to into another development environment
  • myDevelop1 is a profile name (The full path to the profile directory, such as "C:\Program Files\IBM\CaseManagement\configure\profiles\Dev123" (For Windows) or "/opt/IBM/CaseManagement/configure/profiles/Dev123"(For UNIX or AIX)).
  • "C:\Solutions\Soultion_16Feb15.zip" and "/opt/Solutions/Soultion_16Feb15.zip"  are
    Specify the full path and file name for the exported solution package ZIP file. If the path includes spaces, put the entire path in double quotation marks




Thursday, 12 February 2015

Create a Document with Content (CE API)

Create a Document with Content (CE API)
-----------------------------------------------------------

//Get CE Connetcion
//Create Subject
//Push Subject

//Get Domain (domain)
ObjectStore os = null;
objectStoreName = "COS"
os = Factory.ObjectStore.fetchInstance(domain, objectStoreName, null); 


 //Get Folder
 Folder folder=null;
 folderName = ''/Sample";
folder=Factory.Folder.fetchInstance(os, folderName, null); 


 //Get the File details
InputStream file = "";
String fileName = "";
int fileSize = "";
 
// Create Document

String docClass = "dcumnet class name";
Document doc = Factory.Document.createInstance(os, docClass); 
if (file != null && fileSize > 0) {
                        ContentTransfer contentTransfer = Factory.ContentTransfer.createInstance();
                        contentTransfer.setCaptureSource(file);
                        contentElementList.add(contentTransfer);
                        doc.set_ContentElements(contentElementList);
                        contentTransfer.set_RetrievalName(fileName);                       
                        doc.set_MimeType(getMimetype(fileName));
                    }
                   


//Check-in the doc
doc.checkin(AutoClassify.DO_NOT_AUTO_CLASSIFY,CheckinType.MAJOR_VERSION);                   
//Get and put the doc properties
String documentName =""
Properties p = doc.getProperties();
p.putValue("DocumentTitle","abcd");
p.putValue("Name","Rakesh");
p.putValue("Number","01234"); 

              

doc.save(RefreshMode.REFRESH);

//Stores above content to the folder

 ReferentialContainmentRelationship rc = folder.file(doc,
                                    AutoUniqueName.AUTO_UNIQUE,
                                    documentName,
                                    DefineSecurityParentage.DO_NOT_DEFINE_SECURITY_PARENTAGE);

 rc.save(RefreshMode.REFRESH);




 

Wednesday, 11 February 2015

Security to Objects

Normally, an object's security is controlled or determined in four ways. (Markings, if they are used, would be a fifth way)

  1. Security parent and inheritance: Permissions can also be inherited from a parent object. Inheritance can take place between a class and its subclass, and between a folder and its containable objects (documents, custom objects, and other folders).
     
  2. Direct Security: Users who have sufficient permission can edit an object's security by directly adding or removing security principals, or by changing the existing permissions already granted.
     
  3. Default Instance Security : As an integral part of the class and instance design, objects such as documents, folders, and events are instances of their class. The class includes, among other things, a property containing the default security permissions that will be applied to all instances of the class. This is the simplest method of applying security: the security design sets up the default security that all instances of a class should have, and then all objects based on that class will have the same default security.
     
  4. Security Policy and security templates : Security policies contain security templates which let you automatically apply security to documents, folders, and custom objects. In the case of documents, security templates can be associated with one of the several versioning states that documents pass through (Released, Superseded, In Process, or Reservation). This powerful feature provides efficient application of fine-tuned security across many objects.
     
  5. Marking Sets : FileNet Content Engine (CE) Markings or Marking Sets provides a way to define a level of security on objects (i.e. documents) in addition to the normal FileNet P8 object security model. By using markings, access to objects can be controlled based on specific property value. Marking set's are collection of CE objects known as marking objects. Marking sets allows setting up security on an object with means of property template. When a marking is applied to an object, the resulting access permissions for the object are a combination of the settings of its original access permissions (through ACL) and the settings of the markings 'Constraint Mask' for each marking that is applied to it. The result of this combination is the effective security mask.

Domain and GCD (FileNet CE)

Domain and GCD(Global Configuration Database)

The business content and processes associated with an IBM FileNet Content Manager implementation are organized into a logical grouping called a P8 domain. The definition of the P8 domain is stored in a database known as the global configuration database (GCD).

The GCD stores information about the following items:

  1. Object stores and any workflow systems that have been defined for the P8 domain
  2. A P8 domain can have one or more content stores, known as object stores, and one or more workflow systems. The role of an object store is to store business-related content. A workflow system is a repository for storing and managing process-related information.
  3. Configuration information that is common to all object stores and workflow systems, such as the LDAP configuration used with the environment
  4. Components that are available for reuse within the environment, such as fixed content storage devices and marking sets Fixed content storage devices are a specific class of storage device, for example, IBM Tivoli® Storage Manager that is defined once within a P8 domain, but that can be used by any or all of the object stores to store content.
  5. A marking set is a special construct used to enhance the security model that can be applied to an object store.
  6. Logical grouping of components to support distributed configurations

Tuesday, 10 February 2015

Search CE Object using SearchSQL (Content Engine API)

Search CE Object

  Note* : first fetch the Object Store 
 

 public ArrayList getCEObjects(String filterParams, String[] resultParams, String ObjectClassName, boolean includeSubClass)
  {
    log.debug("ENTRY ");
    String searchClassScope = includeSubClass ? "INCLUDESUBCLASSES" : "EXCLUDESUBCLASSES";
    String searchQuery = "";

    for (int i = 0; i < resultParams.length; i++) {
      if (i == 0)
        searchQuery = resultParams[i];
      else {
        searchQuery = searchQuery + "," + resultParams[i];
      }
    }
    String searchQ = "SELECT " + searchQuery + " FROM " + ObjectClassName + " WITH " +
      searchClassScope + " WHERE " + filterParams;

    log.debug("CE Search Query " + searchQ);
    SearchSQL sqlObject = new SearchSQL(searchQ);
    SearchScope searchScope = new SearchScope(this.objectStore);

    IndependentObjectSet objectSet = searchScope.fetchObjects(sqlObject, null, null, new Boolean(true));
    Iterator iter = objectSet.iterator();

    ArrayList coList = new ArrayList();
    while (iter.hasNext())
    {
      Hashtable htResult = new Hashtable();
      CustomObject customObject = (CustomObject)iter.next();
      coList.add(customObject);
    }
    if ((coList.size() != 0) && (coList != null))
    {
      log.info(coList.size() + " Custom Objects fetched ");
    }
    log.debug("EXIT");
    return coList;
  }




Versioning

Versioning

You can create different versions of content to maintain a history of changes and to control which users can change the content at a given time. The set of versions for a single document is called a version series. Content Engine supports a two-level versioning scheme, in which a document version is either a major or minor version. Minor versions typically denote an “in-progress” document, whereas a major version typically denotes a completed document. In addition to version numbers, the system maintains a state property indicating the current state of each version of the document, as follows:
 

In Process – A work in progress version. Only one version of a version series can be in this state.
 

Reservation – A document currently checked out for modification. Only the latest version of a version series can be in this state.
 

Released – A document released as a major version. Only one major version of a version series can be in this state.
 

Superseded – A version superseded by another version. Many versions in the version series can be superseded.

Additional capabilities in the versioning model include the following:

  1. The system can be configured to apply security policies that in turn automatically apply different access rights for major and minor versions, making it easy to enforce a different viewing audience for inprogress documents.
  2. A document can be promoted from a minor to a major version without requiring the content to be versioned.
  3. A document can be demoted from a major version to a minor version, which is useful if the document has incorrectly been promoted to a major version.
  4. A document can be saved to the object store prior to being checked in. By doing so, users can avoid keeping content on their local systems, and multiple users can work on a checked-out document.
  5. Versioning can be enabled and disabled on a document class level for cases when multiple versions are not required.
  6. A version can be frozen so that the custom properties associated with it cannot be changed.
  7. Users or administrators can view all versions in their respective user interfaces.
  8. Versions can be deleted.

Events and subscriptions

Events and subscriptions

Events provide a mechanism for initiating actions that are invoked when objects are created and modified in, and deleted from, an object store. For example, creating a document in an object store triggers a create event, which launches a workflow that approves the new document and posts the approved content to a Web site.

A subscription is the association of a particular event trigger with an event action. In the previous example, create is the event trigger and the event action is the workflow launch. Many different subscriptions might be associated with a particular event trigger. The following diagram illustrates how several events might be triggered when a new loan application document is created in an object store.

FileNet P8 comes with predefined event actions, including launching a workflow. In addition, events can be developed as a Java class. Subscriptions can be associated with a class so that they apply to the class itself or to all instances or all objects of the class type. Or, subscriptions can be associated with individual objects. Event subscriptions can be run synchronously or asynchronously. When set to run synchronously, the object operation (for example, create or update) and the operations of the event actions are completed as a single transaction; failure in either results in rollback of both operations. For example, a synchronous event might be applied to a Claim folder class that returns an error if a document that doesn’t belong to the Claim Document class is filed in the folder. When set to run asynchronously, the object operation and the event action operation run as separate transactions; in this case, the object operation can succeed independently of the event action operation


 





Annotation

Annotation

An annotation object, illustrated at right, represents incidental information that can be attached to an object for the purpose of annotating or footnoting that object. You can associate annotations with custom objects, documents, and folders. Annotations:

  • Are independently securable. Default security is provided by the class and by the annotated object. An annotation can optionally have a security policy assigned to it.
  • Can have subclasses.
  • Can have zero or more associated content elements, and the content need not have the same format as its annotated object.
  • Are uniquely associated with a single document version, and thus are not versioned when a document version is updated.
  • Can be modified and deleted independently of the annotated object.
  • Can be searched for and retrieved with an ad hoc query.
  • Can subscribe to server-side events that fire when an action (such as creating an annotation) occurs.
  • Can participate in a link relationship.
  • Can be audited.

CustomObject Class

CustomObject Class:

A custom object is used to store and manage data that does not have content (and thus doesn’t support versioning) or a lifecycle. For example, a customer might be represented in the object store as a custom object because there is no requirement for content. Custom objects:

  • Have system properties that the system manages automatically, such as Date Created.
  • Can have custom properties for storing business-related metadata.
  • Are secured.
  • Can participate in business processes as workflow attachments.
  • Can generate server events when they are created, modified, or deleted. These events are then used to customize behavior.

Folder Class

Folder Class

A folder is a container that is used to group other objects. Folders are the primary mechanism through which users access documents. Users typically think of folders as a place where documents are stored;, however, filing documents in multiple folders does not create extra copies of those documents, but rather creates a logical association between the folder and the document. Folders:

  • Have system properties that the system manages automatically, such as Date Created.
  • Can have custom properties for storing business-related metadata.
  • Are secured.
  • Are hierarchical, in the sense that a folder can have subfolders.
  • Can contain documents and custom objects.
  • Can generate server events when they are created, modified, or deleted. These events are then used to customize behavior.
  • Can be annotated.