AssignVariable not allowed in RaiseFault policy (OnPrem)

Hi,

The documentation for RaiseFault declares that we can employ AssignVariable element under FaultResponse. However, when we tried to do the same;

<RaiseFault async="false" continueOnError="false" enabled="true" name="raise_some_fault">
    <DisplayName>Raise Some Fault</DisplayName>
    <Properties/>
    <FaultResponse>
        <AssignVariable>
          <Name>faultSubcode</Name>
          <Value>52</Value>
        </AssignVariable>
    </FaultResponse>
    <IgnoreUnresolvedVariables>true</IgnoreUnresolvedVariables>
</RaiseFault>

the validation failed with the below error.

Error Saving Revision 55
Error occurred while validation of bean raise_unknown_resource.xml. Reason: - Schema validation failed. Cause : unexpected element (uri:"", local:"AssignVariable"). Expected elements are <{}Add>,<{}Set>,<{}Copy>,<{}Remove>. Line number : 6. Column number : 25. File name : raise_unknown_resource.xml.

I am currently trying this on 4.19.01 private cloud version. After encountering this issue, I tried it on Apigee Cloud and the validation was successful. So I realized that support for the element was probably introduced recently and is not available even on the latest OnPrem version. Any idea by when this feature will be available in the Private Cloud release?

On a related note:

Shouldn't the documentation itself clearly mention which particular version a feature was introduced from? Eg: have a Since field along with the currently available Default, Presence & Type fields?

Solved Solved
0 3 175
1 ACCEPTED SOLUTION

I feel confident that it will be available in OPDK 19.06.

Your suggestion about updating the documents with a Since field is a good one. Would be helpful.

View solution in original post

3 REPLIES 3

I feel confident that it will be available in OPDK 19.06.

Your suggestion about updating the documents with a Since field is a good one. Would be helpful.

Thanks Dino.

  1. Could you please pass on the feedback about Since field to the concerned team within Apigee?
  2. I'm unable to find the BugHerd feedback button on the documentation page. Else I would have shared this feedback with the documentation team directly. Has that feature been retired? Any alternative way to do that now?
  3. Also, the xsd link mentioned in the policy document, does not have the AssignVariable element defined. So that needs to be corrected as well. And if the OPDK and cloud versions can have different schemas at a given point of time, shouldn't there ideally be different branches for each release or at least 1 branch for OPDK (latest) and 1 for Cloud (latest)?

I know I'm going all over the place with this one but I refrained from creating separate questions for each of these points since they are all related.

Seems to be related to the issue mentioned by me here.