ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » customizing web client

Post new topic  Reply to topic
 customizing web client « View previous topic :: View next topic » 
Author Message
vennela
PostPosted: Tue Jun 10, 2003 7:29 am    Post subject: customizing web client Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

If I want to customize web client, where di I start. I have looked at the MQWf 3.4 documentation, WA84 support pack and the HTML web client documentation. None of them gives me a jump start on that.

I usually do it in incemental steps. How do I go about doing this one.

Let's say my requirement is this.
1. I Logon to workflow web client. I get a web page which is just a link and nothing else.
2. I click on the link and it will take me to the workItems page. The work items are displayed 10 per page.

Where do I start to do this. Should I start with modifying(extending) ListViewer? Should I start with modifying(extending) JSPViewer? Should I start with modifying(extending) CommandHandler?
Should I do all of them. If I do all of them how are they inter-related.

What are the high level steps involved?

Thanks for the help
-------
Venny
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jmac
PostPosted: Tue Jun 10, 2003 7:46 am    Post subject: Re: customizing web client Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

vennela wrote:
1. I Logon to workflow web client. I get a web page which is just a link and nothing else.


To do this you will need to modify the logonResponse() method. This means you will need to extend the JSPViewer.

vennela wrote:
2. I click on the link and it will take me to the workItems page. The work items are displayed 10 per page.


To display 10 workitems per page you have several options, but the easiest one would be to create your own ListViewer, and limit its display of workitems to 10. Optionally, you could write your own command, which would mean you need a CommandHandler, so that the command would use a queryWorkitems with a threshold of 10.

In either case, you would need to be careful that ONLY your modified listviewer was used. This is documented somplace, possibly in Wolfgangs "Production Rollout Considerations".... Maybe someone with a better memory than me, will remember where it is documented

GOOD LUCK
_________________
John McDonald
RETIRED
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jet
PostPosted: Tue Jun 10, 2003 7:56 am    Post subject: Reply with quote

Apprentice

Joined: 04 Dec 2002
Posts: 49
Location: New York

I dont like the web client. The Jsp page contains more Java code than the HTML code. The person who designed and developed the servlet need to study the Model-View-Control application design. I will prefer to use Struts which implemented using MVC to develop a custom servlet calling MQWF java APIs.

I developed a custom servlet using the Struts framework, the actually MQWF code is about one class, somewhere around 200-300 lines of code. And in my custom jsp pages, there is very very little java code.

For now, I wont touch web client for any production application but use it to test my workflow process logic. It just not a good application servlet
Back to top
View user's profile Send private message
vennela
PostPosted: Tue Jun 10, 2003 8:03 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Jet:
Are you saying that you are not using out of the box web-client at all. Do you mean to say you are not using fmcohcli.jar at all. Not that this cannot be done but was just curious. In that case, there needs to be a good Java/J2EE, WAS guy rather than a Workflow guy.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jmac
PostPosted: Tue Jun 10, 2003 9:05 am    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

I must admit that I agree with Jet, the JSP implementation of Activities is ugly (IMHO).

What I have done is to simply replace the JSPs with my own "activity" classes based on an interface which contains an "onCheckout() method and an onCheckIn(). These methods take care of all of the Java code, then I have a utility method that simply generates the XML for the containers, and using an XSL stylesheet (one per activity) generates the HTML.

I find this approach to be much cleaner than the webclients JSP approach which relies on forwarding or other tricks to do "post checkin" processing. This also gives me the separation I think we want... Application code not tied to GUI code (which in this case is simply an XSL stylesheet)
_________________
John McDonald
RETIRED
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vennela
PostPosted: Tue Jun 10, 2003 10:35 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Code:
[6/10/03 13:04:22:395 CDT]   48bd9e WebGroup      I SRVE0091I: [Servlet LOG]:     DefaultViewer:  com.ibm.workflow.servlet.client.DefaultView
er
[6/10/03 13:04:28:268 CDT]   48bd9e WebGroup      I SRVE0091I: [Servlet LOG]: sendResponse: File Main not found.
[6/10/03 13:04:28:273 CDT]   48bd9e WebGroup      I SRVE0092I: [Servlet LOG]: sendResponse: com.ibm.workflow.servlet.client.ClientException:
File Main not found.
        at com.ibm.workflow.servlet.client.Main.sendResponse(Unknown Source)
        at com.ibm.workflow.servlet.client.Main.doGet(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
        at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
        at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
        at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
        at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
        at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
        at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
        at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:721)
        at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:374)
        at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:118)
        at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
        at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239)
        at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
        at com.ibm.servlet.engine.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:106)
        at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:154)
        at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
        at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
        at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:332)
        at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:261)
        at com.ibm.ws.util.CachedThread.run(ThreadPool.java:138)

