cancel
Showing results for 
Search instead for 
Did you mean: 

Real life example for singleton node

bharath_k6
Active Participant
0 Kudos

Hi,

I am confused with singleton node concept where to apply. I am not looking for definition but looking for clear & elaborate answer to understand the real purpose. When do we check the singleton checkbox of a context node?

Kindly give me an understanding.

Regards,

Bharath.

Accepted Solutions (0)

Answers (3)

Answers (3)

mangesh_sonawane
Participant
0 Kudos

As earlier said u can use it in logging classes

I will give a simple example suppose when you saw a login screen only one time you login at that time only the object is instantiated after it is not asking you every time for authorization

only once it will be instantiated

amy_king
Active Contributor
0 Kudos

Here is some documentation with an example similar to Chengalarayulu's example. Essentially, a singleton is used when only one instance at a time of the node is needed. Imagine you have a 0..n Customer node which contains a 0..n singleton node Orders. Each time you change the lead selection on your Customer node, the Orders node must be repopulated to reflect the current Customer because there is only ever one instance of the Orders node.

Cheers,

Amy

chengalarayulu
Active Contributor
0 Kudos

Let see,

ND_PARENT (Employee)

     - Attribute-1(Emp.No)

     -Attribute-2

     -ND_CHILD (Address) - Singleton Enabled - SUPPLY FUNCTION

          -Attribute-3(Attribute-1 type of PARENT) (Emp.No)

          -Attribute-4

Now, based on Leadselection of ND_PARENT, data will be refreshed in ND_CHILD with respect to code written in SUPPLY_FUNCTION of CHILD.

Singleton says, at a time only one instance exists at run time. Means, Instance for ND_CHILD will be possible only one time at runtime..

This can be easily understandable if we take Railway / Bus reservation, if one user has selected one seat(single instance), then it should not for another user.

hope you understood.