SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Dec 2010
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Access the components of a business process test

    Hi,

    I want to access the components belonging to a specific business process test via C# coding.

    What I have for now is the following piece of code for a specified test (objTest):

    if (objTest.Type.Equals("BUSINESS-PROCESS"))
    {
    // cast the test to a BusinessProcess-test
    BusinessProcess objBPTest = (BusinessProcess)objTest;
    // loop over each component attached to the business process test
    foreach (BPComponent bpComponent in objBPTest.BPComponents)
    {
    // some other code, but never reached as objBPTest.BPComponents returns an empty list
    }
    }

    The problem is that objBPTest.BPComponents always returns an empty list. Does anyone know what I am doing wrong?

    Thanks!

    Johan Peeters

  2. #2
    Junior Member
    Join Date
    Dec 2010
    Posts
    29
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Access the components of a business process test

    I just found the answer:

    apparently you need to load the business process test before you can use it, so including next line of code after the casting makes it work:

    objBPTest.Load();

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 12.50%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:22 AM.

Copyright BetaSoft Inc.