How to determine host status in a task via python api

Hello all,
using the python api I am having some issues trying to determine the status of a host within a task. For example I have a job, with one task and 10 hosts associated with that task. Eight hosts finish the task, 2 fail. However via the api I can only seem to determine the status of the job and the task. What I want is to be able to generate a report that basically matches what you see via the gui (ie 8 hosts ok, 2 hosts failed). The data structure OnStageTaskData gives me a status and a list of hosts, but not a status for each host. (Note I am not using any of the depricated functions/data structures). Currently my code looks like (minus the api init, etc)...
# list all the jobs for last week
joblist = api.GetJobs()
for job in joblist:
# if the job occured in the last week
if job.c_time > reportstarttime:
print "\nJob name %s Time %s " %(job.name, time.ctime(job.c_time))
try:
jobdetails = api.GetOnStageJob(job.id)
except COsApiJobNotFoundException:
print "Can't find job %s details" %job.name
continue
for tasks in jobdetails.job_data.tasks:
for hostid in tasks.task_data.target:
try:
hostinfo = api.GetHostGroup(hostid)
except OsApiHostNotFoundException:
print "Can't find host details %s" %tasks.task_data.name
print "Hostname %s Status %s" %(hostinfo.name, tasks.status)
which generates output like...
Job name chg233146-sol9 Time Sun Jan 13 10:31:42 2008
Hostname tacnomsrv02 Status Failed
Hostname tacpthsrv01 Status Failed
anyone have another way to doing this or suggestions? Or is this kind of info not available via the api? Thank you.

Hi ConnectSolutions,
As you correctly pointed out, there is some bug in our code
that keeps the room active and you dont receive any events or
notification if you are entering as guest and waiting and the host
arrives. Also, since you havent entered yet i.e your role is still
5 i.e. UserRoles.LOBBY , you can't access any of the UserManager's
collections and will get a length of 0 always. We will be fixing
this with priority .
But you can get around the problem as of now, by having a
small shared model of yours ( any collectionNode or sharedModel
will do) where you create a node and publish a message on it from
the Owner's side whenever the owner/host enters to notify everyone
that he has entered. Just remember to set the accessmodel of
NodeConfiguration of node on which you are publishing to LOBBY ie.
role = 5 , and make the publishModel = 100 so that only owners can
publish on this node. In this way , any users waiting will be
receiving this message and will know the host has arrived. If you
can't get this sharedModel concept to work, let me know. I will try
to run on my side.
And as of our side regarding actual fix, we will fix this use
case and put in the next drop of SDK and also update in forum about
it.
On the host side though, he is always notified when he enters
if there are pending users knocking to enter. See the KnockingQueue
example in case you want to explore that.
Thanks
Hironmay Basu

