Getting Sequence object from pre-step substep of Sequence Call based step type

How to obtain reference to Sequence object from within pre-step substep of Sequence Call based custom step type?
Given: new custom step type which based on NI Sequence Call step type. There is Pre-Step substep exist for this step type.
How to get reference to Sequence object representing Sequence which will run?
Although there is possible to examine SequenceAdapter and SequenceCallModule properties, it seems redundant since module (Sequence) is already loaded by TestStand ("NI TestStand Reference Manual. Table 3-4. Order of Actions that a Step Performs"   Action #6, while my code is running as Action #13).
Thanks.
Misha

Could you explain what you want to do ?
Why do you want to get the sequence object within a pre-step substep ?
I give you some informations but I don't know if it's the better way to do what you want (because I don't know what you want to do with the sequence object).
If the substep uses the ActiveX adapter :
You can get the sequence object but you should save the object reference in a StationGlobals variable.
And you should release the object reference within your sequence when you don't need it any more.
If the substep uses another module adapter: 
Get the step module, then the sequence name (module property).
Then get the sequence object by the sequence name from the sequence file.
Here are the paths to use for both methods :
Sequence Name property path : Step.Module.SeqName
Sequence Object path : RunState.SequenceFile.GetSequenceByName (seqname)

Similar Messages

  • Getting an object from HttpSession...

    Hi all,
    I am stuck which is according to me is very obvious...please correct me if I am wrong.
    I have a java.util.ArrayList object in my HttpSession object.
    Now in my helper class to which the request is passed from the servlet I am extracting this ArrayList object in one ArrayList object and putting it into the HashMap. After this, I am again extracting this ArrayList object from the HttpSession and assigning it to a newly created ArrayList object in my helper class. Now I am passing this newly created ArrayList object to a method. This method after processing changes this ArrayList object. And finally I am putting this changed ArrayList object in the HashMap I created earlier.
    After doing all this, when I am trying to extract and print these ArrayList Objects from the session object...I found my first ArrayList object has also been affected by the same change as the second one. The expected result was only the second object will be changed. I am stuck with this.
    I know it has something to do with references....but I am not able to understand that when I am trying to create two new copies by extracting an object from the Session...and changing one how is my second object getting affected. Any help will be appriciated.
    The code for this is as follows:
    "phSessionState" is a collection object in HttpSession which holds all the other objects. We are not putting different objects directly in the HttpSession.
    "LineObject" is a simple JavaBean kind of class with gettrs and setters
    ArrayList originalList = (ArrayList)phSessionState.getData("lineObjectList");
    HashMap stagedLineObjects = new HashMap();
    stagedLineObjects.put("OriginalList", originalList);
    //Extracting same in another object and calling a method to update it.
    ArrayList tempList = (ArrayList)phSessionState.getData("lineObjectList");
    //Method to update the ArrayList
    updateLineObjectList(tempList, request);
    stagedLineObjects.put("UpdatedList", tempList);
    //Trying to get the objects from the HashMap and print
    System.out.println("Retriving OriginalList...");
    ArrayList List1 = (ArrayList)stagedLineObjects.get("OriginalList");
    for(int i=0; i<List1.size(); i++)
         LineObject lo = (LineObject)List1.get(i);
         System.out.println(lo.getUserID() + "\t" + lo.getPassword()
    + "\t" + lo.getFirstName() + "\t" + lo.getMiddleName() + "\t" +
    lo.getLastName());
    System.out.println("Retriving UpdatedList...");
    ArrayList List2 = (ArrayList)stagedLineObjects.get("UpdatedList");
    for(int i=0; i<List2.size(); i++)
         LineObject lo = (LineObject)List2.get(i);
         System.out.println(lo.getUserID() + "\t" + lo.getPassword()
    + "\t" + lo.getFirstName() + "\t" + lo.getMiddleName() + "\t" +
    lo.getLastName());
    Waiting for your valuable help...
    Thanks & Regards,
    Gauz

    You must remember that objects are passed by reference. So when you are passing around your ArrayList, you are actually passing a reference to the ArrayList. In other words, there exists one instance of your specific ArrayList in memory and what you are passing around are copies of the "reference" to that memory location.
    If you want to pass a copy of your ArrayList, you can create a copy of the ArrayList and pass the reference to that new copy. One way to do this is as follows:ArrayList originalList = new ArrayList();
    //Let's put two objects into the ArrayList
    originalList.add(1, new StringBuffer("object1"));
    originalList.add(2, new StringBuffer("object2"));
    //Now let's copy the ArrayList
    ArrayList copyOfList = new ArrayList(originalList);
    //now, you have two copies of the ArrayList.  You can make
    //changes to copyOfList without affecting originalList
    copyOfList.add(3, new StringBuffer("object3"));
    //Checking the size of each ArrayList will demonstrate a difference
    System.out.println("Original's size is " + originalList.size());
    System.out.println("Copy's size is " + copyOfList.size());
    //Output should be:
    //  Original's size is 2
    //  Copy's size is 3Please keep in mind that the objects within the ArrayList are also being passed by reference. So if you modify an object within originalList, those modifications will be reflected in the same object found in copyOfList.
    For example,StringBuffer sb = (StringBuffer)copyOfList.get(1);
    sb.append(":modified");
    //Now print the values of the first object in each ArrayList
    StringBuffer sbFromOriginal = (StringBuffer)originalList.get(1);
    StringBuffer sbFromCopy = (StringBuffer)copyOfList.get(1);
    System.out.println("Original's value is " + sbFromOriginal.toString());
    System.out.println("Copy's value is " + sbFromCopy.toString());
    //Your output should read
    //  Original's value is object1:modified
    //  Copy's value is object1:modifiedThis is because you made a copy of the ArrayList, but not a copy of each object within the ArrayList. So you actually have two seperate copies of ArrayList but they are referencing the same two objects in positions 1 and 2. The object in position 3 exists only in copyOfList.
    Hope this helps.

  • How to get File  object from Document Object . ?

    In conventional Dom Parsing we pass file to DocumentBuilder to get Document Object .
      File file = new File("c:\\MyXMLFile.xml");
      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
      DocumentBuilder db = dbf.newDocumentBuilder();
      Document doc = db.parse(file); // gOT Document here . My problem is how do i get File object back from Document . If i have Document object with mi.
    Please consider above code as example i dont have File object in my code . i am using Xhive DB API where i get Document directly from API method .
    I need to convert this Document to File to get size of file
    Please suggest solution on this
    Edited by: AmitChalwade123456 on Dec 5, 2008 6:10 AM

    Hello Guys any views on this topic

  • How to get stylesheet object from JAVA RESOURCE stored in DB

    Hi,
    I stored a xslt file in the database and have a JAVA RESOURCE file now. How can i get a stylesheet object from this resource file?
    I took the following class to get an impression how to get the contents of the resource but -although the name of the resource was spelled correctly- i got a file not found exception.
    Whats wrong?
    public class PrintRessource {
    public static void print (String p_ressource){
    try {
    Class c = PrintRessource.class;
    System.out.println(c.toString());
    InputStream file = c.getResourceAsStream(p_ressource);
    if (file == null)
    throw new FileNotFoundException("XSLT file not in DB");
    byte[] buffer = new byte[4096];
    int bytes_read;
    while ((bytes_read = file.read(buffer)) != -1)
    System.out.println(new String(buffer, 0 , buffer.length));
    catch (Exception exp) {
    System.out.println(exp);
    Thanks

    The code works as is. I just forgot to add the slash in front of the Resource file name.

  • How to get the object from an event

    Hey, thanks for helping.
    I'm trying to get the causing object from the event so i can run a method from the causing object,
    I tred using the getSource method inherited from the Event class but it doesn't see the method I have in that object (method1)
    I have this code:
    private class Over implements MouseListener
    public void mouseClicked(MouseEvent e)
    public void mousePressed(MouseEvent e)
    public void mouseReleased(MouseEvent e)
    public void mouseExited(MouseEvent e)
    public void mouseEntered(MouseEvent e)
    e.getSource().method1();
    }

    By the way, MouseEvent is a subtype of ComponentEvent, so it has the method:
    Component comp = evt.getComponent();which is convenient if "method1" is a Component method.
    Another btw: the "adapter" classes allow you to write listeners without cluttering your code with empty method bodies:
    class Over extends MouseAdapter  {
        public void mouseEntered(MouseEvent e) {
    }

  • Getting Color object from String

    hi
    i need to get a Color object from a string provided at runtime.ie for the string "RED" i need to get a object of Color.RED.I have already tried to use decode() from Color class but it throws numberformat exception,can someone guide me.

    Color.decode(String) will decode octal and hexidecimal representations of colors e.g.
    Color poo = Color.decode("0x215DB8"); // hex description of color
    works.
    If you want to use RED, BLUE ... read them at run into a String or whatever and then test this String to get what color the user wanted e.g.
    read from text file at run time that button colour should be ORANGE.
    In your code, put
    String colourStr; // read what colour the user specified into this var
    Color their_color = null;
    if(colour.equals("ORANGE"))
    their_color = new Color(Color.orange);
    else if(colour.equals("BLACK"))
    // you can guess what goes here.. and so on.
    It often nice to make them specify the hex value of the colour because there are more of these than the predefined colours (shock horror).
    Anyway,
    seeya, Edd.

  • Getting NSData object from NSImage.

    I want NSData object from NSImage object.
    I looked in documentation and i didn't found any method to get back the data from image object. is it possible to retrieve NSData from NSImage ?
    Thanks....
    Message was edited by: xmax

    Somewhat ..
    - (NSData *)TIFFRepresentation
    Eric

  • How get SPWeb object from web exact url

    Hi,
    I have site collection object and its sub-web exact url. I want to get SPWeb object by using exact web url. I try SPSite.OpenWeb(string,bool) function by passing this excat url, but it throw an exception ie invalid character near ':'.
    SPSite.url = http://servername/site1
    subsite url is http://servername/site1/site2/site3. I need web object against subsite url.

    Hi,
    Thanks for the reply. Steven's answer help me.
    I also learned one more thing here. By providing your current web's exact url in SPSite constructor will create an instance of site of current web. But site.OpenWeb() will return the web object corresponding to provided url, not the web object of site url.
    using(SPSite site = new SPSite("http://servername/site1/site2/site3"))
          using(SPWeb web = site.OpenWeb())
    Here  site Url is http://servername/ and site.OpenWeb() return SPweb object against "http://servername/site1/site2/site3".

  • Loading a tree of objects from a cache in a single call using an aggregator

    Hi,
    I currently have the following problem. I am trying to load a tree of objects from coherence by recursing up an object tree from a child object.
    What is currently in place is something like this (not actual implementation).
    Child child...// initialisation of Child;
    List<Parent> parents = new LinkedList<Parent>();
    Parent parent = null;
    int parentId = child.getParentId();
    while (true) {
    parent = cache.get(parentId);
    if (parent != null) {
    parents.add(parent);
    parentId = parent.getParentId();
    } else {
    break;
    However, this results in a number of calls over the network to the coherence cache and is proving to be quite inefficient. What I would like is to be able to write something like a filter or an aggregation function which will simply take in the child, or the parent id of the child, and return a list of all the parents (with the recursion logic taking place on the coherence node). This will hopefully reduce network latency considerably.
    Does anybody know how to go about doing this within coherence?

    XML might be a better solution, but using tags should work.
    The Sun tutorial at http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags5.html#68205 should be helpful to you.
    When processing a tag, determine if there is a parent tag by using getParent() or findAncestorWithClass().
    If there is no parent, instantiate your site navigation object based on the tag arguments and save a reference within the tag object. You'll probably want to also add the reference to page or session scope as an attribute for later use.
    If there is a parent, instantiate the new navigation object and then retrieve the parent navigation object from the parent tag (create a getNavigation() method in tag?). Then add the new navigation object to the array in the parent navigation object.

  • Getting invalid-attribute-value Error during Delta Import on Call-based ECMA2

    I'm developing an ECMA2 MA to which supports delta imports.  I have found very few samples of working code to do delta imports, so my attempts are created
    using a lot of trial and error... Any samples of working Call based MA's with delta support would be much appreciated :-)
    The data is located in a SQL server and the schema (for delta) is like this (simplified):
    EmpID string
    Status string
    UPDATESTATUS string (<-- This is the update column with values New/Update/Delete)
    For each EmpID, there may be multiple Status values, i.e. Status should be imported into a multi value attribute in FIM.
    For the full import this is working as expected, but I run into issues when attempting to do the delta imports
    The code for the delta import
    private
    GetImportEntriesResults GetImportEntries_Delta(GetImportEntriesRunStep importRunStep)
    GetImportEntriesResults importReturnInfo;
    List<CSEntryChange> csentries =
    new List<CSEntryChange>();
    string employeeID =
    null;
    string appStatus =
    null;
    string currEmployeeID =
    CSEntryChange csentry =
    null;
    List<string> appStatusList =
    new List<string>();
    string changeMode =
    for (int i = currentReadRecord; i <= da.Tables["AppStatus"].Rows.Count - 1; i++)
    if (currEmployeeID != da.Tables["AppStatus"].Rows[i].ItemArray.GetValue(0).ToString().Trim())
    if (currEmployeeID !=
    "") // this should be true except for the first run
    csentry.AttributeChanges.Add(AttributeChange.CreateAttributeUpdate("IdentityStores", appStatusList));
    csentries.Add(csentry);
    appStatusList = new
    List<string>();
    if (csentries.Count >= m_importPageSize)
                  currentReadRecord = i;
    importReturnInfo = new
    GetImportEntriesResults();
    importReturnInfo.MoreToImport = (i <= da.Tables["AppStatus"].Rows.Count - 1);
    importReturnInfo.CSEntries = csentries;
    return importReturnInfo;
    changeMode = da.Tables["AppStatus"].Rows[i].ItemArray.GetValue(2).ToString().Trim();
    csentry = CSEntryChange.Create();
    csentry.ObjectType = "ApplicationIdentity";
    employeeID = da.Tables["AppStatus"].Rows[i].ItemArray.GetValue(0).ToString().Trim();
    currEmployeeID = (string)employeeID;
    switch (changeMode)
    case "New":
    csentry.ObjectModificationType = ObjectModificationType.Add;
    csentry.AttributeChanges.Add(AttributeChange.CreateAttributeAdd("EmployeeID", employeeID));
    break;
    case "Update":
    csentry.ObjectModificationType = ObjectModificationType.Update;
    csentry.DN = employeeID;
    break;
    case "Delete":
    csentry.ObjectModificationType = ObjectModificationType.Delete;
                         csentry.DN = employeeID;
    break;
    default:
    throw new
    UnexpectedDataException(string.Format("Unknown modification type: {0}", changeMode));
    appStatus = da.Tables["AppStatus"].Rows[i].ItemArray.GetValue(1).ToString().Trim();
    appStatusList.Add(appStatus);
    // save the last object
    if (csentry != null)
    csentry.AttributeChanges.Add(AttributeChange.CreateAttributeUpdate("IdentityStores", appStatusList));
    csentries.Add(csentry);
    importReturnInfo = new
    GetImportEntriesResults();
    importReturnInfo.MoreToImport = false;
    importReturnInfo.CSEntries = csentries;
    return importReturnInfo;
    The code compiles and executes, but the delta import fails with the "invalid-attribute-value" message per csentry.
    From the eventlog I have the following message
    The server encountered an unexpected error while performing an operation for a management agent.
    "System.InvalidCastException: Unable to cast object of type 'System.Collections.Generic.List`1[System.String]' to type 'System.String'.
       at Microsoft.MetadirectoryServices.Impl.Ecma2ConversionServices.AddAttributeToDImage(CDImage* pdimage, String attributeName, AttributeModificationType
    attributeModificationType, IList`1 attributeValueChanges, Int32 escapeReferenceDNValues)
       at Microsoft.MetadirectoryServices.Impl.Ecma2ConversionServices.ConvertToDImage(CSEntryChange csEntryChange, CDImage** ppDImage, Int32 escapeReferenceDNValues)
       at Microsoft.MetadirectoryServices.Impl.ScriptHost.InvokeExtMA_ImportEntry(UInt32 cBatchSize, UInt16* pcszCustomData, UInt32 cFullObject,
    _OCTET* rgoctFullObject, UInt32* rgomodt, UInt32* pcpcszChangedAttributes, UInt16*** prgpcszChangedAttributes, Int32 fIsDNStyleNone, UInt16** ppszUpdatedCustomData, _OCTET* rgoctCSImage, Int32* rgextec, UInt16** rgpszErrorName, UInt16** rgpszErrorDetail, Int32*
    pfMoreToImport)"
    To me it seems as if FIM is unable to process the List of strings that is returned when processing the delta. Remember that this works OK when doing the full import. 
    Do you have any suggestions as to why this fails?
    Kjetil

    Hi,
    Thank you Søren! I got some good clues for the right direction from your answer. If anyone would be looking same answers the correct solution would be down below. I hope it would be help for someone else too.
    Get-Shema.ps1
    $obj
    = New-Object
    -Type PSCustomObject
    $obj
    | Add-Member
    -Type NoteProperty
    -Name "Anchor-Id|String"
    -Value 1
    $obj
    | Add-Member
    -Type NoteProperty
    -Name "objectClass|String"
    -Value "user"
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "IsLicensed|Boolean"
    -Value $true
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "FirstName|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "LastName|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "mail|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "immutableId|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "DisplayName|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "UsageLocation|String"
    -Value ""
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "ProxyAddresses|String[]"
    -Value ("","")
    $Obj
    | Add-Member
    -Type NoteProperty
    -Name "Licenses|String[]"
    -Value ("","")
    $obj
    Import.ps1
    #Always pass objects as hash table in pipeline
    foreach ($User
    in $Users)
    $obj = @{}
    $obj.Add("Id",
    $User.UserPrincipalName)
    $obj.Add("objectClass",
    "user")
    $obj.Add("IsLicensed",
    $User.IsLicensed)
    $obj.Add("FirstName",
    $User.FirstName)
    $obj.Add("LastName",
    $User.LastName)
    $obj.Add("mail",
    $User.UserPrincipalName)
    $obj.Add("immutableId",
    $User.immutableId)
    $obj.Add("DisplayName",
    $User.DisplayName)
    $obj.Add("UsageLocation",
    $User.UsageLocation)
    $obj.Add("ProxyAddresses", ($User.ProxyAddresses
    -ne ""))
    $obj.add("Licenses", ($User.Licenses.AccountSkuId))
    $obj
    Marti

  • How to get the objects from a workflow item's container

    Dear all,<P/>
    We need to get the value of a variable in the container of a workflow item. I can get the workflow item list using function module <B>SAP_WAPI_CREATE_WORKLIST</B>. Then how can I get the corresponding container elements' value?<P/>
    I tried function mofule <B>SAP_WAPI_GET_OBJECTS</B>, but the returned table <B>OBJECTS</B> and <B>OBJECTS_2</B> are both empty.<P/>
    Thanks + Best Regards<P/>
    Jerome<P/>
    null

    Hi,
    Well, I think you will be getting the value as BORNAME:BORKEY. Get the KEYVALUE into your local variable. And use the <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4acef453d11d189430000e829fbbd/frameset.htm">BOR Macros</a> to get the instance and desired contents.
    Regards
    <i><b>Raja Sekhar</b></i>

  • How to get dom object from acrobat pdf

    I am following the the document "PDF Accessibility API Reference" and following the section "Reading PDF files thru DOM Interface". There he mentions about including
    AcrobatAccess.h, AcrobatAccess_i.c and IPDDom.h. Please let me know where I can find these files. Also, How can I get a dom object to start with. If you have a sample code to share, that would be great. I tried googling about these but was not very successful in getting this info.
    Any help towards this is appreciated.

    Hi Leonard,
    I think there is something called GetCaret function mentioned in DOM interface which basically returns IPDomNode underneath caret. Also, in Accessibility side, accHitTest() function is there.
    I think today when I explored our product, some body has written wrappers over accessibility apis to get some good information. Anyways thank you very much for all your replies.
    One last question before I leave home:-)
    I have accessibility object representing a active page (page which is visible). Now using accessibility apis, I can traverse the tree of accessbility objects that belong to/Underneath page. Now to get the same on a different invisible page, what should I do. Calling getParent at a page level accessibility object returns null? SOmething like I want an accessibility object whose children are "the all the pages of the document".

  • How get java Object from webservice

    Hai
    i gave ArrayList<bean> , i can't get this ArrayList<bean> from webservice. How can i get ? via for each or iterator or any ?????
    Note: i iterated  but only one element was come from bean property  using next() of iterator .
    I need all property. any one please help.
    thanks
    Mr...Javan

    Try to return an Array instead of an ArrayList?
    Have a look at http://forums.sun.com/thread.jspa?forumID=331&threadID=5289022.

  • How can I get an object from a vector, modify it and store it back ?

    Hello all,
    I have created the clase "node", this class has a "name" property and and "counter" property, and the associated method to set the name and make the couter increase value.
    In a different class I have a vector, and I add "node" objects to this vector.
    Once I've added a few objects "nodes" I need to get one, modify the value and the store it back in. Better if it is in the same position. ..
    Thanks, alot guys. I could not copy an paste the code because I have a whole bunch of things mixed in the same code. I'd not be understanble.
    Thanks again !!

    Never mind, thanks anyway ..

  • How to get String object from integer

    Hi,
    I am getting some problem with checking for equality. I had a primitive integer. How to convert it into String object?

    Please consult the javadocs:
    java.lang.Integer.toString(int i)
    will do it.
    "I am getting some problem with checking for equality" - elaborate.

Maybe you are looking for

  • How is easy is to setup Time Capsule as a wifi router

    How easy is it to setup Time Capsule as a wifi router?

  • Connecting Ibook to TV - Need Help

    Hello. First of all let me thank all the kind people here on the forum. My computer died a few months ago, and the screen has basically died. Im looking to use my laptop through my tv. I have read the support sections of this site and am a tad confus

  • IN operator:- multiple value :- need to pass values in bundles

    Hello Everybody I am facing a strange problem . I got a requirement in which i need to pass around 55,000 values in the IN operator of the select query. It looks like that select query has a limitation of 2000 values. I planned to split the values ba

  • Bridge keywords and organization.

    Hello, everyone. I am experiencing some issues with keywords in Bridge and thought I would post a question here in hope someone would be able to help. FIRST QUESTION: After creating a keyword catalog in Bridge with a certain hierarchical structure I

  • Creative Media Source rec2

    <FONT face="Comic Sans MS" color=#0033cc size=3>I've installed my Creative Media Source Program...Does this program allow you to Record tracks onto a blank CD, if so how?