banner



The Service Portlet Jar Doesn't Have The Impl Class?

Developing Workflows Using Simple API for Workflow in Sunday GlassFish Web Space Server

The Sunday GlassFish Web Infinite Server is bundled with the Simple API for WorkFlow (SAW) feature. This section explains about the Simple API for WorkFlow (SAW) feature and how you can develop workflow portlets using NetBeans vi.5 IDE or higher versions. The topics covered in this section are:

  • Introduction to SAW

  • Prerequisites

  • Adding SAW plug-in in NetBeans IDE

  • Creating a Web Application Using the Drag and Drop Features in SAW plug-in

  • Creating a SAW Portlet Using the SAW plug-in

  • Deploying the Workflow Portlet an Open up Source Portlet Container

  • Deploying the Workflow Portlet on Sun GlassFish Web Space Server

  • Using the Workflow Portlet

  • References

Introduction to SAW

SAW is a generic workflow API to perform human being workflow interaction with diverse workflow engines. SAW provides a framework to plug-in any business process specific implementation that implements SAW interfaces. SAW is shipped with a default implementation for Sun JavaTM Composite Awarding Platform Suite. You lot can have similar SAW implementations for other concern processes such as JBoss Business Process Management (jBPM) and Open Enterprise Service Autobus (OpenESB).

Prerequisites

Before you build an awarding using SAW APIs, y'all must install and configure the following components:

  • Java Development Kit (JDKTM) one.5 or afterward versions from http://coffee.dominicus.com/javase/downloads/index.jsp.

  • Sunday Java Composite Application Platform Suite. Currently, SAW implementation is available only for Sun Java Blended Awarding Platform Suite. Therefore, a Sun Java Composite Application Platform Suite installation is required. If you demand any other OpenSource workflow engine implementation, visit https://saw.dev.java.net/, for regular updates.

  • NetBeans 6.5 from http://download.netbeans.org/netbeans/6.0/final/.

  • Portal Pack 3.0 from http://portalpack.netbeans.org/

  • Sun GlassFish Web Space Server from https://portlet-container.dev.java.internet/

  • SAW plug-in for NetBeans from http://portalpack.netbeans.org/

Before proceeding with the implementation of SAW in your awarding, yous need to configure a business process using Sun Java Composite Application Platform Suite. For more than data how to create a business process in Sun Java Composite Application Platform Suite, read the article http://developers.lord's day.com/portalserver/reference/techart/workflow.html

Creating a Web Application Using the Drag and Driblet Features in SAW plug-in

This section provides a procedure to explain how to create a simple web awarding in NetBeans using the drag and driblet features bachelor in SAW plug-in.

