Sun Java System Portal Server 7.2 Developer's Guide

ProcedureTo Configure SAW

  1. Create a new Java project.

  2. Ensure that client stubs generated out of the workflow service of Sun Java Composite Application Platform Suite is in the classpath.

  3. Add the saw-api-0.7.jar and saw-impl-jcaps-0.8.jar files to the classpath of the project.

  4. Ensure that the javaee.jar is in classpath.


    Note –

    The saw-api-0.7.jar file should be in compile time and runtime classpath, whereas the saw-impl-jcaps-0.8.jar, WorkflowServiceClient.jar, and javaee.jar files should be only in runtime classpath.

    All these .jar files are available at https://saw.dev.java.net/


  5. Add WorkflowConfig.properties file in the project classpath.


    Tip –

    Sample entries for WorkflowConfig.properties file:

    • sawworkflowimplclass = com.sun.saw.impls.jcaps.JCAPSWorkflow (This entry means that you are using SAW Workflow implementation class, JCAPSWorkflow.)

    Sample entries for WorkflowConfig.properties file:

    • com.sun.saw.impls.jcaps.JCAPSWorkflow.appserverhost = points to the machine where the Java CAPS Business Process is deployed.

    • com.sun.saw.impls.jcaps.JCAPSWorkflow.iiopserverport = port on which the IIOP lookup for the EJB happens.

    • com.sun.saw.impls.jcaps.JCAPSWorkflow.appserverusername = admin user id and password for the server on which Java CAPS Business Process is running.

    • com.sun.saw.impls.jcaps.JCAPSWorkflow.appserverpassword = admin user id and password for the server on which Java CAPS Business Process is running.

    • com.sun.saw.impls.jcaps.JCAPSWorkflow.contextfactory = com.sun.jndi.cosnaming.CNCtxFactory

    • com.sun.saw.impls.jcaps.JCAPSWorkflow.serviceJndi = Java Naming and Directory Interface (JNDI) name of the deployed Java CAPS Business Process.


  6. The ImplementationType.properties file is required to run SAW Application, when you create using NetBeans plug-in. The ImplementationType.properties file should contain the keyword, ImplementationType=JCAPS.


    Note –

    The client of the SAW API should get the reference of the workflow implementation object (in this case the JCAPSWorkflow) through the WorkflowFactory class. The client should call the getWorkflowInstance() or getWorkflowInstance(java.util.Properties) method on the WorkflowFactory to get an instance of the SAW Workflow Implementation class. The WorkflowFactory reads the sawworkflowimplclass key from the WorkflowConfig.properties file and finds out which SAW Workflow Implementation class to use. The getWorkflowInstance() looks for the WorkflowConfig.properties in classpath. This properties file will have the values for the necessary attributes that are required. The getWorkflowInstance(java.util.Properties) uses the properties object is provided to it as the argument and does not look for the WorkflowConfig.properties. Once the client has the reference to the SAW Workflow Implementation class, the client can call methods on that instance.