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 » Reg Workflow API Client

Post new topic  Reply to topic
 Reg Workflow API Client « View previous topic :: View next topic » 
Author Message
workflowdude
PostPosted: Tue Jan 27, 2004 7:51 am    Post subject: Reg Workflow API Client Reply with quote

Novice

Joined: 17 Nov 2003
Posts: 24
Location: US

Hi all,
We have developed our own JavaBean for communicating with workflow. i.e javabean that uses WorkFlow API's to communicate with workflow. The Application that callls this bean is a web based application. Wondering how do you manage workflow sessions in such a scenario. Do you log the user in workflow when he logs in into the web application and store the ExecutionService Object in a haspmap with the userid as the key(in the javabean). If yes, how do we identify the user with each subsequent requests. So on the next request to a workflow API for e.g queryWorkItems(..) there is no way of identifying which user has requested this hence no way of retrieving the ExecutionService Objetc.
The Idea is to not have the Web application store this Object in Session. The web application should be loosely coupled with any workflow implementation.
Is SessionBean a solution to this?

Please reply ASAP

WFDude
Back to top
View user's profile Send private message
jmac
PostPosted: Tue Jan 27, 2004 9:02 am    Post subject: Reply with quote

Jedi Knight

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

I really do not have much experience with web applications (other than the MQWF thin client) so I don't know anything about Session Beans.

But isn't what you are talking about covered by the "Stateless" api calls in MQWF?
_________________
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
workflowdude
PostPosted: Wed Jan 28, 2004 7:46 am    Post subject: Reply with quote

Novice

Joined: 17 Nov 2003
Posts: 24
Location: US

Frankly speaking, I read that chapter in the Programming guide and I wasnt pretty clear about the concept.
My first problem
1. If I do a query on a ExecutionService Object, then do I create this ExecutionService object everytime when the user requests something from the workflow server? If yes, Does the user have to pass the userid, password OR the sessionID everytime with each call? This will look like a bad design to pass the Session ID or credintials as a parameter in each method call to my Workflow JavaBean.
2. After the query is executed on the workflow server and I get an array of lets say WorkItems, do I persist this on the client side? I would not prefer to do this as i dont want to load everything in the HttpSession.
If i do not store and query everytime, what does the Execution.persistentObject do? Since I dont have the list, I will not be getting the OID...
can you please explain this?

Thanks for your help

WFDude
Back to top
View user's profile Send private message
vennela
PostPosted: Wed Jan 28, 2004 8:13 am    Post subject: Reply with quote

Jedi Knight

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

Quote:
If I do a query on a ExecutionService Object, then do I create this ExecutionService object everytime when the user requests something from the workflow server?

No

1. Create the ExecutionService object once.
2. Logon (using the workflow user credentials)
3. (a) query work items
3. (b) check out work item
3. (c) check in WI
3. (d) query process instances
3. (e) .... make whatever workflow calls you want
4. Logoff from execution service.
Quote:
2. After the query is executed on the workflow server and I get an array of lets say WorkItems, do I persist this on the client side?

I am not sure what you are doing here. But if you query work items, you will get an array of work items. What you do with each of the work item in your client is upto you (like check in/ check out/ finish/force finish etc).

Quote:
Execution.persistentObject

Can you be clear on this
Back to top
View user's profile Send private message Send e-mail Visit poster's website
workflowdude
PostPosted: Wed Jan 28, 2004 8:28 am    Post subject: Reply with quote

Novice

Joined: 17 Nov 2003
Posts: 24
Location: US

Hi,
Thanks for your reply.

you said.
1. Create the ExecutionService object once.
2. Logon (using the workflow user credentials)
3.... execute Queries
...
..
4. Log Off

My Workflow component is a JavaBean and not a java application which has a start and a end. This JavaBean exposes various methods to the client like LogOn, LogOff, queryWorkItems, etc... The calling client is not aware of any Workflow objects that are created by this JavaBean. So my question was.. since these requests from the client are stateless, how do i relate the client to the ExecutionService Object previously crerated. Do I have the client pass a token with each method, so that the javabean can look up the ExecutionService Object previously created.? But passing a token everytime within each method call looks like a BAd Design....
Hope I am clear..


My Second Problem is probably resolved once i get the ExecutionService Object associated with the client.

One probable solution was to make the WorkFlow component a Session Bean, so that I can store the ExecutionService Object.. but I am not sure whether its the right direction.
Back to top
View user's profile Send private message
jmac
PostPosted: Wed Jan 28, 2004 8:39 am    Post subject: Reply with quote

Jedi Knight

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

Like I said before, I really don't know a lot about WebApplications, but it certainly sounds to me like you could be using the sessionID() and setSessionContext() methods of the ExecutionService to accomplish what you want. I think you would need to persist only the ExecutionService::sessionID to accomplish this.
_________________
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
workflowdude
PostPosted: Wed Jan 28, 2004 8:46 am    Post subject: Reply with quote

Novice

Joined: 17 Nov 2003
Posts: 24
Location: US

I can use the setSessionContext() method.. but the client has to still pass some token which helps the Workflow Component can lookup the sessionID associated with the user.
Since its a web application, all the requests are stateless....

Hope I am clear
Back to top
View user's profile Send private message
dsim
PostPosted: Thu Jan 29, 2004 8:07 pm    Post subject: Reply with quote

Acolyte

Joined: 11 Aug 2003
Posts: 67
Location: Toronto

Yes, the userID and sessionID (needed to restore the ExecutionService object for the logged on user) can be saved in a session bean.

In the initial http request these two strings can be obtained after logon from the ExecutionService object.
In the following requests an empty (not logged on) ExecutionService object still needs to be instantiated using the Agent. Then calling setSessionContext(userID,sessionID) will restore the execution service.

Dan
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 » Reg Workflow API 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.