Sunday, September 16, 2012

BIML Precedence Constraints “Parallel”


If the Constraint Mode of an element is set to Parallel all elements need to be connected using the PrecedenceConstraints Tag:
<Biml xmlns="http://schemas.varigence.com/biml.xsd">
    <Annotations>
        <Annotation>
            File: PrecedenceConstraints.Parallel.biml
            Demo biml file on PrecedenceConstraints
            Type: Parellel
            Enviroment:
            DB: MS-SQL2012
            BIML: 1.6 VS2010 BIDS Helper
            (c) John Minkjan biml101.blogspot.com
        </Annotation>
    </Annotations>
    <Packages>
        <Package
            Name="PrecedenceConstraints.Parallel"
            ConstraintMode="Parallel">
            <!--
                If the Constraint Mode of an element is set to
                Parallel all elements need to be connected using
                the PrecedenceConstraints Tag -->
            <Tasks>               
                <Container Name ="SEQ 1" ConstraintMode="Linear"></Container>
                <Container Name ="SEQ 2" ConstraintMode="Linear"></Container>
                <Container Name ="SEQ 3" ConstraintMode="Linear"></Container>
                <Container Name ="SEQ 4" ConstraintMode="Linear"></Container>
                <Container Name ="SEQ 5" ConstraintMode="Linear"></Container>
                <Container Name ="SEQ 6" ConstraintMode="Linear"></Container>
                <Container Name ="SEQ Last" ConstraintMode="Linear">
                    <PrecedenceConstraints  LogicalType="And">
                        <Inputs>
                            <Input
                                EvaluationOperation="Constraint"
                                OutputPathName="SEQ 1.Output"
                                EvaluationValue="Success">                               
                            </Input>
                            <Input
                                EvaluationOperation="Constraint"
                                OutputPathName="SEQ 2.Output"
                                EvaluationValue="Failure">                               
                            </Input>
                            <Input
                                EvaluationOperation="Constraint"
                                OutputPathName="SEQ 3.Output"
                                EvaluationValue="Completion">                               
                            </Input>
                            <Input
                                EvaluationOperation="Expression"
                                OutputPathName="SEQ 4.Output"
                                Expression= "@[System::MachineName]==&quot;Laptop&quot;"
                                >
                            </Input>
                            <Input
                                EvaluationOperation="ExpressionAndConstraint"
                                OutputPathName="SEQ 5.Output"
                                EvaluationValue="Failure"
                                Expression= "@[System::MachineName]==&quot;Laptop&quot;"                               
                                >
                            </Input>
                            <Input
                                EvaluationOperation="ExpressionOrConstraint"
                                OutputPathName="SEQ 6.Output"
                                EvaluationValue="Success"
                                Expression ="@[System::MachineName]==&quot;Laptop&quot;"
                                >
                            </Input>
                        </Inputs>
                       
                    </PrecedenceConstraints>
                </Container>
            </Tasks>
        </Package>
    </Packages>
</Biml>
Will Get you:
image
Till Next Time

No comments:

Post a Comment