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 » UPES Concepts

Post new topic  Reply to topic
 UPES Concepts « View previous topic :: View next topic » 
Author Message
parsar
PostPosted: Mon Sep 11, 2006 2:32 pm    Post subject: UPES Concepts Reply with quote

Novice

Joined: 08 Dec 2005
Posts: 22

Hi

I am actually new to the UPES concepts.

We have an application which currently uses PEA to start work items which we are planning to change it to UPES.

what we are currently doing is


start the PEA [programExecutionAgentStartUp()]
start the work item [wItem[0].start() ]
shutdown the PEA for each user. [programExecutionAgentShutdown()]

how can this be replaced with a UPES? does the start() method automatically insert an XML message in the UPES queue to start the workitem? Please clarify.
Back to top
View user's profile Send private message
Ratan
PostPosted: Tue Sep 12, 2006 12:57 pm    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

With UPES activity will not generate any workitems.
WF puts XML message in the UPES Q.
You have to write a program to parse the XML and do what ever you want and response back to WF.
_________________
-Ratan
Back to top
View user's profile Send private message Send e-mail
parsar
PostPosted: Wed Sep 13, 2006 8:20 am    Post subject: Reply with quote

Novice

Joined: 08 Dec 2005
Posts: 22

hi thanks for the reply

but how are we replacing the programExecutionAgentStartUp and programExecutionAgentShutdown with a UPES is what I dont understand.

Sorry if this is too basic. But to help myself to understand

Thanks in advance
Back to top
View user's profile Send private message
vennela
PostPosted: Wed Sep 13, 2006 9:58 am    Post subject: Reply with quote

Jedi Knight

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

There is no need of PEA if you use UPES
Back to top
View user's profile Send private message Send e-mail Visit poster's website
supreeth
PostPosted: Wed Sep 13, 2006 10:30 pm    Post subject: Reply with quote

Voyager

Joined: 17 May 2005
Posts: 90
Location: London

Hi,
PEA would be spawning the executable mentioned in the program registration of the activity node. if u r using UPES ... its like indicating to the execution server that the program execution server defined by u would be taking care of activity processing. you can write ur UPES implementation class to parse the XML given to u by the execution server. Its like you taking the control out of workflow. just to give u a lead i can say a typical design for using UPES can be done as follows.

Have a Java class file which would be invoked by a message coming on the queue (Trigger queue) where the UPES is monitoring. This class would make use of XML utility classes to parse the XML to identify the activity name. Have java class files with the same name as the activity name. The UPES implementation class would use reflection API of java to get an instance of the activity class and invoke method within the activity class. this method would have the activity implementation logic (which otherwise u give in the .exe file associated with the program registration of the activity).

PS: have XML utility classes which would be capable of extracting the data from the XML to pass on to the activity class.

Hope the above explanation helps u get a clear picture of using UPES and the way of using it.

cheerz!!!
supreeth
_________________
Supreeth Gururaj
IBM Certified WMQ Solution Expert
Back to top
View user's profile Send private message
parsar
PostPosted: Thu Sep 14, 2006 9:58 am    Post subject: Reply with quote

Novice

Joined: 08 Dec 2005
Posts: 22

Hi

thanks supreeth for your reply.

I understand that PEA is not required if UPES is used.

Please look at the code that we have :

