Monday Oct 15, 2007

Creating a Test Client to Test SAW(Simple Api for Workflow)

    

    Pre-requisites to create a Test Client(Using Netbeans 6.0 M10 on windows) :

        SAW Project Site can be Accessed at the following URL
 

  1. JCAPS 5.1.3 should be installed. Please see this blog entry
  2. Download the saw api 0.2 version from the SAW Project Site
  3. Download Netbeans 6.0 M10 for windows
  4. TestClient Netbeans Project :

     The TestClient Netbeans project is uploaded here. If you dont want to read the steps below, just add the nbproject to your Netbeans, change the property files accordingly and add your generated stub(WorkflowServiceClient.jar) and start using it. However you have to add your own stub and change the property files accordingly. 

         Creating a TestClient to Test SAW api version 0.2 :

  1. In the Netbeans 6.0 m10 ide click on New Project
  2. Choose Java -> Java Application. See the image
  3. Give the name TestClient to the Java App. Image
  4. Copy ImplementationType.properties, JCAPSWorkflowConfig.properties and WorkflowConfig.properties directly under Source Packages (Image)
  5. Change the following ImplementationType.properties
    • ImplementationType=JCAPS

     6.  Change the following in JCAPSWorkflowConfig.properties

  •  appserverhost=<integration server where jcaps is running>
  • appserverport=18002
  • appserverusername=Administrator
  • appserverpassword=<password>
  • contextfactory=com.sun.jndi.cosnaming.CNCtxFactory
  • serviceJndi=WorkflowService                

    7.   Change the following in WorkflowConfig.properties

                   businessProcess=com.sun.saw.impls.jcaps.JCAPSWorkflow

                    logFileLocation=D:\\\\b7log.txt

    8.   Now right click on the Java App name, in this case TestClient and select properties

    9.   Then click on Libraries on the Left Hand menu(Image)

    10. Add saw-api-0.2.jar under the compile tab (Image)

    11. Then add saw-api-0.2.jar, saw-imp-jcaps-0.2.jar, WorkflowServiceClient.jar, javaee.jar under the run tab (Image)

    12. To checkOut Tasks following code should be written in the main :

 

                public class TestClient {
                public TestClient() {
                }
                      public static void main(String[] args) {
                        TestClient client = new TestClient();
                        List taskIdList = new ArrayList();
                        taskIdList.add(0,"-24fb26e7:1157fe0cdcb:-7ec6") ;
                        taskIdList.add(1,"-24fb26e7:1157fe0cdcb:-7eca") ;
                try {
                        com.sun.saw.vo.OutputVO output = null;
                        output = client.checkOutTasks("CPina", taskIdList) ;
               
                        if(output.isOperationStatus())
                        {
                            System.out.println("checkout : success") ;
                        }
                        else
                       {
                            System.out.println("checkout : Failed") ;
                        }
              
                        } catch (com.sun.saw.WorkflowException e) {
                            e.printStackTrace();
                        }
              }
    
        public com.sun.saw.vo.OutputVO checkOutTasks(String userId, java.util.List taskIdList) throws         com.sun.saw.WorkflowException {
        com.sun.saw.WorkFlowManager workFlowManager = com.sun.saw.WorkFlowManager.getInstance();
        com.sun.saw.vo.CheckoutTaskVO checkoutTaskVO = new com.sun.saw.vo.CheckoutTaskVO();
        checkoutTaskVO.setTaskIdList(taskIdList);
        checkoutTaskVO.setUserId(userId);
        com.sun.saw.vo.OutputVO outputVO = null;
        outputVO = workFlowManager.checkoutTasks(checkoutTaskVO);
        return outputVO;
    }

}


 

 

 

Monday Oct 01, 2007

Installation of JCAPS 5.1.3 for SAW(Simple API for workflow) Testing

The Homepage Simple API for workflow open source project is at the following location : https://saw.dev.java.net/

To Test these SAW API's, installation of JCAPS 5.1.2/5.1.3 is a pre-requisite. This entry deals with step-by-step process to install JCAPS on Windows XP.

1.Unzip Repository CD1 and CD2

2.Run install.bat from the unzipped Repository CD1

3.Select defaults. Make sure ports are not conflicting

4.It will create “repository” folder

5.From repository folder run startserver.bat

6.Access the repository (http://localhost:12000/eManager) Login with necessary credentials

7.Go to Administration and Install Products eGate.sar (once you upload this sar file, one can see the product list. Now you can start installing the required sar files mentioned below in the same way as eGate.sar)

  • Logicalhost-win32
  • ldapeWay.sar
  • FileeWay.sar
  • eInsight.sar
  • eVision.sar
  • Enterprise-Manager-win32.sar
 14.Go to downloads Tab of the repository (ie http://localhost:12000/eManager)
  • Download logicalhost-win32.zip
  • Unzip logicalhost-win32.zip
  • createdomain.bat
  • start_domain1.bat

15. Download Enterprise Designer(eDesigner.zip)

  • runed.bat, this will open the edesigner page. Then click on Tools -> update manager ->select all install -> restart the ide

16. Download Workflow Service API (workflowserver.zip)

  • Unzip workflowserver.zip
  • Go to WLM-API-JDK14 directory.
  • Unjar WorkflowService.jar (jar -xvf WorkflowService.jar)
  • Change the dbType=oracle, userId=wlm51, password=wlm51 in connection.properties in the directory \\WLM-API-JDK14\\com\\stc\\bpms\\wlm\\connection.properties
  • jar it again using jar -cvf WorkflowService.jar \*
  • Deploy it on the integration server http://localhost:18000/asadmin -> Applications -> EJB Modules -> Deploy

 17.Install the open ldap in C: and start the slapd.exe (ldap_install_dir/bin/slapd.exe)

18.Install Oracle 10G. Login using Oracle utility sql plus . Enter Login/password (ex: system/<password>) .

19. Login to e-designer(by running runed.bat) -> project Explorer -> Sun seebeyond -> eInsight -> WorkListViewer -> Database scripts -> oracle install script. Copy the contents of this file and paste it onto the sqlplus terminal so that wlm51/wlm51 user is created in the database and all the corresponding tables are created.

 

Human Workflow Creation using JCAPS 5.1.3 :

  1. JCAPS Workflow Engine is installed and a workflow is defined. Please go through the following link to define a workflow

 

Creation of Stubs :

<Logical host installdir>\\is\\bin>isadmin get-client-stubs --user Administrator --password <password> --appname WorkflowService "D:\\JavaCAPS51\\stubs"

The stubs(WorkflowServiceClient.jar) will be created under “D:\\JavaCAPS51\\stubs” directory.

 

 


 

 

About

siddeshk123

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today