Getting all the children of a node can be done using the two “code” and “design” methods, which are given below with related explanations.

bpmAppService.BPMSServices.DomainObjectService.GetAllTreeNodeFromChildObject (input1, input2, input3, input4, input5);
input1: Child object
input2: Foreign Key to the root with the type String
input3: Parent Foreign Key
input4: Foreign Key to itself with type List
input5: Foreign Key to itself
Output: List Node