|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
[SOLVED]Problem with UPES |
« View previous topic :: View next topic » |
Author |
Message
|
supreeth |
Posted: Sun Jul 24, 2005 3:46 am Post subject: [SOLVED]Problem with UPES |
|
|
 Voyager
Joined: 17 May 2005 Posts: 90 Location: London
|
Hi,
We were using Workflow 3.5 in our project and recently, we got a requirement to use workflow 3.6 in the project. So, the existing automatic activities, which were written in java need to be changed, as the java activities cannot be invoked by the program execution agent from workflow 3.6 onwards.
So, There is a requirement for me to write a UPES. I read through the programming guide for workflow 3.6 (Chapter 33 - Invoking an activity implementation). Explanation is available here about how an UPES can be modelled in build time, and about the kind of messages put by the workflow in the UPES queue (for activity implementation, expired messages, program termination etc).
I am finding it a bit difficult to organize my thoughts on how i can invoke the activity implementation program. I mean, the workflow puts an xml message on the user's input queue, from where i can trigger the upes program. But, how can i pass the input data required by the activity implementation program, after parsing the xml message given by workflow.
How can the activity implementation program be written to take input from the UPES program and how will it return the value back to the UPES program? Is this exercise as simple as invoking a method by passing the input data as a parameter to the method and getting back the output as a result object (result object containing fields of the output data container and the return code)
I am having a very hazy picture about this thing. Could anyone kindly give me the right pointers so that i can get my understanding clear about this issue.
Thanks and Regards,
Supreeth
Last edited by supreeth on Mon Jul 25, 2005 6:19 am; edited 1 time in total |
|
Back to top |
|
 |
jmac |
Posted: Sun Jul 24, 2005 5:36 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
supreeth wrote: |
How can the activity implementation program be written to take input from the UPES program and how will it return the value back to the UPES program? |
If I am understanding you correctly, what you seem to be missing is the fact that the UPES program is the Activity Implementation. After parsing the container simply use the same code to solve your business problem as you did in the past. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
vennela |
Posted: Sun Jul 24, 2005 10:13 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
|
Back to top |
|
 |
supreeth |
Posted: Sun Jul 24, 2005 8:45 pm Post subject: |
|
|
 Voyager
Joined: 17 May 2005 Posts: 90 Location: London
|
Hi John, Vennela,
Thanks for the reply to my query.
Quote: |
what you seem to be missing is the fact that the UPES program is the Activity Implementation.
|
Here's what i have understood about the UPES and its usage. Kindly correct my understanding if i am wrong anywhere.
While modelling the activity, we would have specified a program registration, which in-turn would have a corresponding executable (or dll)to be run on various platforms. Now, the XML message put by the workflow has information about the executable to be used and the parameters to be passed to it.
Now, for us to trigger an application from the WMQ queue, we need to have defined a program definition which would have details of the program to be started when the message matching the trigger criteria is put on the queue.
Now, I was of the understanding that we would trigger the UPES program. This program would inturn parse the executable to be run, the parameters to be passed to it and the environment (like start in foreground, inherit environment etc).
Code: |
<ProgramID>
<ProcTemplID>AAAAAQAwgAAAAAAAAAAAAA==</ProcTemplID>
<ProgramName>TestUpes</ProgramName>
</ProgramID>
<ImplementationData>
<ImplementationPlatform>WindowsNT</ImplementationPlatform>
<ProgramParameters>TestUpes</ProgramParameters>
<ExeOptions>
<PathAndFileName>C:\j2sdk1.4.2_04\bin\java.exe</PathAndFileName>
<InheritEnvironment>true</InheritEnvironment>
<StartInForeGround>true</StartInForeGround>
<WindowStyle>Visible</WindowStyle>
</ExeOptions>
</ImplementationData>
|
By having information about the program to be executed, the parameters and the environment under which the program is to be run, the UPES would invoke the required program accordingly. This is where i am stuck up
Please tell me where have i gone wrong in understanding the functionality. Also, kindly provide me pointers to help me understand the same.
Thanks and Regards,
Supreeth |
|
Back to top |
|
 |
vennela |
Posted: Sun Jul 24, 2005 9:11 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Supreeth:
Your first impression of UPES is what I think is normal.
But, in reality these are some of the things you should understand.
1. If the activity is a UPES program, the executable will be ignored. But, you can use it for some other purpose if needed.
2. All a UPES activity does is: workflow will put an XML message to the UPES queue. It is your duty to use the message for some kind of business processing. Usually the programs that server as UPES programs will do the follwoing.
a. Get the message from the QUEUE
b. Parse it. Get the INPUT DS values. Use them for some kind of business processing.
c. If the UPES is a synchronous activity, then reply to the EXEXMLINPUTQ, with the output DS.
So, in the case of UPES, workflow is not going to do anything for you other than PUTting a message to your UPES queue.
Hope this helps. |
|
Back to top |
|
 |
supreeth |
Posted: Sun Jul 24, 2005 10:37 pm Post subject: |
|
|
 Voyager
Joined: 17 May 2005 Posts: 90 Location: London
|
Hi Vennela,
Thanks a lot for helping me understand the concept. It really helped me come out of the "mental block" state.
Here's what i have understood.
1> The activity implementation logic has to be developed in the UPES program itself.
2> If there is more than one automatic activity, we have to trigger different UPES programs.
3> To trigger different programs, we can either trigger a generic program which inturn call different methods to do the activity implementation (based on the activity to be implemented). Or we have to have different UPES servers listening on different queues which directly invokes the corresponding UPES program.
Thanks a lot once again (Vennela and John) for all the help. Kindly let me know whether my understanding on the concept, as described above is correct.
Thanks and Regards,
Supreeth |
|
Back to top |
|
 |
kotha |
Posted: Mon Jul 25, 2005 5:40 am Post subject: |
|
|
Partisan
Joined: 12 Mar 2005 Posts: 333
|
supreeth wrote: |
Hi Vennela,
we have to have different UPES servers listening on different queues which directly invokes the corresponding UPES program. |
all your UPES activities can use one QUEUE or each UPES can have different queue. that will be based on the data structures and the messages load on the queue. So based on this, you can develop code to use those variables in your business process. |
|
Back to top |
|
 |
vennela |
Posted: Mon Jul 25, 2005 6:06 am Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
supreeth wrote: |
Thanks a lot once again (Vennela and John) for all the help. Kindly let me know whether my understanding on the concept, as described above is correct. |
You are on the right track |
|
Back to top |
|
 |
supreeth |
Posted: Mon Jul 25, 2005 6:19 am Post subject: |
|
|
 Voyager
Joined: 17 May 2005 Posts: 90 Location: London
|
Hi Vennela,
Thanks a lot once again. It really did help a lot and more so at the right time.
Thanks and Regards,
Supreeth |
|
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
|
|
|
|