LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Turning on and off checkpoints in a BRX

    Employee
    Posted 05-02-2012 20:38

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: PThai

    Hi

    Is it possible to tell a BRX being called by the parent graph to use or not use the checkpoints within the child graph being called?

    I've tried to use a runtime parameter in the child graph to control the use of checkpoints but what do I pass as the input to the BRX from the parent graph?


    Pamela


  • 2.  RE: Turning on and off checkpoints in a BRX

    Employee
    Posted 05-03-2012 06:59

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: timonk

    Pamela,

    Runtime parameters passed to an Execute BRX node (I'm assuming your using this for running a sub-graph) are passed in the input record, one field for each parameter.

    If you define a boolean graph parameter in your sub-graph, say "switch", and set its value to "other", then when you pass your input line to Execute BRX you can specify "true" or "false" as the input value for 'switch'. That should pass the value you want. So at least one field in your input record to Execute BRX needs to be named 'switch' (in this example), with a value of "true" or "false". I think 1/0 also works.

    From what you've said I assume you've done this, but just to state for thoroughness: In each of your Checkpoint nodes, on the Parameters 2 tab, you then set the "Enabled" parameter value to also be 'other', with a value of (in my example) "{{^switch^}}".

    In this way, your input to Execute BRX will set the 'switch' graph parameter, which should then be passed to the node parameter settings in the Checkpoints.

    -Timon
    Lavastorm Analytics Support.


  • 3.  RE: Turning on and off checkpoints in a BRX

    Employee
    Posted 05-07-2012 12:32

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    Timon is quite right on the above information. The only thing I would add would be, since you are looking to switch the behavior of the Checkpoint nodes, you would want to name the parameter UseCheckpoints, which is the name of the parameter on the node that switches between the checkpoint and non-checkpoint. So if you wire up the graph the way he describes, using the Execute BRX node, just include the field "UseCheckpoints" to change the behavior.

    Cheers
    Rich


  • 4.  RE: Turning on and off checkpoints in a BRX

    Employee
    Posted 12-12-2012 20:40

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: PThai

    Hi Rich

    I'm revisiting this switching of checkpoint and non-checkpoint again. I think I need an example how the parameters are setup. I've tried setting it up as described by Timon and yourself but I can't seems to get the checkpoints to to output correctly.

    I'm getting the following error in the BRX for the checkpoint node:

    ERROR opening i/o streams:
    file not found (2): 'D:/Pam/MAR Redesign Testing/Monthly Reports/As at end of Nov 2012/Checkpoints/RatePlans_Speech 3.brd'

    It looks like its trying to load the BRD file rather than saving the brd file.

    Thanks
    Pam


  • 5.  RE: Turning on and off checkpoints in a BRX

    Employee
    Posted 12-16-2012 18:03

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: PThai

    Here's an example of what I did. Please let me know what I'm doing wrong.

    Thanks.
    Pam
    Attachments:
    Test Parent Graph.brg
    Test Sub-Graph.brg


  • 6.  RE: Turning on and off checkpoints in a BRX

    Employee
    Posted 12-18-2012 14:51

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    Pam, my apologies, but the advice we gave you above will not work, unfortunately. After looking through your example, I realized our mistake; the Checkpoint node uses Enabled/Disabled functionality. This means those nodes are disabled or enabled by BRE and either are or are not saved to the brx, when you do a "Save to BRX". That means the UseCheckpoint functionality can only work as a switch you change within BRE, BEFORE you save as BRX.

    This probably doesn't help you much, so I have created a node called "New Checkpoint" and put it in your Test Sub-Graph library, and made your example work with that. This makes use of run time switching using setSuccessReturnCode functionality. You shouldn't have to worry about how it works; ideally it should just work like the old one. Please let me know if you have any issues.

    One down side is this does require slightly more processing inside the New Checkpoint node. The filter inside ALWAYS needs to run, regardless of if you are using the Checkpoint or not, and if you aren't using it, but updating it, then the Input BRD has to run AFTER the output BRD, so instead of doing a straight pass through, it will have to wait till the other two nodes run.

    Cheers
    Rich
    Attachments:
    Test Parent Graph.brg
    Test Sub-Graph.brg


  • 7.  RE: Turning on and off checkpoints in a BRX

    Employee
    Posted 12-19-2012 19:36

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: PThai

    Thanks Rich. The new Checkpoint node works great.

    Further to getting the checkpoint to work. Now I need to get the general switching of disabling and enabling a node to work with the use of the setSuccessReturnCode function or the Path Enabler node in a BRX. I need to switch between different inputs with a Bypass node, but if I use setSuccessReturnCode to switch the topmost input of the Bypass off, the Bypass node doesn't execute.

    I've attached a new sub-graph to show you what I'm referring to.
    Attachments:
    Test Sub-Graph2.brg
    Test Parent Graph.brg


  • 8.  RE: Turning on and off checkpoints in a BRX

    Employee
    Posted 12-20-2012 08:00

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    Here you go, I think this should work...I changed it from Daily and Monthly settings to just a Monthly setting, and the daily runs when not monthly. That's because the Rejoin Paths will only work if only one path is being used....if both paths get executed, it will act indeterminately.

    Cheers
    Rich
    Attachments:
    Test Sub-Graph2.brg


  • 9.  RE: Turning on and off checkpoints in a BRX

    Employee
    Posted 12-20-2012 14:36

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: rboccuzzi

    Sorry Pam, I was testing this some more, and apparently it doesn't work due to a slight difference in behavior in our internal and external controller, unfortunately (this has been noted for future fixing).

    I have attached here a new version of the graph with a few solutions, which I think should work for you, given what I understand of your problem constraints.

    Take a look at the two different multi-input "chooser" nodes. Each of them takes a variable number of inputs, at least one, but can be many. The Input Selector node has an integer parameter, and will output the input selected. The Input Enabler has a number of (documented) parameters that enable each of the various inputs. You can have multiple enabled in this one. I had to add the DailyRun back, as this particular implementation needs to have a true/false value and not an expression.

    The current implementation require each of the inputs to be the same, one could be built that could take the intersection or union. [internal detail for the curiuos: The way the Python Filter works, it doesn't have the input information available on the records coming into handleRecord if the inputs are not the same]

    An additional IMPORTANT note, the New Checkpoint node implemented here will not work correctly if you have streaming enabled on the external controller. This will be fixable in upcoming releases (4.5.5 and 4.6) due to PR 3228, the ability to dis-allow streaming of certain nodes.

    I hope this is fulfills your needs.

    Cheers
    Rich
    Attachments:
    Test Sub-Graph2.brg