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 » create and start instance from a JSP

Post new topic  Reply to topic
 create and start instance from a JSP « View previous topic :: View next topic » 
Author Message
sridhar
PostPosted: Wed Jun 11, 2003 12:37 pm    Post subject: create and start instance from a JSP Reply with quote

Newbie

Joined: 11 Jun 2003
Posts: 8

Hi,

could somebody help me with some sample code and ideas as to how , I could create and start a process instance from a jsp/html (this JSP/HTML is not in the workflow webclient application) and without using UPES.

Thanks in advance for any help
Sridhar
_________________
sridhar
Back to top
View user's profile Send private message
jet
PostPosted: Wed Jun 11, 2003 1:39 pm    Post subject: Reply with quote

Apprentice

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

What u can do is the following:

- Log in as the user automatically
- QueryProcessTemplateList
- get the template associate to the process model
- set input container and vlaues
- Create the instance from the process template

here is an example:


boolean created = false;
String creator = "AUTOMATIC";
String pid = "password";
try
{
// connect to Workflow domain and obtain service session
Agent agent = new Agent();
agent.setLocator(Agent.LOC_LOCATOR);
agent.setName("AGENT");

ExecutionService service = agent.locate(MQWFGROUP, MQWFSYSTEM);
service.logon2(creator, pid, SessionMode.DEFAULT, AbsenceIndicator.LEAVE);

ProcessTemplateList[] pls = service.queryProcessTemplateLists();
ProcessTemplateList pl = pls[0];
//Create New Instance in ProcessTemplate
ProcessTemplate[] pt = pl.queryProcessTemplates();

// set instance name & input container
String instName = "myInstance" + xxxx;



ReadWriteContainer input = pt[0].initialInContainer();
input.setString("xxxx", yourvalue);
input.setString("xxxx", anothervaule);

pt[0].createAndStartInstance2(instName, null, null, input, false);



service.logoff();
Back to top
View user's profile Send private message
Ratan
PostPosted: Wed Jun 11, 2003 2:17 pm    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

You can also do this by creating a <ProcessCreateandstartInstance> xml and sending it to EXEXMLINPUTQ.
_________________
-Ratan
Back to top
View user's profile Send private message Send e-mail
jmac
PostPosted: Wed Jun 11, 2003 6:30 pm    Post subject: Reply with quote

Jedi Knight

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

Sri:

Good to hear from you....

I think that what you are looking for is done by using the "STARTER" settings in the WebClient properties. (See the on-line WebClient Doc the section on editing the WebClient, then scroll down to the section "Settings for accessing the Web client without a client session").

Once you have the STARTER properties set, you can simply put a JSP in the processes folder, that is named <template_name>.JSP. Now give your users the URL and MQWF will fire up the instance using the whatever USERID you specify for the StarterUserID parameter.

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
sridhar
PostPosted: Thu Jun 12, 2003 8:12 am    Post subject: Reply with quote

Newbie

Joined: 11 Jun 2003
Posts: 8

John,

I couldn't find the documentation. Where are you referring to?
_________________
sridhar
Back to top
View user's profile Send private message
vennela
PostPosted: Thu Jun 12, 2003 8:51 am    Post subject: Reply with quote

Jedi Knight

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

If you have installed web client component on a Windows machine then

Start -> Programs -> IBM WebSphere MQ WorkFlow -> Web Client Documentation

OR

In the Directory
<MQWF Install Dir>\DOC\WebClient
(which usually in Windows is
C:\Program Files\IBM WebSphere MQ Workflow\DOC\WebClient )

there is a HTML page called index.html and that should be able to navigate you.

-------
Venny
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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 » create and start instance from a JSP
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.