Table of Contents

Search

  1. Preface
  2. Part 1: Using Process Developer
  3. Part 2: Creating and Modifying Processes
  4. Part 3: Functions, Events, Errors, and Correlation
  5. Part 4: Testing and Deployment
  6. Part 5: Process Central and Process Server (On-Premises)

Process Developer

Process Developer

Copy Operation with Ignore Missing From Data Attribute

Copy Operation with Ignore Missing From Data Attribute

Select a FROM Type and then complete the Copy operation by making other appropriate selections. Add, edit, copy, delete, and reorganize Copy operations and scripts for the selected Assign activity.
Use
Ignore Missing From Data
to avoid a selection failure when copying data that can not exist in the source variable. If enabled for a copy operation, then any from-spec that selects zero elements, attributes, or text items causes the copy operation to have no effect. The to-spec for the copy operation is not evaluated and nothing changes in the target variable. If this attribute is not enabled, then the regular bpel:selectionFailure fault is raised if the from-spec selects zero items.
Consider the sample below where a customer record could contain special instructions for package delivery. If these instructions exist in the record then they should be copied over to the data sent to the shipping service. If they do not exist, then the default instruction of "NONE" remains in place.
Case 1: Optional Data is Present
Sample data before the copy operation
:
<CustomerRecord> <Id>100256</Id> <ShippingAddress>... </ShippingAddress> <DeliveryInstructions> Please leave at the back door </DeliveryInstructions> </CustomerRecord> <ShippingRecord> ... <SpecialHandling>NONE</SpecialHandling> </ShippingRecord>
Copy Operation:
<copy ignoreMissingFromData="yes"> <from>$customerRecord/DeliveryInstructions/text()</from> <to>$shippingRecord/SpecialHandling</to> </copy>
Result after copy operation:
<ShippingRecord> ... <SpecialHandling>Please leave at the back door </SpecialHandling> </ShippingRecord>
Case 2: Optional Data is Missing
Sample data before the copy operation:
<CustomerRecord> <Id>100256</Id> <ShippingAddress...>... </ShippingAddress> </CustomerRecord> <ShippingRecord> ... <SpecialHandling>NONE</SpecialHandling> </ShippingRecord>
Copy Operation:
<copy ignoreMissingFromData="yes"> <from>$customerRecord/DeliveryInstructions/text()</from> <to>$shippingRecord/SpecialHandling</to> </copy>
Result after copy operation:
<ShippingRecord> ... <SpecialHandling>NONE </SpecialHandling> </ShippingRecord>
For further details on selection failure settings, see:
Using the Process Developer Disable Selection Failure Fault Extension
.

0 COMMENTS

We’d like to hear from you!