|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
[Solved] Multiple outputs from looping process (in Holosofx) |
« View previous topic :: View next topic » |
Author |
Message
|
Drooster |
Posted: Thu Mar 27, 2003 11:22 am Post subject: [Solved] Multiple outputs from looping process (in Holosofx) |
|
|
Newbie
Joined: 27 Mar 2003 Posts: 6
|
Hi,
I'm a new user of both MQWF and Holosofx and don't know enough to know if this is possible (let alone how it would be done if it is possible). I'm doing my modeling in Holosofx....
I have a dynamically-sized data array that I want to loop through in a sub-process. For each element of the array, I want to perform some calculations and return some results to my main process. Based on other posts I've found in this forum, I decided to store this array in a database and store the key and the index to which element is current in my MQWF data structure. Likewise, the data that is to be returned to the main process will be a dynamically sized array, so I'll need to return the key and index there, too.
I've gotten everything else to work, it's just that my sub-process only goes through the loop once. I have two output connectors from my task that performs all the calculations: one to a decision that decides to do the loop and one to the output data structure (which should be passed to the main process, right?). I have the decision attached to a STOP element if the looping should stop and to the loop if it should continue. I've set the sub-process as a BLOCK type based on other posts I've read in this forum.
Any ideas?
TIA,
Drew
Last edited by Drooster on Mon Mar 31, 2003 8:05 am; edited 1 time in total |
|
Back to top |
|
 |
Ratan |
Posted: Thu Mar 27, 2003 11:36 am Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
I am unable to follow what you are doing, but this what you need to do to get your loop working.
1)Put all the activities that have to be looped inside a block (in your case the subprocess and an activity to decrease your array index).
2)Set the block exit condition to index=0.
3)Map the index datastrucuture member of the 'decrease index' activity to the output structure of the block.
4)use a data loop connector to map the o/p structure of block to the input structure, so that you get a new index (index-1) for each execution.
-Laze. |
|
Back to top |
|
 |
jmac |
Posted: Thu Mar 27, 2003 11:37 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
You need to put the code that you want to loop into a Block with an exit condition.
Holosofx does not generate the block for you when use the GOTO and STOP options. Essentially from the point of view of MQWF they are useless.
GOOD LUCK _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
Drooster |
Posted: Thu Mar 27, 2003 3:20 pm Post subject: |
|
|
Newbie
Joined: 27 Mar 2003 Posts: 6
|
OK, I'll try to explain a little better (and give better details)....
In my sub-process, I have a global data structure that's being passed in. This data structure, among other pieces of information, has the key to the dynamic array and the index of the current element of this dynamic array (the first time in the sub-process, the index is set to point to the last element of the array). It also contains a place-holder for the data that I want to send to my main process each time through the loop.
The Phi representing my global data goes directly to the 1st (and only) task of the sub-process. This task points to an application that calls a Java class to perform my calculations, which are to receive the current element of my array, lookup some data for that element to write back into my global data, and decrement the index to my array.
I want this to go to my main process, so I have another Phi attached to the task. I also possibly need to loop through the array and get the next element, so I have a Decision attached to the task, too. In the Decision, I check the value of the index I decremented in the code to see if there are more elements that need to be processed (true condition). I don't have an explicit false condition entered for the Decision. I have the Loop attached to the true condition of the Decision and Stop attached to the false condition (since, by that point, the data should have been sent on its way to the main process). The other end of the loop is attached to the 1st task.
For every control I placed in the sub-process, I mapped STRUCT to STRUCT (if I saw a place to do such a mapping in the control's properties). Also, in my Java code, I explicitly copy every element in the input container to the output container.
The data that I'm testing with should have 3 elements in the initial array, but I'm still only going through the loop 1 time. I have put loads of tracing statements displaying the contents of my input/output containers and they all appear as I expect.
I have a feeling that my problem is in the Decision properties, but I don't understand where/how to fix it.
I guess I could remove the Decision entirely, attach the Loop directly to the task, and place some kind of transition condition on the connector?
I hope this is more clear....
Thanks again,
Drew |
|
Back to top |
|
 |
jmac |
Posted: Thu Mar 27, 2003 3:27 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Drooster wrote: |
I have the Loop attached to the true condition of the Decision and Stop attached to the false condition (since, by that point, the data should have been sent on its way to the main process). The other end of the loop is attached to the 1st task. |
Like I said, the STOP and the GOTO are useless when you are trying to model for MQWF. You must put the activities you want to repeat in a block and have that block fail its exit condition.
GOOD LUCK _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
Ratan |
Posted: Thu Mar 27, 2003 4:23 pm Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
John, Out of curiosity, for what other workflow systems can you use HOLOSOFX(I have never used it) to model ?
-Laze |
|
Back to top |
|
 |
jmac |
Posted: Thu Mar 27, 2003 4:59 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Laze:
It did support FileNet, but now that IBM owns it, I don't know if that will continue. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
Drooster |
Posted: Thu Mar 27, 2003 6:23 pm Post subject: |
|
|
Newbie
Joined: 27 Mar 2003 Posts: 6
|
jmac wrote: |
Like I said, the STOP and the GOTO are useless when you are trying to model for MQWF. You must put the activities you want to repeat in a block and have that block fail its exit condition. |
John, I think I understand now.... Basically, the Decision, Loop (Goto), and Stop are completely unnecessary? So I should have the input Phi, my task, and the output Phi? How do I put the exit condition on the process Block? Is that specified by the End Expression for the sub-process's properties (from the main process)? Somewhere else?
And this should produce a path through the main process for each of the elements in my array (i.e. each time through the loop)? Finally, what will the state of the input to my sub-process be on subsequent paths through the loop? The initial values or the updated values?
Sorry for the (probably simple) questions, but I've been using Holosofx for about 2 weeks now and haven't found the documentation to be that helpful....
Thanks again for your help!
Drew |
|
Back to top |
|
 |
jmac |
Posted: Fri Mar 28, 2003 6:26 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Drew:
Yes I think you've got it now.
It is my opinion, that using the BPM modeling tool to build your models without a knowledge of Buildtime is a receipe for disaster. You should probably take a look at some the Buildtime Doc thats available, The Getting Started with Buildtime Manual, and there is some redbook on using MQWF with NT or some such... I know it is mentioned in this forum, just do a search in the forum on redbook.
The BPM documentation will realy not help you much in putting together a workable MQWF model, unless you know what a workable MQWF model looks like.
NOW, I freely admit my prejudice in this area. I have been using buildtime with all its warts in its various incarnations for 7 or 8 years, so I am extremely comfortable with BT. On the other hand, I have only begun to get intimate with BPM. For the most part I can do just about anything I need to with BPM, there are however, a few things that BPM does not support, but I expect that IBM will be addressing these in the near future.
So now, to solve your problem (I hope), you must put the looping activities into a BPM Process then when you include that Process in your diagram you must indicate that you want it to Export Type "Block". On that Process icon, you then set the end condition.
GOOD LUCK. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
Drooster |
Posted: Fri Mar 28, 2003 7:12 am Post subject: |
|
|
Newbie
Joined: 27 Mar 2003 Posts: 6
|
John,
Thanks! The looping now works. However, the main process doesn't continue until all iterations of the loop have completed. What I want to happen is for each iteration through the loop, I compute some data that I want passed to the main process.
Maybe I could remove the End Expression from the sub-process, attach the output Phi to the sub-process (as I have it now), and add a Stop that would also be attached to the sub-process. I would then put a transition condition on the Stop's connector (similar to my current End Expression). Would this still cause my sub-process to loop AND pass the data to the main process after each loop iteration?
Thanks again,
Drew |
|
Back to top |
|
 |
jmac |
Posted: Fri Mar 28, 2003 7:31 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Drew:
Send me your generated FDL, I will fix it in Buildtime, and return it to you. You can then import it into BPM and see what is different. Send FDL to my email address. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
Drooster |
Posted: Fri Mar 28, 2003 9:02 am Post subject: |
|
|
Newbie
Joined: 27 Mar 2003 Posts: 6
|
John,
I've sent the FDL to you.
Thanks again,
Drew |
|
Back to top |
|
 |
dkrawczynski |
Posted: Fri Mar 28, 2003 9:09 am Post subject: |
|
|
 Apprentice
Joined: 19 Dec 2002 Posts: 26 Location: Dallas, TX
|
I'll throw my two cents in. I am in agreement with John. If you are deadset on using Holosofx Workbench to model your processes you still need to understand what the FDL is that is generated by the Workbench because the FDL can look quite different than what you see in the Workbench.
I highly recommend exporting the FDL from BPM Workbench and import it into Buildtime so that you can review exactly what the runtime server will be executing. If you do not do this, you will most likely be confused because your process does not behave as you expect.
I also highly recommend as John does, that you take the time to get familiar with the Buildtime tool and how to model your processes there. It will save you GREAT amounts of pain and suffering when you are testing your process templates in runtime. _________________ Doug Krawczynski
IBM Certified Solutions Expert -
MQSeries Workflow |
|
Back to top |
|
 |
Drooster |
Posted: Mon Mar 31, 2003 8:01 am Post subject: |
|
|
Newbie
Joined: 27 Mar 2003 Posts: 6
|
Based on info exchanged w/ John, it appears that what I want to do is not really doable (at least, not the way that I want to do it).
So, I'll write my data somewhere each time through the loop. If the data already exists, I'll append the new data to it. Then, when I'm done looping, I'll have one output with all the data in it....
Thanks, everyone (especially John), for your help and advice,
Drew |
|
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
|
|
|
|