cancel
Showing results for 
Search instead for 
Did you mean: 

ccBPM - Index field in the expression editor

Terry_KPMG
Explorer
0 Kudos

I've got a BPM process that needs to multicast a message for instance of a particular node in the source message.

I have a multiline line container object that stores "job_numbers". That multiline object is iterated through a ForEach block. Inside the ForEach block, I have an integer counter called "loop_index" that increments each pass through the loop. ...pretty simple so far.

I want to use the loop_index value to select a particular item from another multiline container called 'job_state". ....so I want to use loop_index as a subscript - i.e. job_state[ loop_index ]. That should be pretty simple, but the expression editor has me baffled.

In the expression editor I can select a multi-line container element. The field right next to the container element name is labeled 'index". I can't use the index field for anything! It won't take a constant number, string or xsd:integer container element.

What is the function of the "index" field in the expression editor?

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos
What is the function of the "index" field in the expression editor?

Check this link:

http://help.sap.com/saphelp_nw70/helpdata/EN/ab/13bf7191e73a4fb3560e767a2525fd/content.htm

From the above link:
 2.  If the variable is defined as a list, in the Index field, specify which item in the list you want to access. 
You can enter the item as a whole number (for example, 2 for the second item in the list), or select the expression that returns 
the required item. 
A variable is a list when the Multiline indicator is set in the container when the relevant variable is defined.

Regards,

Abhishek.

Terry_KPMG
Explorer
0 Kudos

Thanks for the reply Abhishek

That's exactly how I thought it should work - and its pretty intuitive.

I'm developing an integration process using PI 7.1. The variable I am trying to operate on is a multi-line container and is in-scope. The variable that I'm trying to use as the index is an xsd:integer. So I should be able to use the index field. It sounds like I'm doing the right thing.

Unfortunately, I pull the select-list down for the index field - there are no choices available to me. I can't type in a name either. In every scenario/combination I've tried PI won't let me specify an index field.

I wonder if this a defect unique to our version/patch level.

former_member200962
Active Contributor
0 Kudos

In condition editor for PI7.1 (the BPM switch which i assume you are talking of)....you have to create a condition variable and then assign it with some node (XPATH)....once given the value then you can use this condition variable in the condition editor.....condition variable can be of simpletype and have only string, integer, date, time.....check if it is here that you are facing some problem....

Regards,

Abhishek.

Answers (0)