Wednesday, 22 April 2015

Java program for DB2 connection using JNDI name

//Java program for DB2 connection using JNDI name.

import java.sql.Connection;
import java.sql.SQLException;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;
import org.apache.log4j.Logger;

/*
 * *@Rakesh K
 *
 */

public class DB2Connect
{
    public static Logger log=Logger.getLogger(DB2Connect.class);
   
    public static Connection getConnection(String dataSourceName) //here dataSourceName is JNDI name
    {
        log.info("Enter [DB2Connect]getConnection()");
        log.info("Data Source Name is: "+dataSourceName);
       
        Connection dbConnection=null;
        try{
           
            InitialContext ctx = new InitialContext();
            Object objRef = ctx.lookup(dataSourceName);
            DataSource dataSource = (DataSource)objRef;
            dbConnection = dataSource.getConnection();
        }catch(SQLException ex){
            log.error("Exceptio found at [DB2Connect]getConnection():"+ex);
        }catch(NamingException ex){
            log.error("Exceptio found at [DB2Connect]getConnection():"+ex);
        }catch(Exception ex){
            log.error("Exceptio found at [DB2Connect]getConnection():"+ex);
        }
        return dbConnection;
    }
   
    public static void closeConnection(Connection dbConnection) throws SQLException
    {
        try
        {
            if(dbConnection != null)
            {
                dbConnection.close();       
                log.info("DB2 Connection closed.");
            } // End IF
        } // End TRY
       
        catch(SQLException e)
        {
            log.error("Exception ---> " +e.getMessage());
        }
    }        
   
} // End Class Definition 

Tuesday, 21 April 2015

Create a custom In-Basket in IBM Case Manager


//Create a custom In-Basket in IBM Case Manager

//I.  Create a custom In-basket.
// II. Add custom In-basket to the particular Role 

1. Open Process Designer.
2. Edit Solution Workflow (Goto File -> Solution -> Edit..)

 


3.   After Open the workflow, Select In-basket(Goto Edit -> In-basket)


4. Select Queue for In-basket (On which Work Queue you need to create custom In-basket)

 

 5.Click on New

 


6.  Enter name of In-basket (Example: Manager)

7. Create Columns and labels and Create Filters(If you required)
 

8. In-basket created successfully
9. Add the In-basket to the particular Role(s)
10. Select Roles(Goto Edit -> Roles)
 

11. select Role and Select In-basket and Members (Here Manager In-basket)




12. select In-basket


13. Provide Authorization (add users and groups (Not necessary))


14. Save the changes (File -> FileNet -> FileNet Save..)
 
 
15. Deploy the Solution (from Case builder or Command prompt).

**************In-basket created and added to the Role**************