<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to get the isDynamic value from Ivy Role ?</title><link>https://answers.axonivy.com/questions/2947/how-to-get-the-isdynamic-value-from-ivy-role</link><description>&lt;p&gt;Hi everyone,
As i know that every role that are created by using Ivy Designer, its “isDynamic” property will be set to “False” as default.
And we you the ivy script like this for example :
&lt;strong&gt;ivy.wf.getSecurityContext().getTopLevelRole().createChildRole(“MyRole”, “DisplayNameOfMyRole”, “Description of MyRole”, true);&lt;/strong&gt;
We can set the “isDynamic” = true if we want .&lt;/p&gt;
&lt;p&gt;Is there any API in Ivy that support us to get the “isDynamic” value ? just like in &lt;a href="https://developer.axonivy.com/doc/latest/PublicAPI/index.html?ch/ivyteam/ivy/security/IRole.html"&gt;IRole API&lt;/a&gt;, you can use getDisplayName() to get the “DisplayNameTemplate” or getName() to get the “Name” of role&lt;/p&gt;
&lt;p&gt;Thanks.
&lt;img alt="alt text" src="https://answers.axonivy.com/upfiles/role.png"&gt;&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/2947/how-to-get-the-isdynamic-value-from-ivy-role" rel="self"></atom:link><language>en</language><lastBuildDate>Sun, 12 Nov 2017 21:04:29 -0500</lastBuildDate><item><title>Comment by Khoi Phan on Reguel Wermelinger's answer</title><link>https://answers.axonivy.com/questions/2947/how-to-get-the-isdynamic-value-from-ivy-role#2971</link><description>&lt;p&gt;thanks for your suggestion&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Khoi Phan</dc:creator><pubDate>Sun, 12 Nov 2017 21:04:29 -0500</pubDate><guid>https://answers.axonivy.com/questions/2947/how-to-get-the-isdynamic-value-from-ivy-role#2971</guid></item><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/2947/how-to-get-the-isdynamic-value-from-ivy-role/2950</link><description>&lt;p&gt;You can access it by using internal API. But it could change at any release without notice...&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public class RoleUtil {

    public static Boolean isDynamic(IRole role)
    {
        if (role instanceof ch.ivyteam.ivy.security.internal.Role)
        {
            ch.ivyteam.ivy.security.internal.Role internalRole = (ch.ivyteam.ivy.security.internal.Role)role;
            internalRole.getData().getIsDynamic();
        }
        return null;
    }

}
&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Fri, 03 Nov 2017 04:12:18 -0400</pubDate><guid>https://answers.axonivy.com/questions/2947/how-to-get-the-isdynamic-value-from-ivy-role/2950</guid></item></channel></rss>