|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ForEachCollectionElementAction
Makes each element in a collection available for individual processing in a flow chart. The collection can be an array, List, Map, or Set.
The For Each Collection Element Action returns its result in the flow context variable "RESULT". The following table contains more information on accessing and using the result.
Flow Context Variable | Java Type | Description |
---|---|---|
RESULT | boolean | A boolean value indicating whether there is still more data to process. If this value is true, then the action's collection element contains more elements to iterate over; if this value is false, then the end of the collection has been reached.
By default, any flow you create from the for each collection element action Action will have the condition "RESULT.result", meaning that the flow will only be followed if there is still data to iterate over. If you create a flow with the else condition or the condition "NOT RESULT.result", then the action will only follow that flow when there is no more data in the collection. This is useful for continuing on in the workflow once you have processed the last element in the collection. It is not appropriate to use an unconditional flow with the for each collection element action. Uncoditional flows will cause unexpected behavior in the workflow (for example, the action may repeatedly loop over the same set of data without exiting). All other types of flows can be used with the for each collection element action. |
<Loop index setting> | java.lang.Object | The current item in the collection. The name of the variable depends on the value specified for the loop index on the action. |
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface flux.ForEachAction |
---|
ForEachAction.For_Each_Res, ForEachAction.ForEachResult |
Method Summary | |
---|---|
Flow |
addFlow(Action action)
The flow that is followed when collection data is still available to be processed. |
java.lang.Object |
getCollection()
Returns the array, List, Map, or Set that is to be iterated over. |
java.lang.String |
getMapKeyIndex()
Returns the name of the flow context variable that contains one of the map keys from the collection that is being iterated over. |
void |
setCollection(java.lang.Object collection)
Sets the array, List, Map, or Set that is to be iterated over. |
void |
setMapKeyIndex(java.lang.String mapKeyIndex)
Sets the name of the flow context variable that contains one of the map keys from the collection that is being iterated over. |
Methods inherited from interface flux.ForEachAction |
---|
getLoopIndex, setExpirationFlow, setLoopIndex |
Methods inherited from interface flux.runtimedatamap.RuntimeDataMap |
---|
getRuntimeDataMap, setRuntimeDataMap |
Method Detail |
---|
Flow addFlow(Action action)
addFlow
in interface Action
action
- The flow that is followed when collection data is still
available to be processed.
Action.setElseFlow(flux.Action)
,
Action.addFlow(Action, String)
,
EngineHelper.useLastResult(String)
java.lang.Object getCollection()
java.lang.String getMapKeyIndex()
void setCollection(java.lang.Object collection)
collection
- The array, List, Map, or Set that is to be iterated
over.
java.lang.IllegalArgumentException
- If the specified argument is not a
recognized collection.void setMapKeyIndex(java.lang.String mapKeyIndex)
mapKeyIndex
- The name of the flow context variable that contains one
of the map keys from the collection that is being
iterated over.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |