|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
FmcNoDefaultConfigException Java Code |
« View previous topic :: View next topic » |
Author |
Message
|
ChrisThomas |
Posted: Wed May 14, 2003 12:53 pm Post subject: FmcNoDefaultConfigException Java Code |
|
|
Apprentice
Joined: 14 May 2003 Posts: 29 Location: Wisconsin
|
I am looking for help on this exception I get when I try to create and start an instance of my workflow.
I took the code from the redbook MQSeries Workflow for Windows NT for Beginners where it creates an agent object then creates a ExecutionService object and then creates and starts a instance of my workflow.
The code just works find when I run it on my local machine using VisualAge 3.5.3. When I move it to our test environment out on a UNIX WebSphere server it throws an error when the following method is called agent.setName("MQWFAGENT"). Does the agent need to be installed on the UNIX box? Anyone know what I should look at?
Thanks
Chris.... |
|
Back to top |
|
 |
jmac |
Posted: Wed May 14, 2003 12:57 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Can you post the code you are using. That would help _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
ChrisThomas |
Posted: Wed May 14, 2003 12:59 pm Post subject: |
|
|
Apprentice
Joined: 14 May 2003 Posts: 29 Location: Wisconsin
|
Here is the code.
try{
MsgTrace.trace("Start of StartWorkflow.process()", "AWC.Debug");
String userid = (String)mapWebVars.get("userID");
String passwd = (String)mapWebVars.get("password");
Agent agent = new Agent();
MsgTrace.trace("Agent Created", "AWC.Debug");
int locator = Agent.LOC_LOCATOR;
String name = "MQWFAGENT"; //LOCAL
agent.setLocator(locator);
MsgTrace.trace("agent.setLocator", "AWC.Debug");
agent.setName(name);
MsgTrace.trace("agent.setName", "AWC.Debug");
ExecutionService service = agent.locate("FMCGRP", "FMCSYS");
MsgTrace.trace("ExecutionService Created", "AWC.Debug");
service.logon2(
userid,
passwd,
SessionMode.DEFAULT,
AbsenceIndicator.LEAVE);
MsgTrace.trace("Logon successful", "AWC.Debug");
// Query the set of process templates the logged on user can access.
Integer myint = new Integer(2);
ProcessTemplate[] proctempl =
service.queryProcessTemplates("NAME = 'URC-WOICS'", "NAME", myint);
MsgTrace.trace("service.queryProcessTemplates successful", "AWC.Debug");
// get the input container
ReadWriteContainer inputContainer = proctempl[0].initialInContainer();
MsgTrace.trace("proctempl[0].inContainer successful", "AWC.Debug");
String CaseStatus = (String)mapWebVars.get("CaseStatus");
int nIndex = CaseStatus.indexOf(" " );
CaseStatus = CaseStatus.substring(0,nIndex);
String InternalStatus = (String)mapWebVars.get("InternalStatus");
nIndex = InternalStatus.indexOf(" " );
InternalStatus = InternalStatus.substring(0,nIndex);
String IssueDte = (String)mapWebVars.get("IssueDateMonth") + (String)mapWebVars.get("IssueDateDay") + (String)mapWebVars.get("IssueDateYear");
String NewIssueDte = (String)mapWebVars.get("newIssueDateMonth") + (String)mapWebVars.get("newIssueDateDay") + (String)mapWebVars.get("newIssueDateYear");
inputContainer.setString("General.InsuredName", (String)mapWebVars.get("InsuredName") );
inputContainer.setString("General.ProdContractNum", (String)mapWebVars.get("ProdContractNum") );
inputContainer.setString("General.IssueDte", IssueDte );
inputContainer.setString("General.FaceAmount", (String)mapWebVars.get("FaceAmount") );
inputContainer.setString("General.NewFaceAmount", (String)mapWebVars.get("newFaceAmount") );
inputContainer.setString("General.FOIntRptAcnCde", (String)mapWebVars.get("FOReported") );
inputContainer.setString("General.NewIssueDte", NewIssueDte );
inputContainer.setString("General.CaseStatus", "18" );
inputContainer.setString("General.InternalStatus", "10" );
inputContainer.setString("General.OriginalCaseStatus", CaseStatus );
inputContainer.setString("General.OriginalInternalStatus", InternalStatus );
inputContainer.setString("General.UserID", userid );
ProcessInstance procinst =
proctempl[0].createAndStartInstance2(userid, "", "", inputContainer, false);
// log off from MQW
service.logoff();
} // try
catch (FmcException e) {
MsgTrace.trace("Error1:\n" + e, "AWC.Debug");
} catch (java.beans.PropertyVetoException e) {
MsgTrace.trace("Error2:\n" + e, "AWC.Debug");
}
catch (Exception e )
{
MsgTrace.trace("Error3:\n" + e, "AWC.Debug");
MsgTrace.trace( e.getMessage(), "AWC.Debug");
}
mapWebVars.insert("TargetPage", "URCMainScreen");
MsgTrace.trace( "JSP changed to URCMainScreen", "AWC.Debug");
return ""; |
|
Back to top |
|
 |
vennela |
Posted: Wed May 14, 2003 1:06 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
You need to have an AGENT running on the UNIX box. Ideally, I would suggest you to create a configuration for a web client because you already have WAS. |
|
Back to top |
|
 |
jmac |
Posted: Wed May 14, 2003 1:09 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Looks pretty OK to me.
This could be an issue with the MQWF profile not being seen in UNIX.
I am not familiar enough with the environment to know what to look for, but I think there have been other posts on this forum that show how to get your MQWF profile set properly on UNIX
GOOD LUCK _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
jet |
Posted: Wed May 14, 2003 3:53 pm Post subject: |
|
|
Apprentice
Joined: 04 Dec 2002 Posts: 49 Location: New York
|
is ur MQWF installation & configuration right in UNIX box? |
|
Back to top |
|
 |
sshaker |
Posted: Fri May 16, 2003 12:26 pm Post subject: |
|
|
 Disciple
Joined: 20 Sep 2002 Posts: 185
|
u may create a configuration 'only' for web client using fmczutil.. (it will be handy for upgrades) as the web client also configures the java agent.. with the name.. MQWFAGENT..and that will be available for your code..
regards
shaker _________________ shaker |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|