Author |
Message
|
sridhar |
Posted: Wed Jun 11, 2003 12:37 pm Post subject: create and start instance from a JSP |
|
|
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 |
|
 |
jet |
Posted: Wed Jun 11, 2003 1:39 pm Post subject: |
|
|
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 |
|
 |
Ratan |
Posted: Wed Jun 11, 2003 2:17 pm Post subject: |
|
|
 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 |
|
 |
jmac |
Posted: Wed Jun 11, 2003 6:30 pm Post subject: |
|
|
 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 |
|
 |
sridhar |
Posted: Thu Jun 12, 2003 8:12 am Post subject: |
|
|
Newbie
Joined: 11 Jun 2003 Posts: 8
|
John,
I couldn't find the documentation. Where are you referring to? _________________ sridhar |
|
Back to top |
|
 |
vennela |
Posted: Thu Jun 12, 2003 8:51 am Post subject: |
|
|
 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 |
|
 |
|