X++ Job to list all the elements which are not included in version control
static void listNonVersionControlled(Args _args)
{
SysVersionControllable controllable;
SysModelElement sme_root, sme;
SysModelElementData smeData;
SysModelLayer layer;
setPrefix('Not version controlled elements');
while select sme_root
order by elementType
exists join sme
exists join smeData
exists join layer
where sme.RootModelElement == sme_root.RecId
&& sme.RecId == smeData.ModelElement
&& smeData.layer == layer.RecId
&& smeData.ModelId == xInfo::getCurrentModelId()
&& layer.Layer == currentAOLayer()
{
controllable = SysTreeNode::newTreeNodePath(SysTreeNode::modelElement2Path(sme_root));
if (VersionControl.parmSysVersionControlSystem().allowCreate(controllable))
{
info(SysTreeNode::modelElement2Path(sme_root));
}
}
}
static void listNonVersionControlled(Args _args)
{
SysVersionControllable controllable;
SysModelElement sme_root, sme;
SysModelElementData smeData;
SysModelLayer layer;
setPrefix('Not version controlled elements');
while select sme_root
order by elementType
exists join sme
exists join smeData
exists join layer
where sme.RootModelElement == sme_root.RecId
&& sme.RecId == smeData.ModelElement
&& smeData.layer == layer.RecId
&& smeData.ModelId == xInfo::getCurrentModelId()
&& layer.Layer == currentAOLayer()
{
controllable = SysTreeNode::newTreeNodePath(SysTreeNode::modelElement2Path(sme_root));
if (VersionControl.parmSysVersionControlSystem().allowCreate(controllable))
{
info(SysTreeNode::modelElement2Path(sme_root));
}
}
}
No comments:
Post a Comment