EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB227343: How to Determine If a Project Is Locked Using MicroStrategy Web SDK 9.4.1


Community Admin

• Strategy


SUMMARY:
Lock Project prevents other Strategy users from modifying any objects in the locked project in Strategy Developer or Strategy Web. When this lock is turned on no one, including the Administrator, can perform changes to any objects. 
Using Strategy Developer, it is possible to lock a project by clicking on the Administration menu > Locking > Lock project.

ka04W000000OfniQAC_0EM440000002GMt.jpeg

ACTION:
The code shown below gets the state of the lock for a specific project. 

Custom test obsolete in ScanMD 9.000.001, included in the common tests
36276531451, 40605Check Invalid CurrentElementStatus in Reports and TemplatesApplicationThis function checks whether the page-by axis contains any unit with CurrentElementStatus as "Chosen". The fix will change the CurrentElementStatus from "Chosen" to "Desired".Current for 9.x368226 200860Check Invalid Schema Reference in XDA ReportsApplicationUnable to run reports; error of type "Object with ID 'XXX' and type 22 (Schema) is not found in metadata. It may have been deleted." occurs. This error appears while executing a FFSQL report. The test will find out all FFSQL reports (with full path) whose source tables contain invalid references to missing schema objects. This test provides no fix but necessary information and let customers be able to tell which FFSQL Reports are not working before the end users realize it.
 Current for 9.x373433 31538Check SourceOrder columns corresponding to MDX SchemasSchemaAfter Project Duplication or Object Manager move
of MDX source related objects, the Source Order attribute form always
returns -1, so that it is impossible to sort/arrange the results.
This test will scan the MD for MDX-source related SourceOrder column objects
and will restore invalid properties of these columns from other information
such that the Source Order attribute forms functionality is restored.
(No access to the MDX source is needed for this operation.)Current for 9.x374107 N/ACheck Invalid Reference to Missing Metric in ReportApplicationThis test checks whether the report contains invalid reference to missing metrics in the PropertyTarget folder at both report level and template level. The fix will remove the invalid references.Current for 9.x382996N/ACheck Empty Dimty in XDA MetricApplicationThis test is to search XDA metrics with empty dimensionality and then put them in report level dimensionality. Current for 9.x38819433587, 34592Check DBRoles in DSSTable and DSSDBTableSchemaThis test provides ability to clear a DSSTable's Primary and Secondary DBRoles making a table point to the projefct's default database instanceCurrent for 9.x40061734622, 34663, 40522Check Deep Expression in ConsolidationApplicationThis test checks all consolidation elements for expressions with more than 200 pairs of nested parentheses. The fix will simplify such expressions by removing those parentheses that are not required to maintain the same order of precedence of the operators in the expression.Current for 9.x413387N/ACheck invalid prompt references in filtersApplicationThis test provides ability to remove invalid Prompt references in: embedded Filters in Reports, standalone Filters and Custom Groups.Current for 9.x431850N/ACheck invalid names of the reports and filters and their embedded objectsApplicationThis test checks whether 4 kinds of invalid characters [ ] " \ exist in the object names of Reports and Filters, as well as their embedded Filters, Prompts, and Metrics. The fix will replace invalid characters [ ] " \ with _ _ ' / respectively.Current for 9.x456977N/A Check Non-Default Web Preference Property ValuesConfigurationThis test inspects link items used to store Strategy Web User Preferences and if any of them is using a non-default value the fix will modify them to use the default value. This test is useful when the following error is observed while logging in from Strategy Web: "String index out of range: 129".Current for 9.x477180N/ACheck invalid custom group references in filters and templatesApplicationThis fix provides the ability to remove invalid Custom Group references from concrete element nodes in Filters in Report, Document, Filter, Prompt and Metric. Added fix to remove invalid Custom Group reference from concrete and subtotal element nodes in Template.Current for 9.x500807N/AInvalid Name ConversionApplicationThis test scans all Reports and Filters and the embedded Filter, Prompt, Metric objects inside them to check invalid characters like [, ], ", \. And the fix will replace those character with (, ), ', / respectively.Current for 9.x733251N/AN/AApplicationThis test scans all Reports and Filters and the embedded Filter, Prompt, Metric objects inside them to check duplicated embedded IDs in different standalone objects and the fix will change the duplicated ID to a unique one.Current for 9.x792455N/ARemove Dormant Prompt Instances from ReportsApplicationThis test scans all Reports to remove any dormant prompt instances. This will prevent the prompt instances from re-occurring when re-prompting. Current for 9.x863773N/ACheck for Invalid Visible PropertyApplicationThis test scans the visible property of panel node and its default formatting in all documents and it will reset the incorrect value for default format and exisitng panel node. Current for 9.x
State ValueLocked?0Not Locked7Locked
 

