This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 124930

Summary: BPEL foreach expression validation
Product: soa Reporter: kiran_bhumana <kiran_bhumana>
Component: BPEL ValidationAssignee: Vladimir Yaroslavskiy <yaroslavskiy>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description kiran_bhumana 2008-01-09 02:41:22 UTC
As per BPEL, a forEach counter is active only within the scope of the forEach. Even the expressions that define the
completionCondition should not use the counter variable. Same goes with startCounter and finalCounter expressions,
meaning they can't use the counter variable.

BPEL editor should validate such wrong usages, like it identifies variables that are used outside the scope of the variable.

see the counter variable svcIdx, it can't be used in the completion condition. Editor didn't validate it. 

        <forEach name="ForEach1" parallel="no" counterName="svcIdx">
            <startCounterValue>1</startCounterValue>
            <finalCounterValue>2</finalCounterValue>
            <completionCondition>
                <branches>$svcIdx = count($finalCtrLTstartCtrOperationIn.part1)</branches>
            </completionCondition>
            <scope name="Scope1">
                <sequence name="Sequence1">
                    <empty name="Empty1"/>
                </sequence>
            </scope>
        </forEach>
Comment 1 Vladimir Yaroslavskiy 2008-01-30 14:25:14 UTC
fixed.