Similar Messages

  • How to determine the status of  Maintenance Order while working in workflow

    Hello Experts,
       I am working on a workflow to release production related maintenance order.In this workflow I need to determine the status of the Maintenance Order (BOR object BUS2007) whether it has been released or not.I am trying to do this by condition step type.I can't understand which field of BUS2007 object I need to check to know the status of the maintenance order.
    Can somebody help please?
    Regards,
    Manas

    Hi,
    Have you not getting any value in Status Profile attribute.
    For new attribute u need to write coding, getting the value of that released field.
    First, u need to implement by going to Edit->Change Release Status ->To implemented.
    Then check your BO and generate it. If any error occurs in Menu bar Goto->Error List and see what is the error.
    After generation of your BO, test your BO.
    If test works fine, then Delegate with the standard BO.
    To delegate, u need to be in initial screen of SWO1 and goto Settings->Delegate. Give Super type as Std BO and delegate type as your custom BO and use the Std BO in your workflow.

  • How to determine Host presence without entering room

    Is there a way to know if the host has arrived without
    authenticating to a room?
    I noticed that the room state is always hostHasNotArrived to
    a non-authenticated guest and when a listener for ROOM_STATE_CHANGE
    is attached to the sessions roomManager instance you do not receive
    events until you enter the room as either a guest or an
    authenticated user. Furthermore you receive two ROOM_STATE_CHANGE
    events as soon as you enter the room, the first being a
    hostHasNotArrived ( regardless of the actual host status ) and then
    a second immediate ROOM_STATE_CHANGE event stating the correct
    state of the room ( whatever it really is ).
    The use case I am trying to solve for is in an application
    designed to only be used by a guest user you would like to know the
    presence of a host in a room. Otherwise you could enter a room as a
    guest and wait forever. More importantly in the current
    implementation if I attempt to log in as a guest and receive the
    hostHasNotArrived status I would assume that there was no host when
    in fact there is. Currently I have to ignore the hostHasNotArrived
    and wait around for the second event.

    Hi ConnectSolutions,
    As you correctly pointed out, there is some bug in our code
    that keeps the room active and you dont receive any events or
    notification if you are entering as guest and waiting and the host
    arrives. Also, since you havent entered yet i.e your role is still
    5 i.e. UserRoles.LOBBY , you can't access any of the UserManager's
    collections and will get a length of 0 always. We will be fixing
    this with priority .
    But you can get around the problem as of now, by having a
    small shared model of yours ( any collectionNode or sharedModel
    will do) where you create a node and publish a message on it from
    the Owner's side whenever the owner/host enters to notify everyone
    that he has entered. Just remember to set the accessmodel of
    NodeConfiguration of node on which you are publishing to LOBBY ie.
    role = 5 , and make the publishModel = 100 so that only owners can
    publish on this node. In this way , any users waiting will be
    receiving this message and will know the host has arrived. If you
    can't get this sharedModel concept to work, let me know. I will try
    to run on my side.
    And as of our side regarding actual fix, we will fix this use
    case and put in the next drop of SDK and also update in forum about
    it.
    On the host side though, he is always notified when he enters
    if there are pending users knocking to enter. See the KnockingQueue
    example in case you want to explore that.
    Thanks
    Hironmay Basu

  • How can I monitor status of a task over time

    I have a application which contains a Tree control and a Button control.
    The Tree is used for representing a XML file content, and the Button is used for buliding XML
    files. the brief work flow is like below:
    I click the Button to invoke a Java function to build XML files to a certain directory on my disk using RemoteObject, while this operation usually takes some time to complete. and I don't know how much time it will cost, when the job finishes.
    Meanwhile, the application is trying to read those XML files just built as DataProvider for the Tree.
    So the problem is when I try to read those XML files after I click the Button, those XML files may not exist yet in the directory.
    I am thinking of using a progressBar to show the progress of building XML files, then to read those XML files after build work complete.But I am not sure if it works.
    thank you for any helps.

    Sorry about my long story, your suggestion is quite helpful, I figured it out now.
    while I have another question about determine if some files are exist in a directory?
    I will post it as a new topic.

  • How to add custom field to the task via CSOM?

    Hello!
    I'm trying to add custom fields to my programmatically created task in project 2013. Tasks are created. Then I get them and load custom fields by:
    DraftProject projCheckedOut = tstProj.CheckOut();
    projContext.Load(projCheckedOut.Tasks);
    projContext.ExecuteQuery();
    foreach (var task in projCheckedOut.Tasks)
    projContext.Load(task.CustomFields);
    projContext.ExecuteQuery();
    But the each CusomFieldCollection object has only 1 field (Health, because it have a default value and created automatically). But when I load my project in Project professional i saw more than 1 field, but they are empty.
    Then I tried to add a new custom field to each CusomFieldCollection of each task.
    var newField = new CustomFieldCreationInformation();
    newField.FieldType = CustomFieldType.TEXT;
    newField.Name = "F_1";
    newField.Description = "test description";
    task.CustomFields.Add(newField);
    task.CustomFields.Update();
    New field added to the collection, but when I update the project and publish it nothing is happened.
    How to add a custom field to the each task and set it value?
    Or how to attach enterprise task custom field to my tasks.
    I'm using Microsoft.ProjectServer.Client.

    Hi
    Hope the below posts are of some  helpful for you 
    http://social.msdn.microsoft.com/Forums/en-US/d79f22f2-7fd2-46af-b778-e189c8611120/use-csom-to-update-projects-custom-fields?forum=project2010custprog
    http://msdn.microsoft.com/en-us/library/microsoft.projectserver.client.project.setcustomfieldvalue.aspx
    Thanks
    Geeth
    Geeth If you feel that the answer which i gave you is Helpful please select it as Answer/helpful.

  • CommPr01-TC { how to update product status(locked,Archived etc) via Program}

    Hi all,
    TCode: Commpr01 ( how to update material product status as Locked or Archived Via report program. Can any one suggest me what FM's
    i have to use and what inputs i have to pass. I already checked with "COM_PRODUCT_MAINTAIN_STATUS" it is not working properly.
    May be i passed wrong input to that function module i think off.
    Thanks,
    Anbusundaram A

    Hi,
    Its good that u pasted the complete log file. In your environment you have to run this upgrade tool only once from any of the middle tier.
    And with respect to your error that u got in precheck is quite simple. All u have to do is just run this script from by connecting to portal schema using sqlplus.
    Run dropupg.sql
    Location-------- /raid/product/OraHome_1/upgrade/temp/portal/prechktmp/dropupg.sql
    Later you re-run the upgrade tool and let me know the status.
    Good luck
    Tanmai

  • How to display the status of script sent via fax?

    Hi Experts,
    I am beginner in ABAP....I am sending a script(complaint) via fax to the user who posts the complaints. But is there any way that I can display whether the fax was succesfully sent/failed.
    The applications is a module pool program which in turn call an executable program where we have the logic for the form to be sent via fax.The report of this fax is saved in the SAP outbox but we want to display it to the user as well.
    Thanks in advance.....

    Hua,
    I have attached an example in which a front panel boolean indicator is toggled in the subvi. Also, a front panel stop button is used to stop the loop execution in the subvi. References are passed to the subvi instead of the actual control values.
    Without seeing your code I'm not sure what was going on with the globals, but you had to have a data dependency somewhere which was keeping the code from running until after the execution of the subvi. The code must be totally independent of the subvi in order to run. Also, in order for the update to work it would have to be operating in a loop.
    Attachments:
    Main.vi ‏13 KB
    subvi.vi ‏20 KB

  • How do I get CPU / memory utilization information via the API?

    I can't seem to find anything in the iOS API that would give me information about CPU utilization (user, kernel, idle) and memory (free, pinned, idle, in use), but I see apps like System Activity Monitor in the app store that provide such information. Can anyone point me to the relevant part of the SDK?

    This is a quection for the Developer forum.

  • How to select a Tab in a TabPane via API

    I am trying to figure out how to select a Tab in my TabPane via the API. In the javadoc for the Tab it says to use the TabPane.selectedTab, there is no selectedTab property that I can find. Also on the tab there is a selectedProperty but it is read only.
    So how do you change the selected tab via the API?

    Hi,
    Its...
    tabPane.getSelectionModel().select(index)You also have other options on the selectionmodel.
    Cheers,
    Nuwanda

  • How to determine IE type(32 bit or 64 bit) in a task sequence while updating Java

    How to determine IE type(32 bit or 64 bit) in a task sequence
    Hi,
    Currently i have to update new version of Java after removing all the previous existing version of Java by using TS in SCCM 2007.
    we have both 32 bit and 64 bit browser in the environment. I am stucked in determining whether the browser is of 32 bit or 64 bit.
    How to determine IE type(32 bit or 64 bit) in a task sequence so that respective java can be installed for that IE browser.
    will highly appreciate quick response.
    Thanks in advance.
    Daya

    But you also need to install JRE x86 on x64 systems, since most people actually use the 32bit browsers on x64 systems.
    The detection logic is actually pretty simple -- just check the right registry hive to find the installation location of the BIN\JAVA.DLL. Both pathnames are stored in HKLM\Software\JavaSoft\Java Runtime Environment\1.7 in the registry value "JavaHome",
    but the x86 path is stored in the 32-bit hive and the x64 path is stored in the 64-bit hive.
    Lawrence Garvin, M.S., MCSA, MCITP:EA, MCDBA
    SolarWinds Head Geek
    Microsoft MVP - Software Packaging, Deployment & Servicing (2005-2014)
    My MVP Profile: http://mvp.microsoft.com/en-us/mvp/Lawrence%20R%20Garvin-32101
    http://www.solarwinds.com/gotmicrosoft
    The views expressed on this post are mine and do not necessarily reflect the views of SolarWinds.

  • How to update task status from custom task in state machine workflow

    i m using custom task for state machine workflow
    i am using
    if(this.onTaskChangedSupervisorAction_AfterProperties.ExtendedProperties["Workflowstatus"].ToString().Contains("Approved"))
    if above is true moving forward its working fine but i want to update the status field of task as i can update the title and due date for the task but how can i change the status once approved it
    should show the status as approved it's only showing in progress
    this.CreateTaskSupervisorAction_TaskProperties.Title="supervisor task"
    MCTS,ITIL

    If your task shows In Progress state then I think you need to look at your workflow and make sure you are using Complete Task activity and if you are already using Complete Task Activity then verify the Correlation ID. Ideally you are not required to set
    this value in workflow. You simply use the Complete Task Activity.
    If you are running into issue where your workflow is staying in In Progress state even after the task is complete then you can look at the following blog post.
    How to programmatically complete Approval workflow task
    Amit

  • How to determine server host and server port

    Dear Experts.
    How to determine server host and server port where Webdynpro application is working.
    If the url is following
    http://sapr3dm:50500/webdynpro/dispatcher/local/ForecastingPowerProject2/NewObjectConnection?SAPtestId=6
    How to receive sapr3dm and 50500

    Hi,
    May be of use
    WDProtocolAdapter.getProtocolAdapter().getRequestObject().getServerName();
           WDProtocolAdapter.getProtocolAdapter().getRequestObject().getServerPort();
    Regards
    Ayyapparaj

  • How to determine the background job status?

    Hi Gurus,
    My program is as follows:
    1. I have used FM job_open to open a new job.
    2. SUBMIT to call another program which creates the file on application server.
    3. FM job_close to trigger that job.
    Now I want to determine the status of that triggered job (Not through SM37), Once I get a status for complete or cancelled I will be coding based on that.
    So could you please help me out for the issue?
    Thanks in advance.

    hi ,
    check table TBTCO.
    YES. u  can check for STATUS = P- Schedule/S---Released
    regards
    Prabhu
    Edited by: Prabhu Peram on Sep 18, 2008 6:43 PM

  • How to determine most recent date from the date column of internal table

    Dear friends
    would you like to tell me. how i determine the most recently changed record by looking at date and time from internal table i am not supposed to sort the table by date and time... I must check date and time with other records date and time to determine which record is most recently changed...
    here the scenario is.
    id idnumber chdate chtime
    1 123456 20060606 135312
    2 123456 20060606 135900
    3 123456 20060606 132300
    4 123457 20060606 140000
    5 123457 20060606 142500
    in the above scenario i must keep in my mind that the most recently changed record is identical to its idnumber i can say that:
    the record should be fetched this way
    id idnumber chdate chtime
    3 123456 20060606 132300
    5 123457 20060606 142500
    because here the id 3 is the most recently changed in the idnumber 123456
    where id 5 is the most recently changed in the idnumber 123457
    please help me to determin how i am supposed to carry out this task any suggestion, code will be great help of mine.
    regards
    Naim

    After testing my suggestion above, I realized that it doesn't work because the delete adjacent actually will keep the first one and delete the rest.  I'm working with Srinivas's code a bit now,  I think it is almost what you want.  I am under the impression that you dont' want to HIGHest date/time, but just the last record of the sequence, if this is the case, then this code will help.  Here we will assign an index to each record per the idnumber, that way we can sort it and get the lastest record.
    report zrich_0001.
    types: begin of itab_type,
            id       type i,
            idnumber type i,
            chdate   like sy-datum,
            chtime   like sy-uzeit.
    types: end of itab_type.
    types: begin of itab_type2,
            id       type i,
            idnumber type i,
            index    type i,
            chdate   like sy-datum,
            chtime   like sy-uzeit.
    types: end of itab_type2.
    data: itab     type table of itab_type with header line,
          itab2    type table of itab_type2 with header line,
          prev_rec type itab_type.
    data: v_id type i.
    start-of-selection.
      itab-id       = 1.
      itab-idnumber = 123456.
      itab-chdate   = '20060606'.
      itab-chtime   = '135312'.
      append itab. clear itab.
      itab-id       = 2.
      itab-idnumber = 123456.
      itab-chdate   = '20060606'.
      itab-chtime   = '135900'.
      append itab. clear itab.
      itab-id       = 3.
      itab-idnumber = 123456.
      itab-chdate   = '20060606'.
      itab-chtime   = '142500'.
      append itab. clear itab.
      itab-id       = 4.
      itab-idnumber = 123457.
      itab-chdate   = '20060606'.
      itab-chtime   = '140000'.
      append itab. clear itab.
      itab-id       = 5.
      itab-idnumber = 123457.
      itab-chdate   = '20060606'.
      itab-chtime   = '120000'.
      append itab.
      clear itab.
    <b>  data: counter type i.
    * Assign an index to each row per idnumber
      loop at itab.
        on change of itab-idnumber.
        if sy-tabix > 1.
          clear counter.
          endif.
        endon.
        clear itab2.
        move-corresponding itab to itab2.
        counter = counter + 1.
        itab2-index = counter.
        append itab2.
      endloop.
    * Sort it and get rid of older records.
      sort itab2  by idnumber ascending
                     index descending.
      delete adjacent duplicates from itab2 comparing idnumber.</b>
      read table itab2 with key idnumber = '123456'.
      write:/ itab2-chdate, itab2-chtime.
      read table itab2 with key idnumber = '123457'.
      write:/ itab2-chdate, itab2-chtime.
    Regards,
    Rich Heilman

  • How to determine the Docid

    I would like to open a web intelligence detail report I created from within an xcelsius dashboard.
    However, I can't use the FS command button or URL buton, because I don't know how to determine what the document id for the webi report is.  I've gotton lost wandering around the business objects website.  Since our company is new to BOBJ, no one on the project team is quite sure how to do this either.
    Can anyone point me in the right direction.  I'm not a .net  or web services developer.  I just create universes, webi reports and dashboards.
    Thanks.

    I can provide you with this tip:
    To obtain the document ID, navigate to the document in InfoView, hover your mouse over the document name hyperlink, and look for the ID number in the browser's status bar. You can also obtain the document ID from the Central Management Console.

Maybe you are looking for

  • Neeed for Sales Assistance issue in oracle istore

    Hi All, I have an issue on Need for sales rep assistance notification mail in oracle EBS.Mail sending to the address with out any issue.But mail does not having &QUOTEDETAILWITHTAX details.Means Product , # of Units Shippable? , Net Amount are missin

  • Lock computer causes itunes stopped working error

    I can repeatedly crash itunes by locking my computer either with a screen saver requiring a password or via ctrl-alt-del "lock my computer". I have tried disabling other applications via MSconfig as suggested on some forums (no changes), verified tha

  • Automatically create folders then attach custom icon to each folder.

    This is my current working script, does anyone know how I can now add customer icons to the folders in Applescript Many thanks Matt set theWeekNumber to "" repeat display dialog "Please enter the week number:" default answer theWeekNumber set theWeek

  • 3rd Party Software Not Seeing That Adobe Reader XI Is Installed.

    I have a few pieces of (custom) software that with previous versions of Adobe Reader (7, 8, 9, and X), would open Adobe Reader automatically when selecting to open a PDF from within the software. When the pc's were updated to Reader XI, the software

  • Javascript function not working in LiveCycle

    I've just completed importing an existing acrobat form into LiveCycle for editing.  During the import process, I received this LiveCycle warning: The form includes a simple JavaScript Function that looks really good, but probably doesn't reference th