Custom test obsolete in ScanMD 9.000.001, included in the common tests
36276531451, 40605Check Invalid CurrentElementStatus in Reports and TemplatesApplicationThis function checks whether the page-by axis contains any unit with CurrentElementStatus as "Chosen". The fix will change the CurrentElementStatus from "Chosen" to "Desired".Current for 9.x368226 200860Check Invalid Schema Reference in XDA ReportsApplicationUnable to run reports; error of type "Object with ID 'XXX' and type 22 (Schema) is not found in metadata. It may have been deleted." occurs. This error appears while executing a FFSQL report. The test will find out all FFSQL reports (with full path) whose source tables contain invalid references to missing schema objects. This test provides no fix but necessary information and let customers be able to tell which FFSQL Reports are not working before the end users realize it.
 Current for 9.x373433 31538Check SourceOrder columns corresponding to MDX SchemasSchemaAfter Project Duplication or Object Manager move
of MDX source related objects, the Source Order attribute form always
returns -1, so that it is impossible to sort/arrange the results.
This test will scan the MD for MDX-source related SourceOrder column objects
and will restore invalid properties of these columns from other information
such that the Source Order attribute forms functionality is restored.
(No access to the MDX source is needed for this operation.)Current for 9.x374107 N/ACheck Invalid Reference to Missing Metric in ReportApplicationThis test checks whether the report contains invalid reference to missing metrics in the PropertyTarget folder at both report level and template level. The fix will remove the invalid references.Current for 9.x382996N/ACheck Empty Dimty in XDA MetricApplicationThis test is to search XDA metrics with empty dimensionality and then put them in report level dimensionality. Current for 9.x38819433587, 34592Check DBRoles in DSSTable and DSSDBTableSchemaThis test provides ability to clear a DSSTable's Primary and Secondary DBRoles making a table point to the projefct's default database instanceCurrent for 9.x40061734622, 34663, 40522Check Deep Expression in ConsolidationApplicationThis test checks all consolidation elements for expressions with more than 200 pairs of nested parentheses. The fix will simplify such expressions by removing those parentheses that are not required to maintain the same order of precedence of the operators in the expression.Current for 9.x413387N/ACheck invalid prompt references in filtersApplicationThis test provides ability to remove invalid Prompt references in: embedded Filters in Reports, standalone Filters and Custom Groups.Current for 9.x431850N/ACheck invalid names of the reports and filters and their embedded objectsApplicationThis test checks whether 4 kinds of invalid characters [ ] " \ exist in the object names of Reports and Filters, as well as their embedded Filters, Prompts, and Metrics. The fix will replace invalid characters [ ] " \ with _ _ ' / respectively.Current for 9.x456977N/A Check Non-Default Web Preference Property ValuesConfigurationThis test inspects link items used to store Strategy Web User Preferences and if any of them is using a non-default value the fix will modify them to use the default value. This test is useful when the following error is observed while logging in from Strategy Web: "String index out of range: 129".Current for 9.x477180N/ACheck invalid custom group references in filters and templatesApplicationThis fix provides the ability to remove invalid Custom Group references from concrete element nodes in Filters in Report, Document, Filter, Prompt and Metric. Added fix to remove invalid Custom Group reference from concrete and subtotal element nodes in Template.Current for 9.x500807N/AInvalid Name ConversionApplicationThis test scans all Reports and Filters and the embedded Filter, Prompt, Metric objects inside them to check invalid characters like [, ], ", \. And the fix will replace those character with (, ), ', / respectively.Current for 9.x733251N/AN/AApplicationThis test scans all Reports and Filters and the embedded Filter, Prompt, Metric objects inside them to check duplicated embedded IDs in different standalone objects and the fix will change the duplicated ID to a unique one.Current for 9.x792455N/ARemove Dormant Prompt Instances from ReportsApplicationThis test scans all Reports to remove any dormant prompt instances. This will prevent the prompt instances from re-occurring when re-prompting. Current for 9.x863773N/ACheck for Invalid Visible PropertyApplicationThis test scans the visible property of panel node and its default formatting in all documents and it will reset the incorrect value for default format and exisitng panel node. Current for 9.x
State ValueLocked?0Not Locked7Locked
 


