What is the best way to define constants in SOA ?

Hi,
What is the best way to define constants in SOA/BPEL ?

I want to define at composite level. I have several BPELs in my composite. I have lot of Status and some other codes I need to check/compare/assign in assign activity and xslt transformations
Ii can use BPEL preferences , but they only applies to that particular BPEL. I want to define all my codes in one place at composite level.
Thanks
--Sreeny
Edited by: sreeny on May 29, 2012 8:59 AM

Similar Messages

  • What is the best way to define this missing variable?????

    I think I am almost there with this question, thanks for working with me on this: trying to make buttons go target cue points in video
    I get this error code:
    ReferenceError: Error #1065: Variable seek_btn is not defined.
    import fl.video.*;
    // Video component instance name
    var flvControl:FLVPlayback = display;
    var flvSource:String = "lou.flv";
    // Set video
    flvControl.source = flvSource;
    // Add seek functionality to the button
    function seekHandler(event:MouseEvent):void
       flvControl.seekToNavCuePoint("lou1")
    seek_btn.addEventListener(MouseEvent.CLICK, seekHandler);
    seek_btn1.cuePointName = new String();
    seek_btn1.cuePointName = "lou1";
    seek_btn1.addEventListener(MouseEvent.CLICK, onButtonPress);
    seek_btn2.cuePointName = new String();
    seek_btn2.cuePointName = "lou2";
    seek_btn2.addEventListener(MouseEvent.CLICK, onButtonPress);
    // onButtonPress function
    function onButtonPress(evt:MouseEvent):void {
         flvControl.seekToNavCuePoint(evt.target.cuePointName);

    Definitely.... you are trying to assign a listener to something that does not exist
    seek_btn.addEventListener(MouseEvent.CLICK, seekHandler);
    If you do not have a seek_btn, the best way to define the missing variable is to create the seek_btn object.  If you don't plan to, then rather than define it, get rid of any code that uses it.

  • What's the best way to define some values based on the URL?

    Let's say for example I want all my URLs for servlets to take the form:
    http://mysite.com/module/action?arguments
    What's the most scalable way to handle mapping the values in place of "module" and "action"? For example, I might have a "forum" module and have an action to "deleteThread", called like so:
    http://mysite.com/forum/deleteThread?id=321
    I know I can just parse it myself, but is there a better way to handle this via some settings in web.xml or similar? All my requests go through a Front Controller which needs to know which module and action have been requested so that it can run the appropriate action controller.
    Cheers,
    Chris

    At the risk of repeat-posting, I'll clarify. Say I create a file named routing.xml which defines some routes like this:
    <routing-config>
      <route>
        <name>Standard rule</name>
        <description>
          This route maps the first two parts in the path with the module and action
        </description>
        <url-pattern>/:module/:action.do</url-pattern>
      </route>
      <route>
        <name>Default Index</name>
        <description>
          Allows the module to be specified without the action for "Index" actions.
        </description>
        <url-pattern>/:module.do</url-pattern>
        <request-parameters>
          <parameter key="action" value="Index" />
        </request-parameters>
      </route>
      <route>
        <name>Homepage</name>
        <description>
          Loads the Home page
        </description>
        <url-pattern>/</url-pattern>
        <request-parameters>
          <parameter key="module" value="Home" />
          <parameter key="action" value="Index" />
        </request-parameters>
      </route>
    </routing-config>The bits like ":module" which be represented by the actual name of the module in the URL. Does anyone know if something like this already exists? :)
    I wrote this exact same thing in PHP5 just a few weeks ago but I really don't have the motivation to write it all over again in Java :P On a side-note, things like this usually come with helpers for turning unclean URIs into clean URIs.

  • What is the BEST WAY to define a circle in PDF?

    Hi All
    I have been making circles in PDF in two ways and they both seem a little "hinky". One is using 4 bezier curves to approximate the circle which works pretty well and the other for smaller circles has been to use a thick line with a round end cap and make it one unit long and filled with white. There has to be an easier and better way. Any direction would be appreciated especially a small ASCII file example of the "correct" circle drawing technique.
    Thanks
    Ray

    Hi
    Thank you for responding. I'm using that technique now which works well but
    I was hoping there was some magic formula or operator I had missed. Thanks
    again. I'll keep using the bezier technique.
    Ray

  • What is the best way to organize a tree-like structure of constants?

    Hello everone!
    Need help with organizing my constants structrure.
    I have several tables, and each of them need a list of column names to define the fields returned after query, and also a corresponding list of hashmap keys because that columnnames are ugly. Hashmap is where I store the result of searching through the table. This question is not about JDBC because I search through tables via COM interface, no JDBC ResultSets and other stuff here.
    Finally, for each table I have two constant lists and I have a list of tables. What is the best way to store this?
    My first idea was to create a enum and store column data in it as String array attributes: String[] columnNames; etc.
    But in this case I cannot use each column and key separately.
    Another option is to create two separate enums for each table: columnNames enum and keys enum. That doesn't look great also.
    The third option is to create inner class for each table and store two enums in each of that classes.
    Also I can store all data in hashmaps, Strings etc.
    (1) Finally, from your experience, what is the best way to organize all that stuff?
    (2) I have heard that smart Java programmer should avoid using the enums by any means. Do you agree?
    (3) Generally what will you prefer when creating a constant which has two values: two final Integers or enum?
    Edited by: Dmitry_MSK on Jul 8, 2010 5:22 AM

    I'm not sure why you don't just invent a generic data structure (e.g., table name, list of column names and aliases of column names) such as:
    class QueryMetaData {
      private final String tableName;
      private final String[] columnNames;
      private final String[] columnAliases;
    }Read into the above structure from a properties file, database table, etc. You can store meta-data itself in places other than enum constants, particularly if would like to change the meta-data without requiring a new build of your application.
    That having been said, WRT to your specific questions:
    (1) Finally, from your experience, what is the best way to organize all that stuff?See above
    (2) I have heard that smart Java programmer should avoid using the enums by any means. Do you agree?Enums are better than simple constants using int or String or something similar. If there are known, discrete values unlikely to change frequently, I see no issues with an enum. They improve the readability of code, and there are enough syntactic sugar features in the language (switch statements come to mind) to make them appealing.
    (3) Generally what will you prefer when creating a constant which has two values: two final Integers or enum?
    See above. Enums were introduced (in large part) to do away with storing constants as integers.
    - Saish

  • What is the best way to pass a constant to a cin expecting a pointer to a value?

    I have a cin which has a leg that is expecting a pointer to a value. On the diagram, what is the best way to connect a constant widget to this leg of the cin? Connecting it directly crashes labview as it treats the constant as a pointer to memory.
    Thanks

    I am not sure that I understand your issue. CIN variables can be Input-Output or Output only. Either way, they are being passed in as a pointer to a value. You can see this very easily by placing down a CIN and wiring a constant integer to it. Next, right-click on the CIN and create the C file. You will see that the parameter list has an int* in it.
    If you are still having problems, do you have to create a CIN or can you create a DLL instead? The DLL will give you a few more ways to pass the data than a CIN does with no real performance decrease.
    Also, have you read the "Using External Code in LabVIEW" manual? This hsould answer some questions as well.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • What is the best way to use a SSD for Photoshop/photo editing?

    Computer hardware newbie here: I do a significant amount of photo editing work and for a very long time I've experienced Photoshop, Bridge and Photomatix crashing constantly (usually due to insufficient RAM) or just generally taking forever (Bridge took forever to load the thumbnail/preview extractions in a folder full of images, Photoshop took forever to save images and Photomatix took ages to load/merge a set of bracketed photos).  Here are the typical error messages I'd get: http://pastebin.com/J9byczse
    As a professional photographer, constantly running into that sort of thing is quite aggravating, so to hopefully avoid ever having to deal with that again I invested in a new custom built computer.  It's Windows 7 Professional 64 bit with 32GB of RAM and a 240GB SSD; I'm using the 240GB SSD as my boot drive/OS, all of my programs are installed there, and the page file.  My photos and data are stored on several HDDs.  I have yet to install any of my photo editing software (Photoshop CS6 Extended, Lightroom, Photomatix etc) to the new computer yet since I'd like some advice first.
    My basic question is this: what is the best way to take advantage of the SSD (and the computer in general) when it comes to my photo editing software?
    Specifically...
    1. If I have a folder of photos I'm working on, should I move it to the SSD and then work on them from there in order to take advantage of the speed of the SSD?  Would this make any difference in terms of speed if the photos are located on the SSD vs. an internal/external HDD?
    2. Most of what I've read online seems to recommend two separate SSDs, one for installing/booting the apps and one for cache/scratch.  Does it matter if I use my 240GB SSD for both?
    3. This is a fairly new computer and the SSD is already almost half full (102GB used, 120GB free) *WITHOUT* any of my photo editing software installed yet.  I'm concerned about how fast that remaining 120 GB may fill up.  As it fills up will I lose the speed advantage of the SSD vs. a regular HDD?
    4. Sort of similar to #3, but should I bother moving any of my other non-photo editing programs/caches off of the SSD to a HDD and would there be any major difference in the speed/lifespan of the SSD if I did so?  It's mostly Firefox and Chrome and their caches that I'm concerned may be a problem if they remain on the SSD.
    Thanks for any help!

    If you have an SSD you can run the cache and programs on the same drive.  However, many recommend a scratch disk size of 100-200 gigs so that will not work here unless you opt for a larger SSD.  Otherwise an internal spinner is recommended that does not contain the program files, or idealy any other files that may want to get acessed at same time (only one read/write head per drive).
    With 32 gig of RAM you may not need the constant use of the scratch drive unless working on large images with lots of layers.  So see no advantage to moving folder to SSD for temp work environment.
    From what I read the new crop of SSD do not have the wear problems of the older versions.

  • What is the best way to organize queue in R/3?

    Hi,
    I'm in a middle of a project, where I should implement queue in order to sync data between 2 systems - r/3 and legasy one. I have few user exits (or bussiness events), which could be rised concurently in time, and I need only 1 instance of the sync module to run at a time. Well, I know the technique to prevent a program from running in multiple processes, and I have an idea how to organize a queue (my idea is to use transparent table to track actions which should be sync-ed), but there allways are some 'bottlenecks' that should be considered in such an implementation.
    That's why it might be of great help if someone could share his/her knowledge on this topic or point me to the right paper/docu, if available.
    I just don't want to reinvent the wheel, if possible
    Many thanks in advance.
    Regards,
    Ivaylo Mutafchiev
    SAP BC Consultant - ABAP developer
    Varna Bussiness Services Ltd.

    I'm not sure why you don't just invent a generic data structure (e.g., table name, list of column names and aliases of column names) such as:
    class QueryMetaData {
      private final String tableName;
      private final String[] columnNames;
      private final String[] columnAliases;
    }Read into the above structure from a properties file, database table, etc. You can store meta-data itself in places other than enum constants, particularly if would like to change the meta-data without requiring a new build of your application.
    That having been said, WRT to your specific questions:
    (1) Finally, from your experience, what is the best way to organize all that stuff?See above
    (2) I have heard that smart Java programmer should avoid using the enums by any means. Do you agree?Enums are better than simple constants using int or String or something similar. If there are known, discrete values unlikely to change frequently, I see no issues with an enum. They improve the readability of code, and there are enough syntactic sugar features in the language (switch statements come to mind) to make them appealing.
    (3) Generally what will you prefer when creating a constant which has two values: two final Integers or enum?
    See above. Enums were introduced (in large part) to do away with storing constants as integers.
    - Saish

  • (New to C# here) What is the best way to return false in a function if it cannot be executed successfully?

    In Javascript or PHP you can have a function that could return, for example, a string in case of success and false in case of failure.
    I've noticed (in the few days I've been learning C#) that you need to define a type of value that the function will return, so you need to return that type of value but in case of failure you can't return false.
    What is the best way to achieve this behavior and is there an example I can see?
    Thank you in advance,
    Juan

    Juan, be aware that returning null won't work with value types, such as an int, which can't be null. You'd have to use a nullable value type. A nullable int would be declared with a "?", such as:
    int? someOtherFunction(int param)
    if(something goes great)
    return param * 42;
    return null;
    And you have to use it like this:
    int? result = someOtherFunction(666);
    if (result != null) // you can also use result.HasValue
    // it worked, do something with the result
    // if you're doing math with the result, no problem
    int x = result * 2;
    // but if you're assigning it to another an int, you need to use this syntax
    int y = result.Value;
    Before nullable value types came along, for a method that returned an int, I'd use a value of something that wouldn't normally be returned by that method to indicate failure, such as a -1.
    ~~Bonnie DeWitt [C# MVP]
    That's something very very important to keep in mind. Can save you from a lot of headaches!
    So if you have an int function and it might return NULL, if you are doing Math with the return value you can use it directly, but if you're assigning it to another variable you have to use .Value?
    Thanks

  • What Is The Best Way To Connect Ipod To Stereo Reciever With High Quality?

    I recently purchased an 80 gig and am a newbie. I ripped all my music at around 280kbps to retain good audio quality when playing in my car and home theatre system. There are tons of accesories out there (docks, jacks, etc) which is the highest quality to connect my Yamaha receiver. I would think a connection to the bottom of my ipod would be of a higher quality rather than using the headphone jack. Any suggestions would be great. I was thinking about using the monster itv link but mostly for audio. thanks

    OK - So now that you have all completely ignored the original question - in hopes of proving your manly-hood....
    Does anyone have an answer to the original question....
    "What is the best way to connect to a high end home stereo to retain the best sound?"
    For sure any connection going through the headphone jack will be a big step back - enough so that you would easily hear a sound quality loss in doing so.
    For the few of you who would like to argue/bicker/rant on the nominal sound quality loss....keep on doing so, but for those who actually have some respectable advice we would love to hear it.
    For the record, I tend to hear just outside the normal human auditory range...
    To help myself put it to rest already... a few years back I decided to conduct my own little listening test.
    I took 6 different common ripping modalities (from lossless - to - 128kbps in both MP3 & AAC.... then transfered all of them in order to a blank. Used the same song for each - the song chosen opened with a few clean crisp bars of high freq. music, followed by an instant explosion/drop into a tight & low bassline.
    The final cutoff that was achieved before I was unable to detect an audible difference was 198 VBR AAC. Having convinced myself that there was the ever sooooooo slight difference b/t 198 & 256, I went with my current ripping status of 256.... Just incase my audible range should become finally honed with age (yeah, like that is really going to happen) !
    This test was run over a Yamaha DSP receiver, running at a constant 110w per channel (w/a max of 220w). The speaker setup was a full surround set of Klipsch Reference Series..... each speaker housing 2 x 6.5 woofer (each housing 2 x 1" Titanium tweeters) And sitting along side the 5 surrounds was/is a 150w continuous 12in. Subwoofer.
    Now I am hardly stating that I have hearing as good as some of you extremely technically profound music enthusiasts out there, but for the majority of people making comments about sound quality, and lack there of - when played over a $120/40w Audiovox radio.... I'm sorry, but I would have to side on that of......"Hogwash, that you can hear a difference!"
    So.... if possible would someone please offer some advice on a dock or cable connection that will allow us to enjoy the music we ripped at whatever
    so-called range we did!
    For those interested in seeing who could hit the further bullseye with their eyes closed, You win!!! Now can you help us?
    MBP   Mac OS X (10.4.9)  

  • What is the best way to add a guest networ?

    What is the best way to configure a guest network? The guest network would have access to the Internet only. The guest network will would not have access to servers. We have a an ASA firewall, Cisco router and L3 switch.
    Thanks.

    You have two options, either use ZBF on the router or use the ASA to firewall the guest network.
    In either case the guest network will be a dmz/zone itself. You will use ACLs to define where hosts can go and cannot go. And you will also set up their translations for when they want to browse the internet.
    For an IOS set up you would have zone guest and zone outside for example and you would define the policies for the zone pair guest-to-out. Also you would define translations for the guest network when it traverses and goes to the outside.
    For an ASA scenario you will have a interface or subinterface guest lets say, and the outside interface. Again you would define policies for traffic traversing these two interfaces and the corresponding translations.
    PK

  • What is the best way to declare field length 500 in internal table?

    Hi all,
    what is the best way to declare field length 500(constant value allways) in internal table?
    I am trying to send data from internal table to file format, and I have a field in internal table with 500 length (constant value always). So how do I can declare and append this field value to table?
    Thanks
    Murali

    Hi.  Please see the following example program, notice how I am filling the field with the constant value.
    report zrich_0001.
    *       CLASS lcl_main DEFINITION
    class lcl_main definition.
      public section.
        types: begin of ttab,
                fld1(500) type c,
               end of ttab.
        data: itab type table of ttab.
        data: xtab type ttab.
        methods: constructor,
                 write_itab.
    endclass.
    *       CLASS lcl_main IMPLEMENTATION
    class lcl_main implementation.
      method constructor.
    <b>
        xtab-fld1 =
          'This is one part of the total string which needs to be really' &
          ' long and this is a constant and we need to move it to a work' &
             ' area and then append it to the internal table which has a' &
              ' field with a length of five hundred characters'.
        append xtab to itab.</b>
      endmethod.
      method write_itab.
        loop at itab into xtab.
          write:/ xtab-fld1.
        endloop.
      endmethod.
    endclass.
    data: o_main type ref to lcl_main.
    start-of-selection.
      create object o_main.
      call method o_main->write_itab.
    Regards,
    Rich Heilman

  • [Flex 4.5.1] What is the best way of adopting a flex built website for mobile "as is"?

    What is the best way of adopting a flex 4.5.1 built website for mobile "as is"?
    I have a website built with flex 4.5.1 which I want to be working on mobile as it should - meaning that touch style of interactions should be working not mouse.
    The question is: Do I HAVE TO recode all of my website from Application into Mobile Application in order to be a more lightweight version of the original one, which includes: remove some functionality, pages, animation, build a separate backend and cms to control it etc.?
    OR
    Can I just define mobile skins, for my existing components to use when in mobile mode, in which I could have done some tweaking by removing some unnecessary parts and changing component interactionMode to Touch ?
    Are both options which I see possible and if yes - which one would you recommend?
    Thanks in advance!

    Thanks for the answer. Yeah I bet you figured out what I want the answer to be, but is it ? That's why I am asking here. I can see my website on my HTC Desire HD and it's working pretty well. If I reskin the parts that need a bigger hit area or the scrollers to work with touch so I don't have to scroll the actual scrollbars with my finger, remove some complex animations - everything will work just fine... The problem is that I am not sure if that is the right way to do it or if it is possible at all.
    I do get your point about not designed for mobile stuff, but while with html 5 you get the job done for web and mobile with little differences at the same time, in flash you need double time cause you'll have to build 2 projects. And since the framework is one for both web and mobile.. why not...
    I want to see the pros and cons of the both approaches I suggested. In a complex modular architecture I could easily swap one web module with a mobile module for example or change skins or components if I need more lightweight ones, but do I have to copy all that logic in to a MobileApplication, can't I do it with Application and use the MobileComponents (which are simplier and less functional) if the project actually needs them...
    I do hope you get why I am asking these questions, and I can't believe I haven't found a guide or something like that "why this and not that" when it comes to mixing web with mobile development and flex... If you have, please share the link, I would be happy to read. Or someone with the experience in what I am talking about shares some knowledge, that would be great!
    Thanks.

  • What is the best way to keep high res when saving "for web"

    the files i'm saving for web so i can get them in jpg (or gif) format are coming out very pixelated.  this is when i print the image. 
    what is the best way to save for web an image and keep the resolution good. 
    using for a business card template.  avery template will let me attach images i want to the project.  to do this..  i "get file from computer" and it drops the image in but real small... then you are supposed to enlarge it onto your work however you want.  well when i enlarge this image file, it gets pixelated badly.  i'm thinking it's the way i'm saving it.  i do not adjust anything when i save.  maybe i should.  this is where i need guidance. 
    this is what avery template notes about the images i am allowed to use - When uploading the image, the maximum size allowed is 4 MB.  You can only upload JPG and PNG images either as RGB or CMYK.  so when you recommend things, can you please keep this in mind
    thank you for oyur time.

    Aida,
    When you save with the default template using save for web it is generally a very low settings.
    While in the save window you can define the pixel size of the image you want with quality as well as resolution too.
    Refer to tv.adobe.com video save for web or Adobe help file for detailed instructions.
    Mandhir

  • What is the best way to Optimize a SQL query : call a function or do a join?

    Hi, I want to know what is the best way to optimize a SQL query, call a function inside the SELECT statement or do a simple join?

    Hi,
    If you're even considering a join, then it will probably be faster.  As Justin said, it depends on lots of factors.
    A user-defined function is only necessary when you can't figure out how to do something in pure SQL, using joins and built-in functions.
    You might choose to have a user-defined function even though you could get the same result with a join.  That is, you realize that the function is slow, but you believe that the convenience of using a function is more important than better performance in that particular case.

Maybe you are looking for