Author |
Message
|
hifive |
Posted: Fri Oct 12, 2007 8:58 am Post subject: How to get Global container values using MQ WF |
|
|
Acolyte
Joined: 06 May 2006 Posts: 52
|
I have an auto activity, which has to read the global container value . How to achieve this?
Thx |
|
Back to top |
|
 |
jmac |
Posted: Fri Oct 12, 2007 9:58 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
You access the global container using the container api. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
hifive |
Posted: Fri Oct 12, 2007 10:37 am Post subject: |
|
|
Acolyte
Joined: 06 May 2006 Posts: 52
|
Container will help me to read container Members, but actually I want to read Global Container member associated for the current processinstance from which i have written an auto activity code.
Scenerio : Auto Activity "A" has to to check if their is any process running for the policy Number supplied .
I have planned this option , plz correct if i am wrong
Agent ...
ExecutionAgent pea= agent.getExecutionAgent()
ProcessInstance pi=null
pi.setName (pea.processContext())
ReadwriteContainer rc=pi.getGlobalContainer() |
|
Back to top |
|
 |
jmac |
Posted: Fri Oct 12, 2007 10:42 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
I have to say you have me thoroughly confused. You say its an auto activity, but you are using a PEA... So this is NOT a Upes activity, it is a program activity which runs a program using the fat client.
If this is correct, there is still no problem.
Use passthrough to get access to an Execution Service.
Then from the process instance you can retrieve the Global Container, and access using the container api _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
hifive |
Posted: Sun Oct 14, 2007 8:40 pm Post subject: |
|
|
Acolyte
Joined: 06 May 2006 Posts: 52
|
[quote="jmac"]I have to say you have me thoroughly confused. You say its an auto activity, but you are using a PEA... So this is NOT a Upes activity, it is a program activity which runs a program using the fat client.
If this is correct, there is still no problem.
Use passthrough to get access to an Execution Service.
Then from the process instance you can retrieve the Global Container, and access using the container api[/quote]
Auto activity = NON UPES Program
When i use this logic
agent.setConfigurationID("FMC");
agent.setName("MQWFAGENT");
ExecutionService service = agent.locate("", "");
System.out.println("Connected.");
ExecutionAgent pea = agent.getExecutionAgent().;
service.passthrough();
Error : Program Executuin agent not running...
I am using both service and pea ..
Service object is used for accessing globalContainer method
pea to read the incontainer values...
Request ur help |
|
Back to top |
|
 |
jmac |
Posted: Sun Oct 14, 2007 9:11 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
The only time you would use an ExecutionAgent, is if you are running a fat client program activity.
If you do have a UPES activity, you need to do a logon to MQWF, then access the parent Process Instance for the activity, and then use the container API to read the contents of the global container. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
hifive |
Posted: Sun Oct 14, 2007 9:14 pm Post subject: |
|
|
Acolyte
Joined: 06 May 2006 Posts: 52
|
[quote="jmac"]The only time you would use an ExecutionAgent, is if you are running a fat client program activity.
If you do have a UPES activity, you need to do a logon to MQWF, then access the parent Process Instance for the activity, and then use the container API to read the contents of the global container.[/quote]
SO i understand, their is no way using an NOn upes auto activity to read the global container values ? |
|
Back to top |
|
 |
jmac |
Posted: Sun Oct 14, 2007 9:35 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
No, that's not what I said.
IF you are using a PEA (i.e fat client program activity) then once your activity has control, you use passthrough, to access the Execution Service, and you should be able to access the GDC, through the process instance.
If you are using a UPES, you logon to MQWF, access the Process Instance, and then you should be able to access the GDC.
Perhaps the misunderstanding is around your terminology.
What is a Non-UPES auto activity to you? The only thing I can see that being is a fat client program activity that runs automatically. Maybe if you explain what you are mean by this term I can figure out what you are trying to do. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
hifive |
Posted: Mon Oct 15, 2007 3:48 am Post subject: |
|
|
Acolyte
Joined: 06 May 2006 Posts: 52
|
I am using PEA.
the code goes like this
Agent agent=new Agent();
agent.setConfigurationID("FMC");
agent.setName("MQWFAGENT");
ExecutionService service = agent.locate("", "");
System.out.println("Connected.");
ExecutionAgent pea = agent.getExecutionAgent().;
service.passthrough();
hope the above steps are correct ?
when i trace manuall,if i use agent.locate("", "") method, it shows an exception " Program Executuion Agent not running ..!"
Even I tried passing FMGRP and FMCSYS, but stil the same error |
|
Back to top |
|
 |
jmac |
Posted: Mon Oct 15, 2007 1:01 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Are you sure you have a PEA started for the user who is assigned to the automatic activity _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
hifive |
Posted: Tue Oct 16, 2007 6:24 am Post subject: |
|
|
Acolyte
Joined: 06 May 2006 Posts: 52
|
Yes, I did try to comment agent.locate("",""), it works, when i uncomment it and try again, its says Program Execution agent not working.
If you have any working code, request if you can share the same.
Thx |
|
Back to top |
|
 |
jmac |
Posted: Tue Oct 16, 2007 9:14 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Read the doc, or search the forum for starting the pea, it is a command you must run on the os. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
|