package com.sdk.samples.standalone; 
import com.Strategy.web.beans.WebBeanException; 
import com.Strategy.web.objects.WebIServerSession; 
import com.Strategy.web.objects.WebObjectsException; 
import com.Strategy.web.objects.WebObjectsFactory; 
import com.Strategy.web.objects.admin.ObjectLock;
import com.Strategy.web.objects.admin.ObjectLockSource; 
import com.Strategy.web.objects.admin.WebObjectsAdminException; 
import com.Strategy.web.preferences.PreferencesException; 
import com.Strategy.webapi.EnumDSSXMLApplicationType; 
import com.Strategy.webapi.EnumDSSXMLObjectLockFlags; 
import com.Strategy.webapi.EnumDSSXMLObjectTypes; 
public class ProjectLock { static WebObjectsFactory factory1=WebObjectsFactory.getInstance(); 
static WebIServerSession serverSession = factory1.getIServerSession(); 
public static void main(String[] args) throws WebBeanException, WebObjectsException, PreferencesException, WebObjectsAdminException { serverSession.setServerName("servername"); 
serverSession.setServerPort(0); serverSession.setProjectName("Strategy Tutorial"); serverSession.setLogin("Administrator"); 
serverSession.setPassword(""); serverSession.setApplicationType(EnumDSSXMLApplicationType.DssXmlApplicationCustomApp); 
String projectID = "B19DEDCC11D4E0EFC000EB9495D0F44F"; WebObjectsFactory factory = serverSession.getFactory(); 
ObjectLockSource objSourceLock = factory.getObjectLockSource(); 
ObjectLock objLock = objSourceLock.queryObjectLock(projectID, EnumDSSXMLObjectTypes.DssXmlTypeProject, (EnumDSSXMLObjectLockFlags.DssXmlObjectLockPermanent + ~EnumDSSXMLObjectLockFlags.DssXmlObjectLockConstituents)); 
System.out.println("State: " + objLock.getState()); 
serverSession.closeSession(); } }

The example provided in this document is provided “as-is” and user has read the following customization warning:
ADDITIONAL INFORMATION:
The Strategy SDK allows you to customize several Strategy products and extend and integrate the Strategy business intelligence functionality into other applications. However, before changing the way Strategy products look or behave, it is helpful to understand how the application is built. For more information regarding the Strategy products or the process of customizing Strategy products, please refer to Strategy Developer Zone (https://developer.Strategy.com).
To access the Strategy Developer Zone, you must have access to the Strategy Knowledge Base, you must have purchased the Strategy SDK, and you must be current on your Strategy maintenance agreement. If you are a US-based business and believe that you satisfy all three of these conditions but you do not have access to the Strategy Developer Zone, please contact Strategy Technical Support at support@Strategy.com or at (703) 848-8700. If you are an international business, please contact Strategy Technical Support at the appropriate email address or phone number found at https://www.Strategy.com/us/services/support/contact.
CUSTOMIZATION WARNING:
This customization is provided as a convenience to Strategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, Strategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, Strategy Technical Support makes no guarantee that an updated version of this particular customization will be provided. In the event of a code change in future builds, Strategy may not be able to provide additional code on this matter even though this customization is provided at this time for this specific build. For enhancements to this customization or to incorporate similar functionality into other versions, contact your Account Executive to inquire


Comment

0 comments

Details

Knowledge Article

Published:

April 6, 2017

Last Updated:

July 21, 2017