IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

WebMethods 61 Developer New User Frustrations

webMethods Community Member

webMethods Community MemberTue April 13, 2004 04:28 PM

  • 1.  WebMethods 61 Developer New User Frustrations

    Posted Wed March 17, 2004 09:28 PM

    The so-called developer tool sucks! It is a torture to a developer. If you lay all the so-called service steps one by one and never need to modify it later, it may work. If you ever dare to change something later, I would recommend the following procedure to save you a lot of time and headache:

    1. Save a copy the integration or rename it;
    2. Delete the one you need to modify;
    3. Re-write everything.

    Do you have any better way?


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: WebMethods 61 Developer New User Frustrations

    Posted Thu March 18, 2004 01:36 PM

    Certainly Developer 6.1 is much different from the old developer tool. My personal pet peeves:

    1. No option to change the name of the services back to the old format, without the full namespace. The full namespace makes the service name very long, often pushing any comments on the step off the right side of the screen.
    2. No way to make the pipeline area at the bottom cover the entire bottom of the screen while still keep properties visible.
    3. If running in anything less than 1024x768 resolution, it’s very difficult to get all the panes on the screen at the same time.
    4. There’s no way to connect to older versions of webMethods, so I have to keep multiple versions of Developer around to have access to all my environments.

    Having said all that, though - I don’t think that “Developer 6.1 sucks”. It’s very possible to get your work done, and some things are even easier. For example, you can now view both the flow steps and the results pipeline at the same time while debugging. I’m glad webMethods is trying their best to improve the development tools.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: WebMethods 61 Developer New User Frustrations

    Posted Thu March 18, 2004 03:55 PM

    Skip: I’ve gotten used to it - one thing that helps is using the ‘perspective’ views. There’s one for development, one for testing and one for the details (results). Think of them as the old tabs - with one click you just go to the details perspective (set it up to have the results as the full width of the screen).

    Frustration:
    What exactly do you want to change in your flow? There’s almost never a reason to delete a flow entirely and start over unless you created a bad design yourself.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 4.  RE: WebMethods 61 Developer New User Frustrations

    Posted Thu March 18, 2004 04:30 PM

    I agree that Developer 6.1 is much different from the old WM developer tools and better than the old ones. But I don’t think it is a good development tool (UI is not a big issue to me). Many of the WM developers are traditional java or C programmers. WM Developer tool broke many “common sense” to the programming tradition. Probaly I need to learn more undocumented tricks from this forum.

    Here is one some example I experienced:

    Simple integration, with step A, B, C, D, where A is a DB adapter service. I had a typo when I created A. After I finished the integration I realized it. Problem: I cannot rename the output document name for A. I had to delete A and rebuild it to solve a simple typo. Of course if you don’t mind a document being called “DBServer” while it should be “DBService”, then the problem doesn’t exist. When I did the delete, I had to allow the integration to delete A.

    Branch: I though it was implementation for “case” but I was wrong. Here is the pseudo code:

    Loop A.results
    Map A.results.anyvalue to temp
    Branch on A.results.flag:
    A1: logic, clean up temp by a drop
    A2: logic, clean up temp by a drop
    Then, temp is not available in the pipeline of A2 because it is dropped in A1. A1 and A2 are mutual exclusive. Whatever A1 does shouldn’t effect A2. Furthermore, it could be helpful if the pipeline can implement the concept of block and scope instead of having everything as global variables.

    Transaction: wm.art.startTransaction
    Want to debug something with XA_transaction? Disable the transaction steps. Want to go production? Enable them back. Error? disable them and debug.

    Delete a step (by mistake), Save, and put it back. You will see some maps related to the output of that step turn “blue”. Solution: Delete the maps and redo it. I think the reason is that the save also does a code generation and compilation, which requie the pipeline to be cleaned.

    OneWorld adapter? The customers are free QA people.

    Multi-instance of an adapter? Not a good idea. The queue only supports one-lane traffic.

    And etc, etc…

    I don’t want to offend or argue with any reader here. If my tone in this post is sarcastic, please don’t take it personal. I just don’t like to tool and I have to use it. So I dislike it, and I need to learn more.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 5.  RE: WebMethods 61 Developer New User Frustrations

    Posted Thu March 18, 2004 05:02 PM

    Yes there are some idiosyncrasies!

    For your first comment, why can’t you just rename the output variable in your first step (adapter service) then just remap the new variable in the 2nd step.

    2nd comment - (the branch steps). Realize that when you drop something in the pipeline it is at design time not run time. So if the first branch isn’t executed the variables won’t be dropped. This you have to live with.

    Yes the global concept is bad from past history. There are many frameworks now implementing the “pipeline” as a design pattern where documents can flow through the pipeline and be modified at various points in the flow.

    Good luck with your learning experience. Have a positive attitude if you can. I personally love the product not just because the pay is much better having a niche skill!


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: WebMethods 61 Developer New User Frustrations

    Posted Thu March 18, 2004 08:55 PM

    First Comment:
    (1) You cannot rename the name of the output doc of a DB adapter service;

    (2)If you change the output docname in the pipeline of flow service (the caller to the DB Adapter service), as soon as you save it, the name will be reversed to the old name.

    Second comment:

    You misunderstood what I said. I was talking about design time. If you drop temp in A1, then you won’t see temp in the pipeline of A2 at design time. My point is that this shouldn’t happen since it is a switch case scenario. It should know that something done in an “if” shouldn’t effect the stuff in “else”.

    Third comment:

    Agree. The concept is good. But we are also programmers, besides Document type, we may need local variables occasionally, such as the temp in my case. A code example:

    {
    int flag
    int temp = GetValue(doc.f1);

    if(flag==1)
    {
    …logic around temp
    drop temp;
    }
    else if (flag==2)
    {
    //I want to see temp here. But Developer doesn’t have it because it is dropped above
    }

    Last comment: Strongly agree. I will try to have a positive attitude since a negative one won’t help.

    It is nice exchanging ideas with all of you here. If possible, could the admin change the title of this thread? I don’t like the tool, but I don’t want to convey any aggressive or offensive sense the users who like WM Developer (and I didn’t mean to in the beginning, I was just frustrated by the tool). Let’s just talk technical stuff.

    Thanks!

    P.S. Is the niche market for WM sustainable? No offense, we are on the same boat.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: WebMethods 61 Developer New User Frustrations

    Posted Thu March 18, 2004 09:14 PM

    Correction:

    That switch…case problem is not persistent on my machine. It may be a side effect of other operations (delete, rename…). I will also re-install the Developer to see if there was any issue with the installation itself.

    Sorry about the confusion.

    Regards.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: WebMethods 61 Developer New User Frustrations

    Posted Thu March 18, 2004 09:38 PM

    I have a ‘select’ adapter service. I can rename any output variable I want. If you really can’t do this in your case, just add a map step after to call the service and map it to another document with the name you want. Sometimes you have to remap though if you get a new version of an XML schema for example which is largely different from the previous version. Equate this to changing your XSLT to follow the new schema.

    I understood what you meant about design time. I said you have to live with it. But you can get around it by not dropping the variable in the first branch so you see it in other branch steps. Then drop after the branch is complete (so the variable’s in the pipeline a bit longer - no biggie). You can drop into java any time you want if you want to use local variables, or create a variable at the beginning of each branch step and drop it at the end of each branch step. Do this for each branch step similar to creating a local variable in each case. In java you would have to declare the local variable inside each case step. To mimic this you would create a variable and drop it within in branch step using map steps or whatever.

    A better approach for you might be to ask how to something can be done in webMethods similar to what you’ve done in code. But generally speaking the idea is to perform your business logic outside of webMethods (in SAP, J2EE server, oracle stored procs,etc) so you can still do it the way you’re used to.

    webMethods niche won’t last forever but since we are smart we will keep on top of new technologies to keep the demand for our skills up.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 9.  RE: WebMethods 61 Developer New User Frustrations

    Posted Thu March 18, 2004 11:09 PM

    I agree with most of your points.

    I still need to use the WM platform. My complaint was that it is against the traditional programmer’s thinking. WM does provide many goodies, such as guranteed delivery, transaction management, etc. On a high level, it provides an integration platform, whcih is good. But on the detail level (development), the overhead is a headache. There are too many things in WM beyond your expection. Yes, you can always get the work done with some workaround. Eventually I got my work done. But I didn’t feel comfortable with it.

    Have you ever used BEA or Biztalk? As a senior WM user, what do you think?

    Another tech question: How do you escalate exceptions? I can use a try…catch sequence to wrap on a service. If I want to call the service from another service, how do I keep the structure?

    Example:

    Service 1:

    sequence
    seq1 try
    logic
    seq catch
    GetLastError…

    service 2:

    Sequence
    sequence try

    service 1
    service m
    service n
    sequence catch

    I would like to jump to the catch and bypass m and n if service 1 fails. Any idea? Thanks!


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 10.  RE: WebMethods 61 Developer New User Frustrations

    Posted Thu March 18, 2004 11:53 PM

    Typically we only use try/catch sequences if you want to handle the exception. This means it’s usually only done at the top level service (the entry point to all subsequent flows). In your example, service1 wouldn’t have a try/catch sequence so the exception would propagate from service1 up to service2 (the calling service).

    If you need to catch the exception in service1, you can rethrow it in the catch block (similar to java). Or sometimes I trap a db insert error so I can continue with the next iteration, but higher level services would be unaware of this exception of course. I like to use a throwServiceException java service instead of the EXIT and signal failure flow step.

    Over time I’ve learned to keep the flows as simple as possible, use other systems for the business logic and use webMethods to shunt the files around using as much configuration rather than development as possible (using TN, etc).

    People I’ve talked to have said that Biztalk and Tibco is more painful than webMethods but I haven’t used them. I am a J2EE convert and I much prefer webMethods or at least integration over web app development. In either case I find the majority of the time spent is gathering requirements and doing design rather than development in either case.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 11.  RE: WebMethods 61 Developer New User Frustrations

    Posted Fri March 19, 2004 12:48 AM

    my two cents…

    over time - I have gone from deep frustration to down right appreciation!

    I think you’ll find that the flow platform that webMethods has invented is extremely powerful. I view programming very differently now.

    I think a healthy balance of OO best practices mixed in with the straight forward linear/sequential nature of flow can produce great results.

    As with all programming - the first steps are painfull and the resulting code is likely a mess. It will get better.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 12.  RE: WebMethods 61 Developer New User Frustrations

    Posted Sat March 20, 2004 02:09 AM

    Question regarding exception for the experienced users:

    I am trying to make a service as below:

    loop
    try{…logic…}
    catch(ServiceException)
    {
    public error notification but not exit the loop
    }

    My problem is that in the try block, if something is wrong, the whole service exits. I would like to have the loop keep going. How do I do this? And How do I catch the ServiceException thrown in a step? Thanks!


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 13.  RE: WebMethods 61 Developer New User Frustrations

    Posted Sat March 20, 2004 02:44 AM

    Another question regarding transaction:

    Read DB1.T1

    Loop DB1.T1.results

    try
    art.startTransaction
    update DB2.T2
    update DB2.T3
    update DB1.T1 (mark the flag in T1 as “processed”)
    commitTransaction
    catch
    rollbacktransaction

    end loop

    This is related to my question above since the sequence try-catch simulation cannot bring the flow back to the loop if result[i] causes problem. And I want to keep the loop going. (I could use getLastError and detect if lastError is null. Any better way?)

    I have all the DB adapters support XA_Transaction, but then the flow doesn’t allow me to put atr.startTransaction, with error NSException. How do I maintain a transaction within a loop? To use art.transaction, do I have to turn on XA support? (I want to keep the data integrity for each loop step but I don’t want one bad record to stop the others)

    Any idea? Thanks a lot!

    P.S. I start to get better understanding as I dig into the tool now.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 14.  RE: WebMethods 61 Developer New User Frustrations

    Posted Sat March 20, 2004 10:01 AM

    LessFrustration

    look more closely at “Repeat” step especially at “Repeat on failure” part

    Thahir


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 15.  RE: WebMethods 61 Developer New User Frustrations

    Posted Mon March 22, 2004 02:50 PM

    Yes, I thought the exit on failure in the loop would perform as a “continue” statement. But it actually acts as a “break” + system.exit(). The exit on success and done are working as expected. Thanks!


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 16.  RE: WebMethods 61 Developer New User Frustrations

    Posted Tue March 23, 2004 08:06 AM

    Frustration,

    First of all, welcome to WM Users! We’re glad to have you hear as a new user of the webMethods products.

    Second, thanks to Will et all for patiently attempting to answer the questions buried in your ranting. In the future, you’ll have better luck here with a bit more balanced approach. The members here are some of the world’s leading webMethods developer and architects. Bring your questions with a positive outlook on life and you’ll be amazed at the quality of the responses you’ll receive.

    Lastly, take a minute and register using this link [url=“wmusers.com”]wmusers.com. We hope you’ll become a regular poster here.

    Regards,

    Mark Carlson
    WM Users Forum Moderator


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 17.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed March 24, 2004 09:56 PM

    Dear Mark,

    Thanks for the comments and thanks for changing the thread title. But please be careful when you refer other people’s talk as “ranting”, which may convey a very negative sense. Except for the initial post, all my questions were clearly described in a professional way and not buried in “ranting”. If you want the users to bring in positive outlook, as a moderator, please don’t use negative word yourself.

    If you think it is inappropriate to have this thread open, please delete it.

    Thanks for all the replies!

    Best Regards


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 18.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed March 24, 2004 10:55 PM

    I think the combination of the anonymous identity, original title for this thread and your initial post qualified as a flame or rant. I agree that subsequent posts (from all parties) were more substantive and are the reason that I didn’t delete this thread.

    Sign up as a registered member and visit often. We welcome your questions and feedback.

    Mark


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 19.  RE: WebMethods 61 Developer New User Frustrations

    Posted Thu March 25, 2004 02:48 AM

    When you have an unregistered username of Frustratration then switch it LessFrustration, start your first post with the product “sucks” and then identify yourself as a new user to the product, people may get the wrong idea.

    Here’s some advice.

    1. Join the group and by that I mean register. It’s nice to know who we’re talking to. The more users we have the more voice we have. I’m always amazed at how many voyeurs they are on this community.
    2. Post your questions, we will respond!
    3. Reply to some post and help someone else out. Share the knowledge. That’s how we all learn.

    Lighten up and welcome to the group.

    No replies Needed!


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 20.  RE: WebMethods 61 Developer New User Frustrations

    Posted Thu March 25, 2004 05:26 AM

    My experience with 6.1 developer is very pleasing. With a week’s work in 6.1 developer GUI, i can’t think of going bak to 4.6 developer.
    Mouse wheel works in 6.1, many other new tabs and increases productivity.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 21.  RE: WebMethods 61 Developer New User Frustrations

    Posted Tue April 13, 2004 03:45 PM

    the biggest thing that pisses me off is that when you copy and paste a service, it pastes the service but does NOt open it… .many a time i have made changes to the original service i was trying to copy thinking i was working on the copy only to realize after getting PRD errors that i changed the original… very annoying especially when you’re trying to debug an issue in PRD by stepping thru the pipeline… im used to it by now but this caused plenty of headaches at first…

    overall the new developer is MUCH better than the old one…


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 22.  RE: WebMethods 61 Developer New User Frustrations

    Posted Tue April 13, 2004 04:28 PM

    Disabled line gets enabled

    Ex.

    1. SEQUENCE
      2) BRANCH
      3) MAP

    Now
    Step1) disable the line 3
    Step2) disable the line 1
    Step3) enable the line 1

    Result: Line 3) gets enabled as well! (I do not want the line to be enabled)


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 23.  RE: WebMethods 61 Developer New User Frustrations

    Posted Tue April 13, 2004 09:08 PM

    Ramendu,

    I actually prefer this behavior. If you enable or disable a sequence, I think everything in that sequence should be affected. If not, what does it mean to disable/enable a sequence if its contents are not affected?

    Mark


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 24.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed April 14, 2004 01:58 AM

    Mark,
    Yes, you’d have grounds to complain if this wasn’t the case.
    Also, enabling child flow steps by enabling the parent sequence isn’t new to Developer 6.1.

    Nick Faiz


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 25.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed April 14, 2004 07:21 PM

    I think Ramendu was suggesting undo/redo feature at sequence level (atleast for the specific session)
    I think it would come with significant performance/memory penalty if wM decides to implement it. Interesting though! I wished many times for that feature.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 26.  RE: WebMethods 61 Developer New User Frustrations

    Posted Tue November 16, 2004 06:33 PM

    Hi Guys,

    This thread has been very helping to learn about the flow steps in developer. I am confused about how to implement the following scenario and still it is on investigation …if any of you can help …it would be greatly appreciated.

    For example …

    Flow Service 1 starts :
    try

    some conditional …EXIT( from flow ) step


    catch


    Flow Service 1 ends

    Flow service 2 starts :


    invoke Flow service 1


    Flow service 2 ends.

    Flow service 3 starts :


    invoke Flow service 2


    Flow service 3 ends.

    Now the question is:

    When my conditional EXIT step executes in flow service 1, it has the ability to come out from the current running flow (its flow service 1). But I want to come out from all the parent flow services, too and stop the execution of it completely.

    The only solution what i know is to develop a java service with a single statement ‘System.exit()’. I have not tried it though.

    If any of you know the better solution in webMethods itself, i request you to share the same with me.

    Regards,
    Nilesh


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 27.  RE: WebMethods 61 Developer New User Frustrations

    Posted Tue November 16, 2004 09:35 PM

    Nilesh,

    If you call System.exit(0);, the JVM will exit, stopping the whole IS. I assume this is not the desired action. Instead, try nesting your try/catch blocks so that the “exception” trickles up to the highest level. Make sure you signal “failure” so that the upper-level catch statement is reached. I just tried this and it worked.

    Tate

    Flow Service 1 starts :
    try

    some conditional …EXIT( from flow ) step


    catch


    Flow Service 1 ends

    Flow service 2 starts :


    try
    invoke Flow service 1
    catch
    EXIT from flow, failure


    Flow service 2 ends.

    Flow service 3 starts :


    try
    invoke Flow service 2
    catch
    EXIT from flow, failure


    Flow service 3 ends.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 28.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed November 17, 2004 01:24 AM

    Hi Tate

    Thanks for your response. Let me try this and update you.

    What I believe is if i exit with signal failure …i will not be getting the lastError in pipeline of the top level service. But that is my assumption. First let me try the solution given by you.

    Regards,
    Nilesh


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 29.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed November 17, 2004 04:38 PM

    Hi Tate,
    I tried and its working exactly the way you explained.

    But when I say ‘Exit from flow’ with failure, it overrides the lastError object.

    So my purpose is not getting served with this solution. My exact requirement is when some exception/error occurs in the low level (in our example, service 1), i dont want to execute any further steps and want to come out of the all the parent flows.

    If we exit with failure, i am not getting the actual exception as lastError.

    If I repeat my example:

    Flow Service 1:
    START
    |–TRY
    |-- MAP step
    |-- INVOKE divideInts (divide by zero to create excpetion …)
    |–CATCH
    |-- INVOKE lastError
    |-- EXIT from FLOW with Failure (failure msg: ‘Exiting …’)

    Flow Service 2:
    START
    |–TRY
    |-- MAP step
    |-- INVOKE Flow Service 1
    |–CATCH
    |-- INVOKE lastError

    Flow service 3:
    START
    |-- MAP step
    |-- INVOKE Flow service 2
    |-- MAP step

    While executing Flow service 3, it gives me lastError in the pipeline with error message ‘Exiting …’. and exception type as ‘FlowException’.

    I need the actual exception details as: ‘Arithmetic Exception’ and exception type as ‘ServiceException’.

    That is also true, in this scenario, my actual exception is available but it is under lastError/pipeline/lastError/…exception details …

    Is there any way to stop the complete flow when exception in service 1 ?

    Regards,
    Nilesh


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 30.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed November 17, 2004 05:22 PM

    In order for this to work the way you want, you will need to have the try/catch sequences in the very FIRST flow service.

    All calls should be made to sub-flows without any try/catch blocks. This will percolate the errors all the way out for you.

    There are instances however, where you will not want this. If this is the case, then you can bury catch blocks under the very first calling flow but be aware that the first catch block catches the error and proceeds to continue.

    This can be handy if you are trying to connect and disperse data across multiple systems and in the event of an error, can move to the next processing step without issue.

    HTH

    Ray


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 31.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed November 17, 2004 05:47 PM

    Ray,

    Thanks for the prompt response.
    I did the same what you said. We have the scenario, where we need to handle the exceptions in sub flows. The other option is also a better one.

    But in that case, i have to remove TRY/CATCH from my both the flow services (i.e. flow service 1 & 2). Then only the actual exception in flow service 1 will propagate till flow service 3.

    One more trouble is, in either case, I am not able to exit from all the flows. In any of these cases, (with or without try/catch in any or all the flow services), when I say ‘EXIT’ in flow 1, it has the ability to exit from that flow only. But it will continue the execution till the last step of flow 3 or till some other exception.

    I guess, there is no mechanism in webMethods to exit from all the parent flows while calling exit in sub flow.

    Regards,
    Nilesh


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 32.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed November 17, 2004 06:35 PM

    Nilesh,

    Catching the error wasn’t mentioned as a requirement in your first email–you just said you wanted to stop. :slight_smile:

    I’ve found it useful to code a java service that does nothing but throw a ServiceException, the type most often generated by IS. You can pass it whatever message you want. Instead of calling “exit from flow,” you can call your java service, passing in whatever came from getLastError. In this way, execution is stopped and the contents of the exception can by bubbled up.

    And no, I don’t know of a “JUST STOP IT ALL!” service in IS. :wink:

    Tate


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 33.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed November 17, 2004 06:37 PM

    There is a simple solution to this but not recommended, nor is it elegant.

    Create only ONE flow service. Within the flow service, you will have the typical outer sequence, set to Success, and two sub-sequences, the first set to failure, the second to DONE.

    Now, inside the inner sequence that is set to done, put in ANOTHER sequence, and make it just like the OUTER sequence you have now: set to success. Then, within this new sequence, put two new inner sequences, one set to failure and another following at the same level set to done. Should look like this:

     
    SEQUENCE - Success 
    SEQUENCE - Try (failure) 
    SEQUENCE (success) Internal seq 1 
    SEQUENCE - Try (failure 
    SEQUENCE - Catch (done) 
    SEQUENCE (success) Internal seq 2 
    SEQUENCE - Try (failure 
    SEQUENCE - Catch (done) 
    SEQUENCE - Catch (done) 
    
    

    You can place an exit anywhere you need to. In each catch block, use pub.flow:getLastError.

    It’ll work… but in my opinion, not the best approach. But it is the only way I’ve found besides using Java.

    HTH

    Ray


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 34.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed November 17, 2004 07:09 PM

    Nilesh,

    As Ray suggessted above post it will work and we have used the same logic in some critical instances and also we have built a javaservice which will catch the error from a subflow and will be retrieved from the pipeline and extract it in the main flow using getLastError.in all the subflows catch sequence we just have getLastError and Exit(Flow with signal as ON-FAILURE)

    HTH,
    RMG.


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 35.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed November 17, 2004 09:09 PM

    Hi All,

    Just wana add my 2 cents …

    In the developer, we can also use the “Event Manager” and filter the type of events (Alarm, Audit, GD, Exception, etc). We can attach to the Event Manager, a Flow Service (jave base or not) that will be fire each time the specific event take place …

    In the Pub.Event.Folder, there is a document that has all the state we need to report on (threadid, service, time, error, etc)

    Very useful :0)
    A+


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 36.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed November 17, 2004 09:48 PM

    Tate,
    You are absolutely right. My requirement is not to propagate the actual exception to the top level flow. My exact requirement is still to exit from all the parent flow and stop the execution.

    Ray,
    In your scenario, Where should I implement the logic of service 1 ?

    I guess, I should make clear that my exact requirement is to exit from the all the parent flow services when there is any error/exception in the child flow.

    If I fit your solution in my requirement , It may look like:

    SEQUENCE - Success
    –|SEQUENCE - Try (failure)
    ----|SEQUENCE (success) - Internal seq 1
    ------|SEQUENCE - Try (failure)
    --------|INVOKE FLOW SERVICE 1
    ------|SEQUENCE - Catch (done)
    ----|SEQUENCE (success) - Internal seq 2
    ------|SEQUENCE - Try (failure)
    --------|INVOKE FLOW SERVICE 2
    ------|SEQUENCE - Catch (done)
    –|SEQUENCE - Catch (done)

    But my logic is such like that I cannot make two seperate calls for service 1 & 2 from the top flow. I have to call service 1 internally from service 2.

    I have to process data from top level flow in service 2 and then pass the results to service 1 and then again the results of the service 1 , i have to process and after massaging I have to return results to the top level flow.

    Regards,
    Nilesh


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 37.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed November 17, 2004 10:36 PM

    Nilesh,

    Then I would put the SECOND inner try/catch block with in the first inner’s try block like this:

     
    
    SEQUENCE - Success     
    SEQUENCE - Try (failure)           
    
    SEQUENCE (success) Internal seq 1             
    SEQUENCE - Try (failure             
    
    SEQUENCE (success) Internal seq 2             
    SEQUENCE - Try (failure             
    SEQUENCE - Catch (done)     
    
    SEQUENCE - Catch (done)           
    
    
    SEQUENCE - Catch (done)  
    
    

    It’s a bit confusing. The nice thing about this is that in each “sub” catch block, you run pub.flow:getLastError and then you can parse through the errors to determine if it is a correctable error.

    Also, you can use a repeat function that is set to repeat on error, so if you do get an error, you can evaluate, make changes to the pipeline values and reprocess.

    HTH,

    Ray


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 38.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed November 17, 2004 11:00 PM

    Ray,

    Your second example will definitely work for me. I can achieve my requirements done, if I implement the way you said.

    Only concern is, ( I should not say concern, but i don’t have proper word for it, bear with me), your second example points toward coding the whole logic in a single flow service, doesn’t it ?

    Would you say it would be easily readable or maintainable ?
    Don’t we have any other option if we divide the logic according to the tasks it has to perform in a couple of flow services ?

    Regards,
    Nilesh


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 39.  RE: WebMethods 61 Developer New User Frustrations

    Posted Wed November 17, 2004 11:55 PM

    Nilesh,

    I can’t say that I would keep it in one or create several sub-flows.

    You stated what you wanted and I gave it to you. So, to accomplish your particular task in FLOW, I gave you the scenario above.

    There have been a couple of interjections for the use of java. You can do this easily.

    Either, take a look at the java API docs, or, conversely, if you have the EDI package installed, look for a service called invoke.

    This java service invoke I think also exists in the PSUtilities package.

    In any case, it allows you to pass in the necessary parameters to a java service and invoke the service in a java flow.

    Then, further leveraging the java API, You can perform an IDataUtil.merge. This will merge the output of the invoke service in case there is an error.

    I’m really glossing over this because I do not have the code sitting directly in front of me at the moment.

    It is not something to take lightly in any case because your architect starts small and you start building on that. It is far better to build a solid foundation than to pitch a tent and build walls around it.

    In any case, I hope you find something that will work.

    Also, you could use the broker to pub/sub to processes, evaluate the results and take action accordingly. You could easily patternize the work using broker and IS component.

    Easy to say, much harder to do.

    HTH,

    Ray


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 40.  RE: WebMethods 61 Developer New User Frustrations

    Posted Thu November 18, 2004 07:05 PM

    Hi Ray,

    Definitely I can find the solution that will work. Well I would say, I found it and it’s working fine. But it is a little bit tricky. I was looking for the better one.

    I implemented it as the following:

    Flow 1:

    MAP: …
    CONDITION turns TRUE to exit from the flow.
    Set variable status = fail
    exit from flow.


    Flow 2:

    MAP: …
    invoke FLOW 1 :
    check status …
    if fail …
    exit from flow

    flow 3

    MAP …
    invoke Flow 2
    check status …
    if fail,
    exit from flow …

    In this way, I can exit from all the parent flows while calling ‘exit from flow’ in flow 1.

    I do know adding extra branch steps, its not good at performance point of view.

    Hi All,

    I really appreciate for your time and all the help get from all you to find out the better solution.

    Regards,
    Nilesh


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 41.  RE: WebMethods 61 Developer New User Frustrations

    Posted Fri November 19, 2004 11:26 AM

    <quote>From Haithem Al-Salam:
    I think a healthy balance of OO best practices mixed in with the straight forward linear/sequential nature of flow can produce great results.</quote>

    If one could only use OO best practices I would be happy. As a Java developer I often want to apply OO practices but fail because of the way webMethods works.

    I wish I could treat packages as classes and create subclasses in order to reuse common behaviour. If a package can be used for two separate instances of an end system but one end systems require minor modification to a mapping one needs to duplicate the whole package, which creates duplicated code for all the flows that do not need to be changed. Does anyone have an webMethods best practice for this kind of situation?

    Furthermore it is not even possible to develop on two separate versions of the same package (e.g. head and a branch) because it can only exist once in an IntegrationServer.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 42.  RE: WebMethods 61 Developer New User Frustrations

    Posted Mon November 22, 2004 10:47 PM

    Hello Ulf,
    I think that is nice and I try to do this even with the linear environment.
    When I work with flow mappings, I take a distributed approach to processing. I design a root flow map that does the initial settings to a canonical form for all possible instances. Then I create implementation flow maps that will call the root maps I need in any one particular case. I end the implementation map with a common solution flow map that will give the desired result for the implementation. It is somewhat like refactoring your flows. An example:
    {{OLD}}
    flow1forCompanyA

    • seq1
    • seqA
    • seq#

    flow1forCompanyB

    • seq1
    • seqB
    • seq#

    {{NEW}}
    flow1

    • seq1

    flow2

    • seq2

    commonFlow

    • seq#

    flowCompanyA

    • flow1
    • seqA
    • commonFlow

    flowCompanyB

    • flow1
    • seqB
    • commonFlow

    I have created more flows, but I don’t have duplicate code to run around and check for typos. The root and common portions are similar as one is for preProcessing and the other is for postProcessing. The commonFlow, as I have found, can stretch across a far wider base of maps than the roots so I distinguish it. Each implementation only worries about the code that uniquely transforms some data sets. Thank is my somewhat object approach on the data side.

    One great thing is that because I standardize my inputs and outputs between each of the flow groups, They all have implicit variable mappings throughout the flow, I just plug in the need functions and set up one map step at the end that deletes lingering variables.

    I would guess a similar approach could yield effective results for flows used for other purposes. This is not a framework though, so maybe poking around other places here or advantage may yield better results.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 43.  RE: WebMethods 61 Developer New User Frustrations

    Posted Tue November 23, 2004 06:46 AM

    Quoting you Ulf:
    Furthermore it is not even possible to develop on two separate versions of the same package (e.g. head and a branch) because it can only exist once in an IntegrationServer.

    WM is quite usable with small teams and well-factored-out packages, but what you said is a drawback for large teams. However, this process might work for them:

    1. Multiple IS instances can be the answer – each developer working on his own instance.

    2. Changes automatically determined by a program that compared each instance to the SCM version.

    3. This program exports patch packages (reverse-engineering process used by ‘Packages > Publishing > Create Release’)

    4. When build needs to be created, patch packages are built and sent to a build server.

    5. A codemaster merges the changes to create the build.

    6. Build is tested.

    7. After testing the build, a similar process runs on the build server to generate packages for export to UAT and prod servers.

    This needs some reverse engineering of the current WM process, but would work as developers make changes to different services and their changes are not co-dependent.

    It all would be much easier if WM created SCM interfaces to CVS and the like, as well as tools to visually “diff” and “merge” IS services.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 44.  RE: WebMethods 61 Developer New User Frustrations

    Posted Tue November 23, 2004 06:51 AM

    Correcting the second last paragraph of my post above, it should really be:

    [this process] would work if developers make changes to different services and their changes are not co-dependent.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 45.  RE: WebMethods 61 Developer New User Frustrations

    Posted Fri June 24, 2005 09:29 AM

    Hi
    In the IS built in services whats the use of default and null values in the LABEL part of each of the built in services?
    whats does that signify?


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 46.  RE: WebMethods 61 Developer New User Frustrations

    Posted Fri June 24, 2005 10:06 AM

    $default and $null are labels that you can use when working with BRANCH.

    If you need to execute a service according to the value of a given string (str), you use BRANCH :

    BRANCH /str

    • ‘a’ -> will be executed if str = ‘a’
    • $null -> will be execute when str = nulll
    • $default -> will be executed if no labels match str

    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 47.  RE: WebMethods 61 Developer New User Frustrations

    Posted Fri July 29, 2005 03:11 PM

    Hi,

    Following the try-catch discussion: If my flow generates an exception, and moves to the catch-sequence, how can 'n get the original exception message for me to relay the message, say to TN. Because the exception message is not stored anywhere in the pipeline as far as I can see.

    Thanks

    DJ


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 48.  RE: WebMethods 61 Developer New User Frustrations

    Posted Fri July 29, 2005 03:26 PM

    Never mind. pub.flow.getLastError was the answer.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 49.  RE: WebMethods 61 Developer New User Frustrations

    Posted Tue April 29, 2008 06:39 AM

    In developer 6.5 I have written a DSP page which calls a service, I want to show the output of that service from one DSP to another DSP when I invoke the DSP.I have created one flow service and i invoked that service using the tag “%invoke%” and %endinvoke%.But i am not able to get the output.Can you tell the procedure?


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 50.  RE: WebMethods 61 Developer New User Frustrations

    Posted Tue April 29, 2008 09:53 PM

    “Agree. The concept is good. But we are also programmers,…” Hum? Are you sure?


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 51.  RE: WebMethods 61 Developer New User Frustrations

    Posted Thu August 26, 2010 10:28 AM

    how we can give runtime input through switch in branch flowstep in webMethods developer .


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods