Topic
7 replies Latest Post - ‏2012-05-02T13:37:28Z by SystemAdmin
MaisnamVictor
MaisnamVictor
111 Posts
ACCEPTED ANSWER

Pinned topic A better option to use MIL

‏2012-04-26T18:54:13Z |
Hi Folks,
I am stuck in a situation where I need to MIL a linked BPD. I couldn't think of a better approach other than using MIL (ideally), however due to limitation of MILs with linked/sub-BPDs want some advice from you guys to implement the use case below.

Use Case:
1) 1st activity (Coach) in the process collects data from the end user.
  pseudo BO used in Process:
  - Variable x (of type Variable y)(List)
   i.e. Variable y has the following variables:
   - variable a
   - variable b
   - variable c
2) Based on variable "x"(e.g. Lets say variable "x" has 3 as list length:), MIL the linked BPD in parallel.
each MILed linked BPD will have data(filtered) to process as follows:
  2.1) 1st MILed BPD instance will process:
     - Variable x
      - Variable y
       - variable a
  2.2) 2nd MILed BPD instance will process:
     - Variable x
      - Variable y
       - variable b
  2.3) 3rd MILed BPD instance will process:
     - Variable x
      - Variable y
       - variable b
Needed to know how this can be achieved...
Regards
Victor
Updated on 2012-05-02T13:37:28Z at 2012-05-02T13:37:28Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    7615 Posts
    ACCEPTED ANSWER

    Re: A better option to use MIL

    ‏2012-04-26T20:10:03Z  in response to MaisnamVictor
    Your description is a little confusing.

    I get that X is a list of type Y -

    
    tw.local.myX = 
    
    new tw.object.listof.MyYType()
    


    But it would seem to me if that were true, the members of Y would be well defined. Is that the case? Or by a, b,c below do you really mean
    
    a=tw.local.myX[0]; b=tw.local.myX[1]; c=tw.local.myX[2]; …
    


    If this is what you mean, you can just use "step" to indicate which one to hand into the linked BPD….

    Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
    • MaisnamVictor
      MaisnamVictor
      111 Posts
      ACCEPTED ANSWER

      Re: A better option to use MIL

      ‏2012-04-27T04:02:00Z  in response to SystemAdmin
      I am attaching a screen shot from PD which depicts the relationship between the BOs..
      • SystemAdmin
        SystemAdmin
        7615 Posts
        ACCEPTED ANSWER

        Re: A better option to use MIL

        ‏2012-04-27T13:25:41Z  in response to MaisnamVictor
        This is still not all that clear. Y is a list, meaning it can have any number of items in it. So, in theory, there could be 5 Y's in your list. In the MIL, would the item you identify as getting "a" get just the a from the first node of the list, or a list of all the a's?

        Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
        • MaisnamVictor
          MaisnamVictor
          111 Posts
          ACCEPTED ANSWER

          Re: A better option to use MIL

          ‏2012-04-27T19:46:06Z  in response to SystemAdmin
          My apologies for giving an incorrect description earlier.

          To make things little more clearer, I am attaching a sample BPD.

          Explanation:
          There are 2 BPDs, i.e., Parent and MILed BPDs

          Process Start from "Parent BPD".
          Once "Submit Order" HA completes in Parent BPD, the next step is to MIL the "MILed BPD" based on:
          
          tw.local.x.listLength
          

          Now the problem is, I am trying to find a way as described:

            1st MILed BPD instance should process:
          
          tw.local.x[0].a = 
          "Test0"; tw.local.x[0].b = 
          "Test00"; tw.local.x[0].c = 
          "Test000";
          

            2nd MILed BPD instance should process:
          
          tw.local.x[1].a = 
          "Test1"; tw.local.x[1].b = 
          "Test11"; tw.local.x[1].c = 
          "Test111";
          


            3rd MILed BPD instance should process:
          
          tw.local.x[2].a = 
          "Test3"; tw.local.x[2].b = 
          "Test33"; tw.local.x[2].c = 
          "Test333";
          


            nth MILed BPD instance should process:
          
          tw.local.x[n].a = 
          "Testn"; tw.local.x[n].b = 
          "Testnn"; tw.local.x[n].c = 
          "Testnnn";
          
          • MaisnamVictor
            MaisnamVictor
            111 Posts
            ACCEPTED ANSWER

            Re: A better option to use MIL

            ‏2012-04-27T19:51:34Z  in response to MaisnamVictor
            Attaching the file now.. Build in 7.5.1

            Sorry, didn't attach the files in my earlier post... This happens when you tend to do things super fast while multitasking...:-(
            • MaisnamVictor
              MaisnamVictor
              111 Posts
              ACCEPTED ANSWER

              Re: A better option to use MIL

              ‏2012-05-02T06:04:04Z  in response to MaisnamVictor
              Can anyone suggest me with the right approach of the solution?
              • SystemAdmin
                SystemAdmin
                7615 Posts
                ACCEPTED ANSWER

                Re: A better option to use MIL

                ‏2012-05-02T13:37:28Z  in response to MaisnamVictor
                Yes. If you are using a linked BPD, then there is a "counter" variable available in tw.system.step (I can't remember off the top of my head). You can use this for the array number and simply make the mapping tw.local.subBpdA=tw.local.xhttp://tw.system.step.counter.a

                Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com