Help with workflows and custom objects

Hi!
I want to create a script or workflow that will inventory computers C: and D: drives. I would like to use a workflow so i can query many computers simultaneously.
Unfortunately I does not get the right output. I get PSComputerName and PSSourceJobInstanceID instead of my variables.
PS C:\Windows\system32> Get-HDDInfo -ComputerName Comp1, Comp2
PSComputerName PSSourceJobInstanceId
localhost d7c95049-27c5-46e2-970f-7b940a656aa3
localhost d7c95049-27c5-46e2-970f-7b940a656aa3
localhost d7c95049-27c5-46e2-970f-7b940a656aa3
localhost d7c95049-27c5-46e2-970f-7b940a656aa3
The Workfow!
Workflow Get-HDDInfo ([string[]]$ComputerName) {
$Result = @()
ForEach -Parallel ($Computer in $ComputerName) {
$WMIComSys = Get-WmiObject -Class win32_computerSystem -Property Name -PSComputerName $Computer
$WMIDiskDrives = Get-WmiObject -Class Win32_LogicalDisk -Filter "DeviceID = 'C:' or DeviceID = 'D:'" -PSComputerName $Computer
$tmpOBJ = New-Object psobject
$tmpOBJ | Add-Member -MemberType NoteProperty -Name "ComputerName" -Value $WMIComSys.Name
foreach ($DiskDrive in $WMIDiskDrives) {
$VolumeLetter = ($DiskDrive.deviceID).substring(0,1)
$VolumeTotalSize = "{0:N2}" -f $(($DiskDrive.Size) / 1GB)
$VolumeFreeSize = "{0:N2}" -f $(($DiskDrive.FreeSpace) / 1GB)
$VolumeName = $DiskDrive.VolumeName
# Variables outputs the correct values to C:\_tmp\test.txt
"$VolumeLetter $VolumeTotalSize $VolumeFreeSize $VolumeName" | out-file C:\_tmp\test.txt -Append
$tmpOBJ | Add-Member -MemberType NoteProperty -Name "$($VolumeLetter)_VolumeName" -Value $VolumeName
$tmpOBJ | Add-Member -MemberType NoteProperty -Name "$($VolumeLetter)_TotalSize" -Value $VolumeTotalSize
$tmpOBJ | Add-Member -MemberType NoteProperty -Name "$($VolumeLetter)_FreeSize" -Value $VolumeFreeSize
} $workflow:Result += $tmpOBJ
return $Result
Can anyone point me in the right direction?
Thanks!

I created a none-workflow version of the script:
Function Get-TestHDDInfo ([string[]]$ComputerName) {
$Result = @()
ForEach ($Computer in $ComputerName) {
$WMIComSys = Get-WmiObject -Class win32_computerSystem -Property Name -ComputerName $Computer
$WMIDiskDrives = Get-WmiObject -Class Win32_LogicalDisk -Filter "DeviceID = 'C:' or DeviceID = 'D:'" -ComputerName $Computer
$tmpOBJ = New-Object psobject
$tmpOBJ | Add-Member -MemberType NoteProperty -Name "ComputerName" -Value $WMIComSys.Name
foreach ($DiskDrive in $WMIDiskDrives) {
$VolumeLetter = ($DiskDrive.deviceID).substring(0,1)
$VolumeTotalSize = "{0:N2}" -f $(($DiskDrive.Size) / 1GB)
$VolumeFreeSize = "{0:N2}" -f $(($DiskDrive.FreeSpace) / 1GB)
$VolumeName = $DiskDrive.VolumeName
# Variables outputs the correct values to C:\_tmp\test.txt
"$VolumeLetter $VolumeTotalSize $VolumeFreeSize $VolumeName" | out-file C:\_tmp\test.txt -Append
$tmpOBJ | Add-Member -MemberType NoteProperty -Name "$($VolumeLetter)_VolumeName" -Value $VolumeName
$tmpOBJ | Add-Member -MemberType NoteProperty -Name "$($VolumeLetter)_TotalSize" -Value $VolumeTotalSize
$tmpOBJ | Add-Member -MemberType NoteProperty -Name "$($VolumeLetter)_FreeSize" -Value $VolumeFreeSize
$tmpOBJ | out-file C:\_tmp\test.txt -Append
$Result += $tmpOBJ
return $Result
This is the output:
PS C:\Windows\system32> Get-TestHDDInfo -ComputerName Comp1, Comp2
ComputerName : Comp1
C_VolumeName : OSDisk
C_TotalSize : 109,79
C_FreeSize : 21,59
D_VolumeName : VMs
D_TotalSize : 223,57
D_FreeSize : 55,76
ComputerName : Comp2
C_VolumeName : OSDisk
C_TotalSize : 59,91
C_FreeSize : 2,26
D_VolumeName : Data
D_TotalSize : 51,87
D_FreeSize : 10,14
This is how i want it to look.

Similar Messages

  • Please Help with Viewstack and custom component

    I'm having trouble trying to embed a component within a
    viewstack. I have my main applicaiton main.mxml application and the
    calander control from quietly scheming (app.mxml) is the component.
    The issue I'm having is how to have the calendar show within my
    viewstack canvas. The app.mxml file namespaces below:
    <?xml version="1.0" encoding="utf-8"?>
    <local:app_code xmlns:local="*" xmlns="
    http://www.adobe.com/2006/mxml"
    xmlns:qs="qs.controls.*" xmlns:g="qs.graphics.*"
    xmlns:qc="qs.containers.*"
    creationComplete="load();" xmlns:ns1="qs.containers.*"
    xmlns:effects="qs.effects.*" width="100%" height="100%"
    layout="absolute">
    <Style source="calendar.css" />
    <Style source="styles.css" />
    <Script source="app_imports.as" />
    </local>
    My application main.mxml has different namespaces:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    initialize="showLogin();"
    layout="absolute"
    horizontalGap="0"
    horizontalAlign="center"
    cornerRadius="20"
    xmlns:controls="com.adobe.ac.controls.*"
    >
    </application>
    If I take the code out of app.mxml and plae it on my
    viewstack canvas, I get all types of errors referencing functions
    or components in the other namespaces.
    Does this make any sense ? I just want to view the calendar
    in the viewstack.
    Please help

    I guess I'm just not understanding the difference betweeen
    the <local:app_code> in the app.mxml file and the
    <mx:Application> in my main application.
    If I run the app.mxml by itself, everything is fine. if I try
    to take the code out and past it within the viewstack canvas I get
    reference errors. It can't find the objects/functions from the
    <local:app_code> namespace.
    I guess I'm just confused on how to structure the entire
    application.
    Thanks all for your responses.

  • How to find all those list of SAP standard and custom objects that are changed from a specific point of time

    Hi all,
    Please let me know the process to track or find all the SAP Standard and custom objects. that got changed from a specific point of time.
    Is there any function module or any table where this change log is maintained.?
    I just only need the details ,wheather that SAP standard or Custom object has got changed or not.
    Thanks in advance

    Hi RK v ,
    I really don't know what your actual requirement is , but if you want to know the objects as per the modification , then transport request will be much help to you .
    Have a look into table E070 and E071 .
    Regards ,
    Yogendra Bhaskar

  • Create a dummy workbench and customizing object as critical object

    Hi!
    I am testing now the transport settings for critical objects.
    what is the easiest way to create a dummy workbench and customizing object, assign them to transport request and try to transport?
    (e.g. Work Bench object: LIMU, DOCU, "Documentation")
    Thank you very much!
    regards
    Thom

    I think i misinterpret my requirement.
    I have various other applications looking into my metadirectory. There is integration between OIM and Metadirectory and we have to update the various priviledges (multi value data) in Meta Resource form for this so that from MetaDirectory they can flow to other systems. For that i was thinking of using dummy resource object for each resource (attached to Meta). To update the various priviledges (group names and other entitlements) in meta collectively , i think we attached the dummy resource to access policies and once the values will update in dummy resource process form we can update the Meta Process Form accordingly (though i am not sure with this part that how can i achieve this). Also can we define the multi value data field in process form. By default child table having lookup is multivalue field (may be its only my conception) can we add it in core process form?
    Pardon me for confusion but i am really patch up between business and technical people requirement :(...
    just a follow up i need a pre-populate kind of functionality managing by access policy but after the value pre-populate in dummy resource object process form how to update the value in other process form and update the target resource.
    Edited by: user10781632 on Jun 19, 2009 7:05 AM

  • Help with writing and retrieving data from a table field with type "LCHR"

    Hi Experts,
    I need help with writing and reading data from a database table field which has a type of "LCHR". I have given an example of the original code but don't know what to change it to in order to fix it and still read in the original data that's stored in the LCHR field.
    Basically we have two Function modules, one that saves list data to a database table and one that reads in this data. Both Function modules have an identicle table which has an array of fields from type INT4, CHAR, and type P. The INT4 field is the first one.
    Incidentally this worked in the 4.7 non-unicode system but is now dumping in the new ECC6 Unicode system.
    Thanks in advance,
    C
    SAVING THE LIST DATA TO DB
    DATA: L_WA(800).
    LOOP AT T_TAB into L_WA.
    ZDBTAB-DATALEN = STRLEN( L_WA ).
    MOVE: L_WA to ZDBTAB-RAWDATA.
    ZDBTAB-LINENUM = SY-TABIX.
    INSERT ZDBTAB.
    READING THE DATA FROM DB
    DATA: BEGIN OF T_DATA,
                 SEQNR type ZDBTAB-LINENUM,
                 DATA type ZDBTAB-RAWDATA,
               END OF T_TAB.
    Select the data.
    SELECT linenum rawdata from ZDBTAB into table T_DATA
         WHERE repid = w_repname
         AND rundate = w_rundate
         ORDER BY linenum.
    Populate calling Internal Table.
    LOOP AT T-DATA.
    APPEND T_DATA to T_TAB.
    ENDLOOP.

    Hi Anuj,
    The unicode flag is active.
    When I run our report and then to try and save the list data a dump is happening at the following point
    LOOP AT T_TAB into L_WA.
    As I say, T_TAB consists of different fields and field types whereas L_WA is CHAR 800. The dump mentions UC_OBJECTS_NOT_CONVERTIBLE
    When I try to load a saved list the dump is happening at the following point
    APPEND T_DATA-RAWDATA to T_TAB.
    T_DATA-RAWDATA is type LCHR and T_TAB consists of different fields and field types.
    In both examples the dumps mention UC_OBJECTS_NOT_CONVERTIBLE
    Regards
    C

  • Help with count and sum query

    Hi I am using oracle 10g. Trying to aggregate duplicate count records. I have so far:
    SELECT 'ST' LEDGER,
    CASE
    WHEN c.Category = 'E' THEN 'Headcount Exempt'
    ELSE 'Headcount Non-Exempt'
    END
    ACCOUNTS,
    CASE WHEN a.COMPANY = 'ZEE' THEN 'OH' ELSE 'NA' END MARKET,
    'MARCH_12' AS PERIOD,
    COUNT (a.empl_id) head_count
    FROM essbase.employee_pubinfo a
    LEFT OUTER JOIN MMS_DIST_COPY b
    ON a.cost_ctr = TRIM (b.bu)
    INNER JOIN MMS_GL_PAY_GROUPS c
    ON a.pay_group = c.group_code
    WHERE a.employee_status IN ('A', 'L', 'P', 'S')
    AND FISCAL_YEAR = '2012'
    AND FISCAL_MONTH = 'MARCH'
    GROUP BY a.company,
    b.district,
    a.cost_ctr,
    c.category,
    a.fiscal_month,
    a.fiscal_year;
    which gives me same rows with different head_counts. I am trying to combine the same rows as a total (one record). Do I use a subquery?

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    user610131 wrote:
    ... which gives me same rows with different head_counts.If they have different head_counts, then the rows are not the same.
    I am trying to combine the same rows as a total (one record). Do I use a subquery?Maybe. It's more likely that you need a different GROUP BY clause, since the GROUP BY clause determines how many rows of output there will be. I'll be able to say more after you post the sample data, results, and explanation.
    You may want both a sub-query and a different GROUP BY clause. For example:
    WITH    got_group_by_columns     AS
         SELECT  a.empl_id
         ,     CASE
                        WHEN  c.category = 'E'
                  THEN  'Headcount Exempt'
                        ELSE  'Headcount Non-Exempt'
                END          AS accounts
         ,       CASE
                        WHEN a.company = 'ZEE'
                        THEN 'OH'
                        ELSE 'NA'
                END          AS market
         FROM              essbase.employee_pubinfo a
         LEFT OUTER JOIN  mms_dist_copy             b  ON   a.cost_ctr     = TRIM (b.bu)
         INNER JOIN       mms_gl_pay_groups        c  ON   a.pay_group      = c.group_code
         WHERE     a.employee_status     IN ('A', 'L', 'P', 'S')
         AND        fiscal_year           = '2012'
         AND        fiscal_month          = 'MARCH'
    SELECT    'ST'               AS ledger
    ,       accounts
    ,       market
    ,       'MARCH_12'          AS period
    ,       COUNT (empl_id)       AS head_count
    FROM       got_group_by_columns
    GROUP BY  accounts
    ,            market
    ;But that's just a wild guess.
    You said you wanted "Help with count and sum". I see the COUNT, but what do you want with SUM? No doubt this will be clearer after you post the sample data and results.
    Edited by: Frank Kulash on Apr 4, 2012 5:31 PM

  • MOVED: [Athlon64] Need Help with X64 and Promise 20378

    This topic has been moved to Operating Systems.
    [Athlon64] Need Help with X64 and Promise 20378

    I'm moving this the the Administration Forum.  It seems more apporpiate there.

  • Newbie - help needed with array and dictionary objects

    Hi all
    Please see the code below. I've posted this code in another thread however the original issue was resolved and this is now a new issue I'm having although centered around the same code.
    The issue is that I'm populating an array with dictionary objects. each dictionary object has a key and it's value is another array of custom objects.
    I've found that the code runs without error and I end up with my array as I'm expecting however all of the dictionary objects are the same.
    I assume it's something to do with pointers and/or re-using the same objects but i'm new to obj-c and pointers so i am a bit lost.
    Any help again is very much appreciated.
    // Open the database connection and retrieve minimal information for all objects.
    - (void)initializeDatabase {
    NSMutableArray *authorArray = [[NSMutableArray alloc] init];
    self.authors = authorArray;
    [authorArray release];
    // The database is stored in the application bundle.
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *path = [documentsDirectory stringByAppendingPathComponent:@"books.sql"];
    // Open the database. The database was prepared outside the application.
    if (sqlite3_open([path UTF8String], &database) == SQLITE_OK) {
    // Get the primary key for all books.
    const char *sql = "SELECT id, author FROM author";
    sqlite3_stmt *statement;
    // Preparing a statement compiles the SQL query into a byte-code program in the SQLite library.
    // The third parameter is either the length of the SQL string or -1 to read up to the first null terminator.
    if (sqlite3preparev2(database, sql, -1, &statement, NULL) == SQLITE_OK) {
    // We "step" through the results - once for each row.
    // We start with Letter A...we're building an A - Z grouping
    NSString *letter = @"A";
    NSMutableArray *tempauthors = [[NSMutableArray alloc] init];
    while (sqlite3_step(statement) == SQLITE_ROW) {
    author *author = [[author alloc] init];
    author.primaryKey = sqlite3columnint(statement, 0);
    author.title = [NSString stringWithUTF8String:(char *)sqlite3columntext(statement, 0)];
    // FOLLOWING WAS LEFT OVER FROM ORIGINAL COMMENTS IN SQLBooks example....
    // We avoid the alloc-init-autorelease pattern here because we are in a tight loop and
    // autorelease is slightly more expensive than release. This design choice has nothing to do with
    // actual memory management - at the end of this block of code, all the book objects allocated
    // here will be in memory regardless of whether we use autorelease or release, because they are
    // retained by the books array.
    // if the author starts with the Letter we currently have, add it to the temp array
    if ([[author.title substringToIndex:1] compare:letter] == NSOrderedSame){
    [tempauthors addObject:author];
    } // if this is different letter, then we need to deal with that too...
    else {
    // create a dictionary to store the current tempauthors array in...
    NSDictionary *tempDictionary = [NSDictionary dictionaryWithObject:tempauthors forKey:@"authors"];
    // add the dictionary to our appDelegate-level array
    [authors addObject:tempDictionary];
    // now prepare for the next loop...
    // set the new letter...
    letter = [author.title substringToIndex:1];
    // remove all of the previous authors so we don't duplicate...
    [tempauthors removeAllObjects];
    // add the current author as this was the one that didn't match the Letter and so
    // never went into the previous array...
    [tempauthors addObject:author];
    // release ready for the next loop...
    [author release];
    // clear up the remaining authors that weren't picked up and saved in the "else" statement above...
    if (tempauthors.count > 0){
    NSDictionary *tempDictionary = [NSDictionary dictionaryWithObject:tempauthors forKey:@"authors"];
    [authors addObject:tempDictionary];
    else {
    printf("Failed preparing statement %s
    ", sqlite3_errmsg(database));
    // "Finalize" the statement - releases the resources associated with the statement.
    sqlite3_finalize(statement);
    } else {
    // Even though the open failed, call close to properly clean up resources.
    sqlite3_close(database);
    NSAssert1(0, @"Failed to open database with message '%s'.", sqlite3_errmsg(database));
    // Additional error handling, as appropriate...
    Message was edited by: dotnetter

    Ok, so I know what the issue is now...I just don't know enough to be able to resolve it!
    it's the tempAuthors objects.
    It's an NSMutableArray which is create on the line before the start of the WHILE loop.
    Having looked through the debugger, I can see that each dictionary object is created (with different codes which I assume are memory addresses) so all is well there. However, on each iteration of the loop in the middle there is an IF...ELSE... statement which in the ELSE section is clearing all objects from the tempAuthors array and beginning to repopulate it again.
    Looking at the containing dictionary objects in the debugger I can see that the tempAuthors object that each contains has the same code (again, I'm assuming this is a memory address) - so if I understand correctly, it's the same object...I assumed that when I created the dictionary using the dictionWithObject call that I would be passing in a copy of the object, but it's referencing back to the object which I then go on to change.
    Assuming the above is correct, I've tried several "stabs in the dark" at fixing it.
    I've tried relasing the tempAuthors object within the ELSE and initialising it again via an alloc...init - but this didn't work and again looking through the debugger it looks as though it was confused as to which object it was supposed to be using on the following iteration of the WHILE loop (it tried to access the released object).
    Having read a little more about memory management can someone tell me if I'm correct in saying that the above is because the tempAuthors object is declare outside the scope of the WHILE loop yet I then try to re-instantiate it within the loop (does that make sense???).
    Sorry for the long post...the more I can understand the process the less I can hopefully stop relying on others for help so much.
    I am continuing to read up on memory management etc but just not there yet.
    Regards
    Wayne

  • Help with encapsulation and a specific case of design

    Hello all. I have been playing with Java (my first real language and first OOP language) for a couple months now. Right now I am trying to write my first real application, but I want to design it right and I am smashing my head against the wall with my data structure, specifically with encapsulation.
    I go into detail about my app below, but it gets long so for those who don't want to read that far, let me just put these two questions up front:
    1) How do principles of encapsulation change when members are complex objects rather than primitives? If the member objects themselves have only primitive members and show good encapsulation, does it make sense to pass a reference to them? Or does good encapsulation demand that I deep-clone all the way to the bottom of my data structure and pass only cloned objects through my top level accessors? Does the analysis change when the structure gets three or four levels deep? Don't DOM structures built of walkable nodes violate basic principles of encapsulation?
    2) "Encapsulation" is sometimes used to mean no public members, othertimes to mean no public members AND no setter methods. The reasons for the first are obvious, but why go to the extreme of the latter? More importantly HOW do you go to the extreme of the latter? Would an "updatePrices" method that updates encapsulated member prices based on calculations, taking a single argument of say the time of year be considered a "setter" method that violates the stricter vision of encapsulation?
    Even help with just those two questions would be great. For the masochistic, on to my app... The present code is at
    http://www.immortalcoil.org/drake/Code.zip
    The most basic form of the application is statistics driven flash card software for Japanese Kanji (Chinese characters). For those who do not know, these are ideographic characters that represent concepts rather than sounds. There are a few thousand. In abstract terms, my data structure needs to represent the following.
    -  There are a bunch of kanji.
       Each kanji is defined by:
       -  a single character (the kanji itself); and
       -  multiple readings which fall into two categories of "on" and "kun".
          Each reading is defined by:
          -  A string of hiragana or katakana (Japanese phoenetic characters); and
          -  Statistics that I keep to represent knowledge of that reading/kanji pair.Ideally the structure should be extensible. Later I might want to add statistics associated with the character itself rather than individual readings, for example. Right now I am thinking of building a data structure like so:
    -  A Vector that holds:
       -  custom KanjiEntry objects that each hold
          -  a kanji in a primitive char value; and
          -  two (on, kun) arrays or Vectors of custom Reading objects that hold
             -  the reading in a String; and
             -  statistics of some sort, probably in primitive valuesFirst of all, is this approach sensible in the rough outlines?
    Now, I need to be able to do the obvious things... save to and load from file, generate tables and views, and edit values. The quesiton of editting values raises the questions I identified above as (1) and (2). Say I want to pull up a reading, quiz the user on it, and update its statistics based on whether the user got it right or wrong. I could do all this through the KanjiEntry object with a setter method that takes a zillion arguments like:
    theKanjiEntry.setStatistic(
    "on",   // which set of readings
    2,      // which element in that array or Vector
    "score", // which statistic
    98);      // the valueOr I could pass a clone of the Reading object out, work with that, then tell the KanjiEntry to replace the original with my modified clone.
    My instincts balk at the first approach, and a little at the second. Doesn't it make more sense to work with a reference to the Reading object? Or is that bad encapsulation?
    A second point. When running flash cards, I do not care about the subtlties of the structure, like whether a reading is an on or a kun (although this is important when browsing a table representing the entire structure). All I really care about is kanij/reading pairings. And I should be able to quickly poll the Reading objects to see which ones need quizzing the most, based on their statistics. I was thinking of making a nice neat Hashtable with the keys being the kanji characters in Strings (not the KanjiEntry objects) and the values being the Reading objects. The result would be two indeces to the Reading objects... the basic structure and my ad hoc hashtable for runninq quizzes. Then I would just make sure that they stay in sync in terms of the higher level structure (like if a whole new KanjiEntry got added). Is this bad form, or even downright dangerous?
    Apart from good form, the other consideration bouncing around in my head is that if I get all crazy with deep cloning and filling the bottom level guys with instance methods then this puppy is going to get bloated or lag when there are several thousand kanji in memory at once.
    Any help would be appreciated.
    Drake

    Usually by better design. Move methods that use the
    getters inside the class that actually has the data....
    As a basic rule of thumb:
    The one who has the data is the one using it. If
    another class needs that data, wonder what for and
    consider moving that operation away from that class.
    Or move from pull to push: instead of A getting
    something from B, have B give it to A as a method
    call argument.Thanks for the response. I think I see what you are saying.. in my case it is something like this.
    Solution 1 (disfavored):
    public class kanjiDrill{ // a chunk of Swing GUI or something
         public void runDrill(Vector kanjiEntries){
              KanjiEntry currentKanjiEntry = kanjiEntries.elementAt(0); // except really I will pick one randomly
              char theKanji = currentKanjiEntry.getKanji();
              String theReading = currentKanjiEntry.getReading();
              // build and show a flashcard based on theKanji and theReading
              // use a setter to change currentKanji's data based on whether the user answers correctly;
    }Solution 2 (favored):
    public class kanjiDrill{ // a chunk of Swing GUI or something
         public void runDrill(Vector kanjiEntries){
              KanjiEntry currentKanjiEntry = kanjiEntries.elementAt(0); // except really I will pick one randomly
              currentKanji.buildAndShowFlashcard(); // method includes updating stats
    }I can definitely see the advantages to this, but two potential reasons to think hard about it occur to me right away. First, if this process is carried out to a sufficient extreme the objects that hold my data end up sucking in all the functionality of my program and my objects stop resembling natural concepts.
    In your shopping example, say you want to generate price tags for the items. The price tags can be generated with ONLY the raw price, because we do not want the VAT on them. They are simple GIF graphics that have the price printed on a an irregular polygon. Should all that graphics generating code really go into the item objects, or should we just get the price out of the object with a simple getter method and then make the tags?
    My second concern is that the more instance methods I put into my bottom level data objects the bigger they get, and I intend to have thousands of these things in memory. Is there a balance to strike at some point?
    It's not really a setter. Outsiders are not setting
    the items price - it's rather updating its own price
    given an argument. This is exactly how it should be,
    see my above point. A breach of encapsulation would
    be: another object gets the item price, re-calculates
    it using a date it knows, and sets the price again.
    You can see yourself that pushing the date into the
    item's method is much beter than breaching
    encapsulation and getting and setting the price.So the point is not "don't allow access to the members" (which after all you are still doing, albeit less directly) so much as "make sure that any functionality implicated in working with the members is handled within the object," right? Take your shopping example. Say we live in a country where there is no VAT and the app will never be used internationally. Then we would resort to a simple setter/getter scheme, right? Or is the answer that if the object really is pure data are almost so, then it should be turned into a standard java.util collection instead of a custom class?
    Thanks for the help.
    Drake

  • Problems with Apache and custom JSPs

    Hi
    We've made an application on top of IFS, using JWS in our test envirnment. Just before making some stress tests, I'd like to try it using Apache. We're currently having two problems:
    1) I switch to the apache configuration running ifsconfig and not selecting JWS. When I try to access the ifs using http://host/ifs/files, everything goes well except that the "logout" icon doesn't appear. I did a little research and found out that the link goes to /ifs/webui/images/logout.gif. This gives an error in mod_jserv.log, like this one:
    [07/06/2001 22:54:20:315] (ERROR) ajp12: Servlet Error: ClassNotFoundException: webui
    It seems it's trying to find a "webui" class, since in ifs.properties every url that begins with /ifs goes to jserv.
    I don't know if this is a know problem or what should I've check...
    2) This one is more important. We're using some custom JSPs, which we use to edit the properties of some types of documents. Basically, when the user clicks over a file one of our JSP appears. These JSPs call a bean to do some processing, passing the HttpRequest as a parameter. The problem is that when using JWS we get the "path" request variable like in path=/%3A29464
    However, when using Apache we get path=/ifs/files/%3A29464 ( and afterwards we get an exception because the ifsSession.getPublicObject method doesn't work).
    Any hints on this? One way could be to check if the path begins with /ifs/files, but that's not really nice.. and besides I could have the same problem in some other parts.
    It's kind of urgent....
    Thanks
    Ramiro
    null

    Hi,
    The answer to your path problem is that you can make use of API to find out the current path so that it works both with Apache and with JWS. Follow the steps
    1. import the oracle.ifs.adk.http package in your custom jsps
    <%@ page import = "oracle.ifs.adk.http.*" %>
    2. Then within your jsp use the method
    getIfsPathFromJSPRedirect
    <%= oracle.ifs.adk.http.HttpUtils.getIfsPathFromJSPRedirect(request) %>
    This will give you the current path of the object on which you clicked on and which initiates the custom jsp.
    You can look at the CMS application which has made use of this API. URL is
    http://otn.oracle.com/sample_code/products/ifs/sample_code_index.htm
    Choose, sample applicatin -> Content Management system.
    Hope this helps
    Rajesh
    null

  • Help regarding ABAP and ABAP Objects

    Dear all,
    I am very new in abap and abap objects. But i have some expr. in other language..specialy development. Right now i am working for srm module...So i want to move my self into abap object and specialy in workflow...Please provide me help regarding this...along with the starting point for this.
    Best Regards
    Vijay Patil

    hi
    Object Oriented prg
    A programming technique in which solutions reflect real world objects
    What are objects ?
    An object is an instantiation of a class. E.g. If “Animal” is a class, A cat
    can be an object of that class .
    With respect to code, Object refers to a set of services ( methods /
    attributes ) and can contain data
    What are classes ?
    A class defines the properties of an object. A class can be instantiated
    as many number of times
    Advantages of Object Orientated approach
    Easier to understand when the system is complex
    Easy to make changes
    Encapsulation - Can restrict the visibility of the data ( Restrict the access to the data )
    Polymorphism - Identically named methods behave differently in different classes
    Inheritance - You can use an existing class to define a new class
    Polymorphism and inheritance lead to code reuse
    Have a look at these good links for OO ABAP-
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com.
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    check the below links lot of info and examples r there
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.geocities.com/victorav15/sapr3/abap_ood.html
    http://www.brabandt.de/html/abap_oo.html
    Check this cool weblog:
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    /people/thomas.jung3/blog/2004/12/08/abap-persistent-classes-coding-without-sql
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b6254f411d194a60000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c3/225b5654f411d194a60000e8353423/content.htm
    http://www.esnips.com/doc/375fff1b-5a62-444d-8ec1-55508c308b17/prefinalppt.ppt
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    http://www.allsaplinks.com/
    http://www.sap-img.com/
    http://www.sapgenie.com/
    http://help.sap.com
    http://www.sapgenie.com/abap/OO/
    http://www.sapgenie.com/abap/OO/index.htm
    http://www.sapgenie.com/abap/controls/index.htm
    http://www.esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    http://www.esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    http://www.sapgenie.com/abap/OO/index.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    http://www.sapgenie.com/abap/OO/
    these links
    http://help.sap.com/saphelp_47x200/helpdata/en/ce/b518b6513611d194a50000e8353423/content.htm
    For funtion module to class
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5954f411d194a60000e8353423/content.htm
    for classes
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b5c54f411d194a60000e8353423/content.htm
    for methods
    http://help.sap.com/saphelp_47x200/helpdata/en/08/d27c03b81011d194f60000e8353423/content.htm
    for inheritance
    http://help.sap.com/saphelp_47x200/helpdata/en/dd/4049c40f4611d3b9380000e8353423/content.htm
    for interfaces
    http://help.sap.com/saphelp_47x200/helpdata/en/c3/225b6254f411d194a60000e8353423/content.htm
    For Materials:
    1) http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCABA/BCABA.pdf -- Page no: 1291
    2) http://esnips.com/doc/5c65b0dd-eddf-4512-8e32-ecd26735f0f2/prefinalppt.ppt
    3) http://esnips.com/doc/2c76dc57-e74a-4539-a20e-29383317e804/OO-abap.pdf
    4) http://esnips.com/doc/0ef39d4b-586a-4637-abbb-e4f69d2d9307/SAP-CONTROLS-WORKSHOP.pdf
    5) http://esnips.com/doc/92be4457-1b6e-4061-92e5-8e4b3a6e3239/Object-Oriented-ABAP.ppt
    6) http://esnips.com/doc/448e8302-68b1-4046-9fef-8fa8808caee0/abap-objects-by-helen.pdf
    7) http://esnips.com/doc/39fdc647-1aed-4b40-a476-4d3042b6ec28/class_builder.ppt
    8) http://www.amazon.com/gp/explorer/0201750805/2/ref=pd_lpo_ase/102-9378020-8749710?ie=UTF8
    1) http://www.erpgenie.com/sap/abap/OO/index.htm
    2) http://help.sap.com/saphelp_nw04/helpdata/en/ce/b518b6513611d194a50000e8353423/frameset.htm
    Hope this helps
    if it helped, you can acknowledge the same by rewarding
    regards
    ankit

  • Java object with ArrayList of custom objects not working

    I have a custom java object that has an ArrayList of another set of custom objects (code listed below). I can pull back a Customer object (to flex client) and it's recognized as a Customer action script object, but the ArrayList in the Customer object is not recognized as an ArrayCollection of Accounts. Instead it is an ArrayCollection of Action Script Objects.
    At first I thought something was wrong with my action script Account class, but then I tried to pull back just an Account and it was recognized as an action script Account. It's just when I have my Customer object with an ArrayList of Accounts that it isn't getting converted.
    Is there something else I need to do to have that ArrayList be recognized as an ArrayCollection of Accounts on the Flex Client side? Is there some way of specifying what type an ArrayCollection is mapped to?
    Thanks in advance for the help!
    public class Customer {
         private String name;
         private String address;
         private ArrayList<Account> accounts;
         public Customer(){
         public String getName(){
              return name;
         public void setName(String str){
              name = str;
         public String getAddress(){
              return address;
         public void setAddress(String str){
              address = str;
         public ArrayList<Account> getAccounts(){
              return accounts;
         public void setAccounts(ArrayList<Account> list){
              accounts = list;
    public class Account {
         private long accountNumber;
         private String type;
         private double balance;
         public Account(){
         public long getName(){
              return accountNumber;
         public void setName(long l){
              accountNumber= l;

    I accidently found how to make this work. I may have missed something while reading about blazeDS reflection, but I thought I'd pass this along anyway.
    What I have is I have an class A. In class A I have an arraycollection of Class B. If I want that arraycollection to return to the server with the correct class, then I need to include Class B in the compiled swf. How I have done that is to create a dummy variable of type B. Importing B will not work you actually need to have a member variable of type B even if you don't need it.
    Example
    import dataobjects.B;
    [RemoteClass(alias="dataobjects.A")]
    public class A {
       private var _b:B; //This is never used, but needed to include B object in swf to be reflected.
       private var_ bList:ArrayCollection = new ArrayCollection();
      public function A(){
      public function set bList(list:ArrayCollection):void{
         _bList = list;
      public function get bList():ArrayCollection{
        return _bList;

  • Need help with Workflow Issue: One notification sending out non-stop email.

    Hi,
    We've created a custom PO Approval Workflow based on standard PO Approval Workflow and we've had this for a while now. Last week, we encountered an issue where the notification keeps on sending email to the Suppliers and Buyers. We found out that the particular notification_id in the WF_NOTIFICATIONS table keeps getting updated by the minute setting the MAIL_STATUS to INVALID then back to SENT then back to INVALID again and so on. We think that whatever is updating this table is the cause but up until now we haven't found what's updating it. Below are some information of our instance.
    Oracle Applications: 11.5.10.2
    Database: 10.2.0.4 64 bit
    OS: AIX
    Custom Workflow based on revision 115.127.11510.16
    Customizations:
    - Created custom notification XX_EMAIL_PO_PDF_SUPP based on EMAIL_PO_PDF_SUPP.
    - Created custom message XX_EMAIL_PO_PDF based on EMAIL_PO_PDF.
    - Added #WFM_CC to XX_EMAIL_PO_PDF.
    - Created custom attribute XX_PO_WF_EMAIL_PERFORMER and set as Performer to notification XX_EMAIL_PO_PDF_SUPP.
    - Created custom function XX_ADDTL_STARTUP_VAL right after function "Set Workflow Startup Values". This function sets #WFM_CC attribute and XX_PO_WF_EMAIL_PERFORMER attribute.
    Not sure if the customizations have anything to do with the issue since not all POs have this issue. Have anyone experience this? Would really appreciate any help with this.
    Thanks,
    Allen

    Kashif M wrote:
    Just review this thread, may help you
    Workflow Notification Mailer is Spamming the Email Accounts of Users [ID 1293792.1]
    thanksHi,
    This note has solved our issue. Hopefully they will release a fix for this as it is a common thing for us to change the email address of Supplier Site.
    Thanks,
    Allen

  • NEED HELP WITH WORKFLOW CONFIGURATION

    I need help with 3 situations below. Please help me with these. How do I configure these. I also haveto provide specs to the Abaper. What exactly do I need to include in the specs. I anyone has the specs similar to these please send me over. Also tell me what I need to do to get these requirements fulfilled.
    1)  Description:
    This is a workflow requirement to serve as a reminder of upcoming investment
    maturities.
    Requirements Details:
    Create a workflow to serve as a reminder of upcoming investment maturities.
    Donor System Processing Narrative:
    Read the maturity dates on investments.
    Target System Processing Narrative:
    Send a notice to the parties that an investment will be maturing soon.
    2)  Description:
    Implement workflow to route invoice receipts using a one time vendor for management
    review and posting
    Desired Functionality:
    If a one time vendor is entered by the AP Voucher Clerk the invoice will be automatically
    parked by the program and a workflow notification triggered to the Accounting
    Supervisor and Accounting Manager (backup). The Accounting Supervisor will review
    the parked document and imaged copy of the actual invoice and post the parked
    document.
    3)  Description:
    An approval workflow is needed for credit memos posted to SAP customer accounts.
    Desired Functionality:
    The Cash Journal Clerk will post a credit memo to the customer account using transaction
    FV75 Park Customer Invoice. This transaction will automatically trigger a workflow to
    the Accounting Manager for approval and then to the CFO who will approve and post the
    parked document. (In order for this transaction to automatically trigger what configuration needs to be done).

    Bob;
    You can borrow the example code that ships with both NI-DAQ (in case you are doing NI-DAQ function calls) and Labview. The best examples to start with are the ones that have the prefix STC.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

  • Help with httprequests and responses

    it is my first time writing a servlet, but i need one to work with a project i'm working on. I have a class that will do all the methods on the server side of the project, but my problem now which i need to resolve, is how to get my client side app (made in flash mx) to work with my servlet and communicate the xml information i'm getting on the server back and forth.
    I know that you must answer a httpRequest in the servlet, and i know this must be sent somehow from the clientside app, but i need information and help on how to get information sent in this request the right way, and also help on how to properly format a response that will work.
    from what i know so far- it looks like the type of client-side app isn't important, as long as the request is sent right- so knowing that, flash and java should work fine in communication as long as flash sends a valid request and java answers it right.
    could anyone help me with information and/or help about how the requests and responses send information and what code you need to write to get information (even generalized code will work)
    Help would be really really appreciated.
    -mike

    To get data to and from the server and client, you'll have to seriaze it at one end and deserialize it at the other end.
    I don't know much about Flash MX but a java program on the client can exchange data with a servlet using the above means.
    For example, to read a string from a servlet using a java program on the client, you do the following:
    On the servlet:
    1. set content type to 'application/x-java-serialized-object'
    2. Get an output stream thus:
    ObjectOutputStream outStream =
    new ObjectOutputStream(response.getOutputStream());
    3. Write the data and flush the stream to be sure that all content has been sent:
    outStream.writeObject(myString);
    outStream.flush();
    On the client (java prog):
    1. get a URL: URL dataURL = new URL(protocol, host, port, address)
    2. connect to the URL: URLConnection connection = dataURL.openConnection();
    3. for fresh results everytime, turn off caching:
    connection.setUseCaches(false)
    4. get an input stream:
    ObjectInputStream in = new ObjectInputStream(connection.getInputStream());
    5. Get your string thus:
    String myString = (String) in.readObject();
    This is a very simplified example (you'll have to catch exception an a reall application).
    I recommend the book 'Core Servlet and JavaServer Pages' by Marty Hall
    http://www.coreservlets.com

Maybe you are looking for

  • Photo uploading problem

    All of the sudden, I can't upload picture files to my processor. I just uploaded a couple days ago and everything worked fine. I've checked file (ready to read and write) and made sure the file was unlocked. Pictures inside file are transparent. I ca

  • Sending mail to external address

    Hi all, I did a configuration for set up the gateway 1- Set up RFC in SM59. I tested this connection was working fine. 2- Created a node in SCOT under INT (Internet). Allowed all formats for processing. 3- I have set up conversion rules in SCOT. 4- A

  • FTP Adapter: Inbound and Outbound flat files

    Having lots of trouble trying to Send messages (via Subscribe event) with my FTP adapter, with this specific error: Thu May 12 11:39:10 MDT 2005: Bridge { agent=oracle.oai.agent.client.AgentImpl@2f48d2 application=PAGOFTPAPP partition=null active=tru

  • Gouping of Shopping Cart's line Items

    Hi, I want to group the following SCs for the local PO. SC # 1 , LI # 1,  G/L account number 12345 SC # 1 , LI # 2,  G/L account number 12345 SC # 1 , LI # 3,  G/L account number 78901 SC # 1 , LI # 4,  G/L account number 78901 SC# 1, LI # 1 and 2 to

  • How can I open a PC file ".xlsx" on my iMac

    What cross platform system can I install that is FREE?