ProcedureTo Create a Web Application Using the Drag and Drop Features in SAW plug-in

  1. Click New Project in NetBeans IDE.

  2. Select Web from Categories and Web awarding from Projects and click Adjacent.

  3. Enter a project name.

  4. From the Server drop down list, select GlassFish v2 and click Next.

  5. From the Frameworks list box, select the SAW plug-in.

    You lot tin can run across that the Java Composite Application Platform Suite is selected by default, for the SAW implementation

  6. Click Finish.


    Tip –

    Check the SAW projection spider web site https://saw.dev.java.internet/ regularly, for updates on these implementations.


  7. Expand the Source Packages binder to see the ImplementationType.properties and WorkflowConfig.backdrop holding files, under the default package binder.

    The ImplementationType.backdrop file sets the ImplementationType equally Java Composite Application Platform Suite. This can exist changed in future saw releases to point to JBPM, Os Workflow or other workflow Engines.

  8. Set the WorkflowConfig.properties file appropriately, to point the Java Composite Awarding Platform Suite Integration server.

    The web awarding is listed in the Projects tab and the index.jsp appears in the code window. You can encounter the appropriate Workflow tags listed in the Palette.


    Notation –

    If the Workflow tags palette is not loaded in the NetBeans IDE, you tin can manually load it by clicking Tools and selecting Workflow from the Palette option. Moreover, if you correct click on the web application and select Properties, the Libraries Category in the Projection Properties window displays the SAW libraries that are added by the SAW plug-in in the NetBeans IDE. The current version of SAW libraries is 0.8. Check the SAW project spider web site https://saw.dev.java.net/ regularly for updates on the plug-in for new versions of SAW.


  9. Open up the Java file in your web awarding.

    You tin can notice that the relevant Workflow APIs are listed in the palette. You tin drag and drop these Workflow APIs in the Coffee file, depending upon the usage for your logic. In the default package, y'all can see diverse properties required past SAW to execute. These properties are the location of Sun Java Composite Application Platform Suite, SAW implementation and then on.


    Note –

    You cannot drag and drop duplicate methods. At that place are two means to utilize the SAW APIs. I way is to use through JSP tag libraries and the other style is through the Java APIs.


  10. Edit the WorkflowConfig.Properties file to define your runtime execution environment.

    The web awarding is ready to deploy. The sample WorkflowConfig.Properties file is shown below:


    # the business concern process to utilize. sawworkflowimplclass = The SAW Workflow Implementation grade to use. For instance, com.sun.saw.impls.jcaps.JCAPSWorkflow # Backdrop that are needed past the JCAPS Implementation of SAW. com.dominicus.saw.impls.jcaps.JCAPSWorkflow.appserverhost = auto proper name or IP where Sun Java Composite Application Platform Suite business organisation process is running. For example, abc.india.dominicus.com com.sun.saw.impls.jcaps.JCAPSWorkflow.iiopserverport = Port on which the IIOP lookup for EJB happens. For case, 18002 com.sunday.saw.impls.jcaps.JCAPSWorkflow.appserverusername = Administrator user proper name. For example, Administrator com.sun.saw.impls.jcaps.JCAPSWorkflow.appserverpassword = Administrator password of JCAPS Integration server. For instance, <countersign> com.lord's day.saw.impls.jcaps.JCAPSWorkflow.contextfactory = The context factory. For case, com.sun.jndi.cosnaming.CNCtxFactory com.lord's day.saw.impls.jcaps.JCAPSWorkflow.serviceJndi = The JNDI look up name. For instance, WorkflowService

    Caution – Circumspection –

    Practise not edit the ImplementationType.Backdrop file.


  11. Correct click on the created web application and select Libraries.

  12. Click Add Jar and select the WorkflowServiceClient.jar from Coffee Composite Awarding Platform Suite and click OK.

  13. Right click on the web application and select Clean and Build.

  14. Correct click on the web application and select Run.

    A web browser is launched and information technology displays the user interface defined in your web application.

Creating a SAW Portlet Using the SAW plug-in

This section explains you how to create a simple workflow portlet in NetBeans IDE using the SAW plug-in.

ProcedureTo Create a SAW Portlet Using the SAW plug-in

  1. Click New Projection in NetBeans IDE.

  2. Select Web from Categories and Spider web application from Projects and click Side by side.

  3. Enter a projection name.

  4. From the Server drop down listing, select Open up Portal Portlet Container two.0 Beta and click Next.

  5. From the Frameworks listing box, select Portlet Support and select the Create Portlet checkbox.

  6. Select the SAW plug-in and click End.

  7. Expand the Source Packages folder to see the ImplementationType.backdrop and WorkflowConfig.properties property files, under the default package folder.

    The ImplementationType.properties file sets the ImplementationType as Java Blended Application Platform Suite. This tin exist changed in hereafter saw releases to point to JBPM, OpenESB or other workflow Engines

  8. Gear up the WorkflowConfig.properties file appropriately, to signal the Java Composite Application Platform Suite Integration server.

  9. Edit the WorkflowConfig.Properties file to define your runtime execution environment.

    The sample WorkflowConfig.Properties file is shown below:


    # the business process to use. sawworkflowimplclass = The SAW Workflow Implementation class to use. For example, com.sun.saw.impls.jcaps.JCAPSWorkflow # Properties that are needed by the JCAPS Implementation of SAW. com.lord's day.saw.impls.jcaps.JCAPSWorkflow.appserverhost = machine name or IP where Sun Java Blended Application Platform Suite business procedure is running. For example, abc.india.sun.com com.sun.saw.impls.jcaps.JCAPSWorkflow.iiopserverport = Port on which the IIOP lookup for EJB happens. For instance, 18002 com.sun.saw.impls.jcaps.JCAPSWorkflow.appserverusername = Administrator user proper name. For case, Administrator com.sunday.saw.impls.jcaps.JCAPSWorkflow.appserverpassword = Administrator password of JCAPS Integration server. For example, <password> com.lord's day.saw.impls.jcaps.JCAPSWorkflow.contextfactory = The context factory. For example, com.dominicus.jndi.cosnaming.CNCtxFactory com.sun.saw.impls.jcaps.JCAPSWorkflow.serviceJndi = The JNDI look up proper noun. For case, WorkflowService
  10. Alter the portlet Coffee and the JSP files in your web application accordingly, to write the portlet.

    You can notice that the relevant Workflow APIs are listed in the palette that yous can elevate and driblet in the Java file, depending upon the usage for your logic.

  11. Right click on the created portlet application and select Libraries.

  12. Click Add Jar and select the WorkflowServiceClient.jar from Java Composite Application Platform Suite and click OK.

  13. Right click on the web application and select Clean and Build.

  14. Right click on the web application and select Run.

    The portlet gets rendered on the portlet container.

Deploying the Workflow Portlet an Open Source Portlet Container

You need to deploy the Workflow portlet in order to work with the Workflow API. This section provides a process to explicate how to deploy the workflow portlet on Open Source Portlet Container.

ProcedureTo Deploy the Workflow Portlet on Open up Source Portlet Container

  1. Download the workflow portlet from the SAW project web site https://saw.dev.java.net/.

  2. Excerpt the workflowPortlet.war into a local directory using the jar -xvf workflowPortlet.state of war command.

  3. Change the WorkflowConfig.properties file in the \workflowPortlet\Web-INF\classes directory by providing suitable values to the following properties:

    • sawworkflowimplclass = com.sunday.saw.impls.jcaps.JCAPSWorkflow. This ways that you are using SAW Workflow implementation course, JCAPSWorkflow.

    • com.sun.saw.impls.jcaps.JCAPSWorkflow.appserverhost = machine name or IP address, where Sun Coffee Composite Application Platform Suite business organisation procedure is running. For example, abc.india.sunday.com .

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

    • com.sun.saw.impls.jcaps.JCAPSWorkflow.appserverusername = Administrator user proper name. For case, Administrator .

    • com.lord's day.saw.impls.jcaps.JCAPSWorkflow.appserverpassword = Ambassador password. For example, xxx .

    • com.dominicus.saw.impls.jcaps.JCAPSWorkflow.contextfactory = The context factory. For example, com.sun.jndi.cosnaming.CNCtxFactory .

    • com.lord's day.saw.impls.jcaps.JCAPSWorkflow.serviceJndi = The JNDI expect up proper name. For example, WorkflowService .

  4. Modify the workflowportlet.properties file in \workflowPortlet\Spider web-INF\classes directory by providing appropriate values to the properties. The sample workflowportlet.properties file to deploy on Portlet Container is shown beneath.

    authenticationRepository = accessManager. Specify the authentication repository that is used.


    Annotation –

    accessManager is the default value that is provided for authenticationRepository in the workflowportlet.properties file. Only if you desire to deploy the .war file using the Open up Source Portlet Container, and then change the authenticationRepository value to appServer.


  5. Ensure that you have the client stubs (WorkflowServiceClient.jar) generated out of the workflow service, deployed on Sun Coffee Blended Application Platform Suite. Copy this to \workflowPortlet\Spider web-INF\lib directory by using the cp WorkflowServiceClient.jar workflowServiceClient-1.0.jar command.

  6. Recreate the .state of war file using the jar —cvf command.

  7. Deploy the Workflow portlet using the admin tab of the Portlet Server Administration Console.

    To deploy the workflow portlet on Open up Source Portlet Container:

    • Create a user under admin-realm of GlassFish V2 or Application Server 9.ane, on which the Open Source Portlet Container is running. For example, create a user, CPina in the admin-realm of GlassFish V2.

    • Login to the GlassFish V2 admin.

    • Navigate to Configuration -> Security -> Realms.

    • Click admin-realm and Click Manage Users.

    • Add CPina, group list : asadmin and passowrd as CPina.

    • Access the portlet past typing http://machine:port/portal/dt in a web browser.

    • Log in every bit user, CPina. The tasks that are assigned to CPina will exist displayed on the workflow portlet.

    If it is a web application, so the saw-api-0.vi.jar should be in the appropriate classpath. The saw.tld, saw-impl-jcaps-0.6.jar, and WorkflowServiceClient.jar should be bundled with the application.

  8. Modify the jreHome\lib\logging.properties file. To do this, update the java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter property. The logging levels tin be configured here. For example, INFO, ERROR and and then on.


    Notation –

    You need non modify the logging.properties file in the case of OpenPortal. For stand alone Java applications, you need to change the logging.properties file to specify the blazon of format and the level of log.


Deploying the Workflow Portlet on Sun GlassFish Web Space Server

You demand to deploy the Workflow portlet in order to work with the Workflow API. This section provides a procedure to explain how to deploy the workflow portlet on Open up Portal seven.2.

ProcedureTo Deploy the Workflow Portlet on Sun GlassFish Web Space Server

  1. Excerpt the workflowPortlet.war into a local directory using the jar -xvf workflowPortlet.war command.


    Note –

    The workflow portlet is available in the Sunday GlassFish Web Infinite Server install under the /opt/sun/portal/portlet/ directory for Linux and /opt/SUNWportal/portlet/ directory for Solaris. You tin can as well download the workflow portlet from the Portlet Repository http://wiki.java.net/bin/view/OpenPortal/PortletsInTheRepository.


  2. Ensure that y'all have the client stubs (WorkflowServiceClient.jar) generated out of the workflow service, deployed on Sun Java Blended Application Platform Suite. Copy this to \workflowPortlet\WEB-INF\lib directory by using the cp WorkflowServiceClient.jar workflowServiceClient-one.0.jar command.

  3. Recreate the .war file using the jar —cvf control.

  4. Deploy the Workflow portlet using the admin tab of the Portal Server Administration Console.

    To deploy the workflow portlet on Open up Portal:

    • Create a channel with this portlet provider and add it to 1 of the tab

    • Click the created new channel created and change the following portlet preferences:

      • sawworkflowimplclass = com.sun.saw.impls.jcaps.JCAPSWorkflow. This means that y'all are using SAW Workflow implementation class, JCAPSWorkflow.

      • com.sun.saw.impls.jcaps.JCAPSWorkflow.appserverhost = machine proper name or IP address, where Sun Java Composite Application Platform Suite business process is running. For example, abc.india.dominicus.com.

      • com.sunday.saw.impls.jcaps.JCAPSWorkflow.iiopserverport = port on which the IIOP lookup for EJB happens. For case, 18002.

      • com.sun.saw.impls.jcaps.JCAPSWorkflow.appserverusername = Administrator user name. For example, Administrator.

      • com.sun.saw.impls.jcaps.JCAPSWorkflow.appserverpassword = Administrator password. For example, xxx.

      • com.sunday.saw.impls.jcaps.JCAPSWorkflow.contextfactory = The context manufactory. For example, com.sunday.jndi.cosnaming.CNCtxFactory.

      • com.sun.saw.impls.jcaps.JCAPSWorkflow.serviceJndi = The JNDI look up name. For example, WorkflowService.


      Annotation –

      accessManager is the default value that is provided for authenticationRepository in the workflowportlet.properties file. Y'all demand not change this property, if the portlet is deployed on Open Portal.


  5. Create a user with userId as CPina in Access Manager with the status every bit active. Assume that the Business procedure assigns the newly created tasks to this user.

  6. Access the portlet by typing http://machine:port/portal/dt in a web browser.

  7. Log in equally user CPina. The tasks that are assigned to CPina will be displayed on the workflow portlet.

    Merely in the case of Open Portal, the saw-api-0.6.jar should be available in the server classpath. If it is a web application, so the saw-api-0.6.jar should be in the appropriate classpath. The saw.tld, saw-impl-jcaps-0.half dozen.jar, and WorkflowServiceClient.jar should be bundled with the application.

Using the Workflow Portlet

  1. Login to the Portal Server vii.ii desktop (http://portalmachine:port/portal) with username and password as CPina.

  2. As before long equally the user logs in, all the tasks assigned to the user are displayed. The folio contains three sections.

    • Starting time section — Search Criteria section, where the user can mention the criteria based on which the tasks accept to be filtered and displayed.

    • Second department — Job List section that displays all the tasks that match the search criteria of a user.

    • Third department — Displays the buttons, which are the operations that can performed on any task.

  3. The search criteria department has the following attributes using which the user can filter tasks:

    • Start Date and End date - Filter tasks based on a valid first date and cease date.

    • TaskIds - If the user knows the taskids, and then the user can enter them in the text surface area that is separated by commas.

    • UserIds - Filter tasks based on the current possessor of the task.

    • Task Status - Filter tasks based on the status of the task. For example, awaiting or completed.

    • GroupId - Filter tasks based on the group id. For instance, Vice President Marketing and so on.

    • Flex String Type - Filter tasks based on a flex cord type. For example, flexString1, flexInt1, flexDouble1 and and so on.

    • Flex String Value - The value of the flex cord blazon that is selected by the user.

  4. When the user clicks the Search button, tasks are filtered based on the search criteria that the user has entered and displayed in the "Task Listing" section.

  5. The "Clear" push button clears whatsoever of the search criteria that the user has entered or selected.

  6. Assume that a new chore is allocated to the user "CPina". So "CPina" can practise the following operations on the task that is assigned:

    • EXECUTE - Select the task and click the Execute button. A new page for executing a task is displayed. This page shows the input for the chore in a text box and flex string in some other text box. The user can update both the text boxes and click the Salvage push. These values get updated for the task. On executing, the task gets checked out on the proper name of the logged in user (CPina), who is the current owner of this task. Currently, the task tin be executed only once. This is considering, on execution, the task is checked out, and a task can be checked out only once by a given user. If the user tries to execute the second time, and then "Task Exception" fault bulletin volition be displayed.

    • COMPLETE - Select the task and click the Complete push. At present, the status of the task is marked as completed. The user has to be the current owner for performing this operation on this task.

    • CHECKIN - Select the task and click the CheckIn button. This operation is opposite of check out. The currently logged in user is not the current possessor now. The user has to be the electric current owner for performing this operation on this task.

    • HISTORY - Select the task and click the History button. On clicking this, the job history is shown in a new JSP. All operations that were performed on the task is displayed. Click the Dorsum button on the job history JSP to come back to the task listing page.

    • ESCALATE - Select the chore and click the Escalate button. On clicking this, the task gets assigned to the director of the currently logged in user. The user has to be the electric current possessor for performing this operation on this job.

    • REASSIGN - Select users from the Reassign selected task to drop down, and click the Reassign button, the chore gets assigned to these users. The user has to be the electric current owner for performing this operation on this job.

    • DELETE - Select the task and click the Delete push. On this operation, the chore is deleted. The user has to be the electric current possessor for performing this operation on this chore.

  7. Pagination support is provided for the Job List. On the showtime page the Previous link is not displayed. On the last page, the Next link is non displayed. On all the other pages, both the Previous and Next link is displayed.

  8. Whatever Mistake messages are displayed in the top of the portlet in red font.

  9. Any confirmation messages are displayed in the top of the folio in blue font.

  10. The attributes that can be modified using the portlet preferences are the noOfrecords and the executeJSP. Y'all demand to click the edit manner to change the values for the portlet preferences.

  11. All the letters that are displayed are internationalized.

References

For more information on SAW implementation, refer the following resource:

  • For regular updates on SAW project, visit the SAW project spider web site https://saw.dev.java.net/.

  • For more information on how to incorporate workflow in Sun Portal Server with Lord's day Java Composite Application Platform Suite, read the article http://developers.sun.com/portalserver/reference/techart/workflow.html.

  • For more information on how to work with SAW in NetBeans six.0 IDE, bank check this screencast.

  • Download JavaDocs for SAW API from hither https://saw.dev.coffee.cyberspace/docs/SAWDownloadPage.html.

  • For regular updates on Portal Pack project, visit the Portal Pack projection web site http://portalpack.netbeans.org/.

  • For regular updates on OpenPortal Portlet Container projection, visit the Portlet Container project web site https://portlet-container.dev.java.net/.

  • For more information on NetBeans and the virtually recent downloads available, visit the NetBeans web site http://world wide web.netbeans.org/.

The Service Portlet Jar Doesn't Have The Impl Class?,

Source: https://docs.oracle.com/cd/E19316-01/820-7050/ghrvq/index.html

Posted by: wentworthlinet1989.blogspot.com

0 Response to "The Service Portlet Jar Doesn't Have The Impl Class?"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel