Skip navigation
Contact Us
1942 Views 7 Replies Latest reply: Jan 28, 2013 11:28 PM by raab himself RSS
raab himself Newbie 4 posts since
Jan 27, 2013
Currently Being Moderated

Jan 27, 2013 10:23 PM

Please help with this scenario

Hi all, I have a scenario which I am really having difficulties with. Please do give me any advice where possible.

 

Scenario:

I have one workflow with 2 tracks split through a decision task. Essentially, what I want is each track will run depending on what a certain flat file content is. If the flat file contains a 'P' it will run track A and if it is 'F' it will run track B.

 

What I thought of was to use a Decision task and another Session task to do this. The Session will read the flat file containing the 'P' or 'F' and based on that, 'pass' or 'fail' the Session. Depending on this session's status, the decision task will then decide which track to run.

 

The problem here is I do not know how to 'pass' or 'fail' the session, or is that even possible.

  • Pratik Jain Novice 34 posts since
    Feb 26, 2012
    Currently Being Moderated
    Jan 28, 2013 12:09 AM (in response to raab himself)
    Please help with this scenario

    Hi rabbie,

     

    1. create one session which will read flat file and pass data only if contains  'P'. To store this value use a temporary target flat file. If file contains 'P' then targetsuccessrow will be <> 0 and if it contains 'F' then its value will be zero

     

    2. In workflow after this session creata two links for two flows which will have link conditions like 

         targetsuccessrow will be <> 0 for pass flow

         targetsuccessrow will be = 0 for fail flow


      • Nagarjuna Reddy Kumbum Novice 76 posts since
        Aug 23, 2011
        Currently Being Moderated
        Jan 28, 2013 2:20 AM (in response to raab himself)
        Please help with this scenario

        Hello Raabie,

        Please remove the existing decision task.Decision task is only requierd to validate multiple conditions based on multiple tasks.Based on the condition you can redirect the control flow.

         

        Here in your case decision task is not required as pratik suggested have two link tasks leading to two branches of the workflow and have the link task conditions as suggested by pratik.

        i.e

        Link task 01--- condition ----$s_CONTROL.SrcSuccessRows <> 0

        Link task 02--- condition ----$s_CONTROL.SrcSuccessRows = 0

         

        Link task 01 leads to the success branch and other one leads to the failure branch.

         

        **Note : Here the $s_CONTROL is the name of the session created to  read the flat file.

         

        hope this may help you....

         

        thanks and regards...

        -Nag.

          • Pratik Jain Novice 34 posts since
            Feb 26, 2012
            Currently Being Moderated
            Jan 28, 2013 8:21 PM (in response to raab himself)
            Please help with this scenario

            Hi Rabbie,

             

            • Use filter in place of expression txn. The filter condition will be CHECKWAR = 'P'. If file contains 'F' then it will not Pass any record in target.
            • On session link condition will be $s_CONTROL.TgtSuccessRows<>0 for pass flow and

                    $s_CONTROL.TgtSuccessRows=0 for fail flow.

             

            Thanks!!


             

          • sasi ramesh Master 1,110 posts since
            Oct 2, 2010
            Currently Being Moderated
            Jan 28, 2013 8:43 PM (in response to raab himself)
            Please help with this scenario


            Hi Rabbie,

             

            The flow should be similar to this

             

             

            start--> s1-----s1.status!=succeeded----->track1

                           ------s1.status = succeeded-----> track2

             

            Create a mapping name m1 and source the falt file.In the expression provide the below condition

             

             

            ABORT( IIF( CHECKWAR  = 'F','The source row has F value,hence failed',)

             

             

            Let me know if you face any issues.

             

             

            Regards

            Sasiramesh

More Like This

  • Retrieving data ...

Bookmarked By (0)