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 - BPEL foreach expression validation
Summary: BPEL foreach expression validation
Status: RESOLVED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Validation (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vladimir Yaroslavskiy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-09 02:41 UTC by kiran_bhumana
Modified: 2008-01-30 14:25 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.