if (objWrkState.equals(ExecutionState.READY))
{
try
{
objService.programExecutionAgentStartUp();
}
catch (FmcException fExp)
{
if (fExp.rc == FmcException.FMC_ERROR_ALREADY_STARTED)
{
}
}
objWrkItm.start();

objService.programExecutionAgentShutDown();

Now all we are doing is an Java API call. I dont understand where UPES fits in here. What would the XML be having in this case? Please let me know how the above API call can be replaced with UPES.

Similarly we have other API calls like createAndStartInstance() and createAndStartInstance2(), queryWorkItems and queryProcessTemplates etc., Do we need to replace all of the API calls? please help me understand.
Back to top
View user's profile Send private message
vennela
PostPosted: Thu Sep 14, 2006 10:08 am    Post subject: Reply with quote

Jedi Knight

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

You should look at the XML interface section of the programming guide
Back to top
View user's profile Send private message Send e-mail Visit poster's website
parsar
PostPosted: Thu Sep 14, 2006 11:36 am    Post subject: Reply with quote

Novice

Joined: 08 Dec 2005
Posts: 22

Hi vennela

thanks for the reply..

I understand the java program that you have posted in the repository -> java section above.

But my question if you can achieve something with just an API call like objProcessTemplate.createAndStartInstance() , then why do we need to configure a queue, put the XML message and do all such things.

I just want to know the advantage of this mechanism over the API call.

I am not sure if I got the basics of UPES right. Probably will have to read more.

thanks anyway..
Back to top
View user's profile Send private message
Ratan
PostPosted: Thu Sep 14, 2006 11:53 am    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

To make the API call you need the WF client API on the system making the call. With the XML Interface you do not.
_________________
-Ratan
Back to top
View user's profile Send private message Send e-mail
jmac
PostPosted: Thu Sep 14, 2006 3:31 pm    Post subject: Reply with quote

Jedi Knight

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

parsar wrote:
I just want to know the advantage of this mechanism over the API call.


One advantage is as Ratan says you don't need the client.

IBM also recommeds that automatic activities be UPES activities, and that human activities be run using the Thin Client ( i.e. Checkout/Checkin as opposed to Start)
_________________
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
supreeth
PostPosted: Thu Sep 14, 2006 8:02 pm    Post subject: Reply with quote

Voyager

Joined: 17 May 2005
Posts: 90
Location: London

Hi,
See first of all its to be understood tat UPES is more suitable for an automatic activity. So, when the UPES is invoked, the activity would be in running state, if its a synchronous activity (activity waiting for a response message from UPES). It would then be completed once a response message is sent back to the activity waiting for it.

Quote:
Do we need to replace all of the API calls? please help me understand.


You, first of all would not be using any of the API's for processing ur activity, which makes it clear tat u wudn be needing any API's inside ur UPES implementation. if u r concerned abt the rest of ur flow, like creating an instance from a template, processing other activities not associated with UPES, there is no need to replace anything. you can continue to use the same APIs u are familiar with and have been using.

cheerz!!!
supreeth
_________________
Supreeth Gururaj
IBM Certified WMQ Solution Expert
Back to top
View user's profile Send private message
parsar
PostPosted: Fri Sep 15, 2006 9:05 am    Post subject: Reply with quote

Novice

Joined: 08 Dec 2005
Posts: 22

Hi Supreeth , John and others ...

Thanks for your replies..

If UPES is recommended for automatic activities then is it true that we are not completely replacing PEA with UPES ? I read somewhere that we are not supposed to use PEA at all!!

I am asking this question since we had a problem with the FMC.CLIENT.TPEA being full since some progam was not executed due to some error and the messages in the queue were not being flushed out and we had core dumps generated. We raised a PMR with IBM and we got this response.

You have used a PEA to start some program within your business process. The PEA is a Program Execution Agent, not a server. To describe what is happening, the execution server will send a message to the PEA input queue for each activity that is to be implemented by that PEA. The PEA process reads messages off its input queue and, for each message, a new thread is started to handle this request. The request is passed on to the actual implementing java program (via the high performance
bridge). If enough messages are sent to the PEA input queue in a short period of time then, for each message, at least one thread is created (possibly more depending on thread creation in the JVM).
This kind of stress is going to quickly exhaust system limits.

The scenario here is that the PEA is being used as a program execution server (PES). This is a misuse of the PEA. The following extract from the Concepts and Architecture Guide makes this clear:

Part 2 - Chapter 5 Architecture Overview - What is a system - the client components.
"To invoke application programs within your workflow, MQ Workflow uses a Program Execution Agent for the execution of executable programs (EXE or DLL) on a client machine and a Program Execution Server for the automatic and unattended execution of backend programs on the server."

I appreciate your patience in answering my questions .

I am happy I am learning new concepts.

Thanks a lot.
Back to top
View user's profile Send private message
vennela
PostPosted: Sun Sep 17, 2006 8:25 am    Post subject: Reply with quote

Jedi Knight

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

parsar wrote:

I understand the java program that you have posted in the repository -> java section above...

That is not a UPES program.
The XML interface in workflow has two objectives
1. To start/stop... processes
2. For UPESs

If you use UPES for an activity, you will be completely replacing PEA for that activity.

You should really read the XML interface in the programming guide and then search for some posts in the forum and then post any questions.
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 » UPES Concepts
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.