on 03-31-2014 2:25 PM
Hello,
we are new to BPM and therefore we have the following question:
How should we setup a processcontect when we would like to have a table within the processcontect?
I defined a complex type within the XSD file and set the multiplicity to 1..*. So i can define more fields within the complex type and for me my processcontext looks like a table.
In one of the next steps i tried to compare one field of the table with index 1 with another value and access the field with the expression string-equals(get(ProcessContext/ComplexType/Field), 1), value) and then the process get`s the following error.
Extraction failed java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
com.sap.mapping.lib.execution.api.exception.TExecutionException at
GenericGet( StandardInvocation:invoker )
at ( DeepExpression ) at left(TerminalPart:expression ) at ( BroadMapping )
at TextSame( StandardInvocation:invoker )
at ( DeepExpression ) For more details,
decrease severity of log controller as described in SAP Note 1753560.
But in the NetWeaver Administrator "Processadministration" i can see that i have two entries in the ProcessContext/ComplexType. Why is the size 0 instead i can see two entries in the NetWeaver administrator?
Best regards,
Timo Renz
Hi Timo,
with the xPath expression ProcessContext/ComplexType/Field you're referencing the field, not the Complex Type. The get function the tries to get the first entry of the field not the Complex Type.
Try to do this:
get(ProcessContext/ComplexType, 1)/Field
This should retrive the ComplexType with index 1 and access the Element Field in the Complex Type.
Best regards,
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Frank,
thanks for you answer.
I tried the expression (get(ProcessContext/ComplexType, 1)/Field) you mentioned but then the message appears: "Single value is expected while you provided an element that is a list. Tip: Use expression to get a single from the values in the list."
Excluded the "Generic" folder there are no expressions available to handle tables or?
Thanks and best regards,
Timo
Hi Timo,
Instead of using the function "string-equals()", try using the function "matches()" to compare string values.
Just a suggestion.
Frank is right, it will compare with the first value first so, if it is not the same, the function string-equals() will give you a boolean output.
try doing this and let me know if it works.
/Sid
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.