[6/10/03 13:04:28:278 CDT]   48bd9e WebGroup      I SRVE0091I: [Servlet LOG]: Error(queryWorkItems): File Main not found.


That is the error I got when trying to logon to Workflow.
All I have done is extended the JSPViewer to MyJSPViewer

This is the code

Code:
import java.util.*;
import java.io.File; 
import javax.servlet.http.HttpServletRequest;
import com.ibm.workflow.servlet.client.*;

public class MyJSPViewer extends JSPViewer {

public MyJSPViewer () {
}

public ResponsePage logonResponse(RequestContext context)
throws ClientException {

ResponsePage result = super.queryWorkItemsResponse(context);
return result;
}


}


In the webclient.properties I changed the following line

DefaultViewer=MyJSPViewer

I have set the CLASSPATH for WAS also.

Should I get something. Am I missing something. What's wrong.

Thanks
-------
Venny
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jet
PostPosted: Tue Jun 10, 2003 11:04 am    Post subject: Reply with quote

Apprentice

Joined: 04 Dec 2002
Posts: 49
Location: New York

That exactlly the problem I am having with WebClient. Too much effort to customize it -- got to understand the servlet first, which is written by someone you dont know, and when you make any change it it you dont know if that works....As the matter of fact, for last couple projects I have to drop the plan of using Web Client since customers always have surprising requests to customize the application.

Yes, I dont use the fmcohcli.jar, but I do use fmcojagt.jar(the Java agent which in fact include the MQWF Java APIs). To develop a clean, flexiable custom servlet using MQWF Java APIs, you need a good J2EE person as well a MQWF expert who understand the APIs very well. Of course, it will be nice you got both skills.
Back to top
View user's profile Send private message
vennela
PostPosted: Tue Jun 10, 2003 11:29 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

This is the first error from the web-client error logs

Code:
DefaultViewer:  : java.lang.ClassCastException: MyJSPViewer


What's wrong ?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vennela
PostPosted: Thu Jun 12, 2003 12:29 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Finally got it to working.
You know what I did. I JARred the file MyJSPViewer.class and called it own.jar
Then I put this JAR file in the WAS classpath. Amazingly, everything is working fine. Now I can play with the JSPViewer class and extend it to whatever I want to.

You guys better watch out, I can figure out answers myself if you don't answer me in the right time.

-------
Venny
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ratan
PostPosted: Thu Jun 12, 2003 1:14 pm    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

I dont see how The ClassCastExcetion is related to JARring your file. Did you do anything else? I am poor with JSPs though.
_________________
-Ratan
Back to top
View user's profile Send private message Send e-mail
vennela
PostPosted: Thu Jun 12, 2003 1:39 pm    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

Nope
Nothing else. Just recreated the problem to make sure that nothing else is changed other than JARring the files. Not just the class cast exception, but there were bunch of other errors too. I think they all are inter related and I couldn't really understand what they meant.

-------
Venny
Back to top
View user's profile Send private message Send e-mail Visit poster's website
BCBS
PostPosted: Thu Oct 02, 2008 9:43 am    Post subject: Reply with quote

Apprentice

Joined: 12 Jul 2006
Posts: 37

Can someone guide me where do I start if I want to customixe the client in WPS instead of BPCE?

Thanks
Boish
_________________
_________________________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » customizing web client
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.