none
how to use decide shape in orchestration RRS feed

  • Question

  • hi all,

    please guide me to how to use decide shape in orchestration , me requirement is when i got output with records then only i need to process to output folder, otherwise i need to send as a exception.

    Thanks

    Chinna

    Friday, February 7, 2014 6:51 AM

Answers

  • Hi Chinna,

    To check the existence of records and only process if records exist. You can use the following condition in the Decide shape, which checks for the count of records to be greater than zero. If this statement return true than process the outbound message as show in the below Orchestration image.

    System.Convert.ToInt32(xpath(InputMsg, "count(XpathToRecord)")) != 0

    Usage of XPath in decide shape


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.


    • Proposed as answer by Rohit Shahi Friday, February 7, 2014 9:21 AM
    • Edited by M.R.Ashwin Prabhu Friday, February 7, 2014 9:39 AM typo
    • Marked as answer by GKReddy88 Tuesday, February 11, 2014 4:37 AM
    Friday, February 7, 2014 8:46 AM

All replies

  • Hi Chinna,

    If you are trying to use Decide shape then go through this link of msdn :

    Using the Decide Shape

    it is a kind of If and Else condition, just write your boolean expression in the rule branch.

    But your requirement is not clear, so please specify some more details so that we can suggest something.

    Regards

    Friday, February 7, 2014 7:12 AM
  • Hello China,

    You can have a variable V1 and assign the output value to the varible V1.

    Now you can have a decide shape were you can compare Variable V1 != NULL. and in else part you can have a throw shape were you can define System. Exception .

    Thanks

    anto


    Friday, February 7, 2014 7:42 AM
  • Hi Chinna,

    To check the existence of records and only process if records exist. You can use the following condition in the Decide shape, which checks for the count of records to be greater than zero. If this statement return true than process the outbound message as show in the below Orchestration image.

    System.Convert.ToInt32(xpath(InputMsg, "count(XpathToRecord)")) != 0

    Usage of XPath in decide shape


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.


    • Proposed as answer by Rohit Shahi Friday, February 7, 2014 9:21 AM
    • Edited by M.R.Ashwin Prabhu Friday, February 7, 2014 9:39 AM typo
    • Marked as answer by GKReddy88 Tuesday, February 11, 2014 4:37 AM
    Friday, February 7, 2014 8:46 AM
  • Hello Chinna,

    The best option is to check the Record count of the OutPut.  If its Greater than 0 then you can  proceed, Otherwise terminate or whatever. 

    Steps to do : 

    1) Generate the Output File 

    2) Get the Record Count 

    use the Record Count as the deciding factor in the Decide Shape

    Thanks 

    Roopesh


    Thanks & Regards,
    Roopesh Varma

    ________________________________________________________________

    Please remember to click “Mark as Answer” or "Vote As Helpful" on the post that helps you. This can be beneficial to other community members reading the thread.

    Friday, February 7, 2014 1:26 PM
  • Hi ASHWIN PRABHU,

    Thanks for your Answer, and also i have another requirement , i.e i have Header Schema in this schema i have one field, for this field is i am get the "FINAL" Value then only i need to process other wise we need to Throw exception, this Value is Come from Receive Location.

    ThankQ

    -----------

    Chinna

    Tuesday, February 11, 2014 7:38 AM
  • Hi Chinna,

    Can you post your new question (which is not related to this post) in a new forum-question. This would help other who search for similar question/problems.


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

    Tuesday, February 11, 2014 9:26 AM