Appian Nested CDTs and Java Plugin Objects Not Mapping Properly

Certified Associate Developer

Hi, I am having issues with the sync between Appian data types and corresponding Java plugin objects.

In Appian, I have two CDTs called ‘AttachmentList’ and ‘AttachmentDescriptor’. They were generated from ‘AttachmentList.xsd’ and ‘AttachmentDescriptor.xsd’, respectively. 



As seen in the screenshots above, ‘AttachmentList’ contains one field called ‘Attachments’, where ‘Attachments’ is an array of ‘AttachmentDescriptor’ data types. These two CDTs share the same namespace.

I have a custom Java plugin node that takes an AttachmentList data type as input. In the process model that uses this Java plugin node, I set up AttachmentList as shown below.



Here is the code in the Java plugin source file for setting up AttachmentList as input:

@Input(required = Required.OPTIONAL)

   @Type(name = "AttachmentList", namespace = "urn:placeholder")

   @Name("attachmentList")

   public void setAttachmentList(AttachmentList attachmentList) {

       this.attachmentList = attachmentList;

   }

The issue is that attachmentList.getAttachments() (from AttachmentList.java) is returning an empty ArrayList<AttachmentDescriptor> object because the protected List<AttachmentDescriptor> attachments variable is null. The call to getAttachments() should be returning the list of 2 AttachmentDescriptor objects that I had set up as input in the process model.

AttachmentDescriptor.xsd:

AttachmentList.xsd:

AttachmentDescriptor.java:

AttachmentList.java:

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data