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

KB442301: How to perform "reload project" seamlessly using MicroStrategy System Manager


Ruiyu Han

Senior Support Engineer • MicroStrategy


This article describes how to use MicroStrategy System Manager to perform project reloading seamlessly.

Although “Schedule Administration Tasks” could be used to schedule a task to unload project and load it again with some time delay to achieve the aim to reload project. Or some users might use Command Manager in similar way. However the time required to completely unload a project is not predictable. It may cause some unexpected issues when trying to load a project which has not been completely unloaded yet. Users might want to do a seamless reload. 
 
To fulfill this requirement, Strategy System Manager could be used to create a basic workflow like below. Users could complete the workflow per their own requirements.

ka044000000kPy7AAE_0EM44000000RJZ9.png

 
 
This workflow contains the basic steps as below:
Step 1: Unload project
Use Command manager command:


UNLOAD PROJECT "XXXXX";

Step 2: Wait for an interval, e.g. 30 seconds
The next task would be implemented after 30 seconds.
Step 3: List project properties
Use Command manager command:

LIST PROPERTIES FOR PROJECT "XXXXX";

      Export the result to a xml file. eg. ListProjectPropertiesResult.xml
Step 4: Get unload result
This task will call a windows batch program and VBS script to get the project status from the xml file which is exported in step 3.
Here is a sample of windows batch script and VBS script to get value from xml file:

GetProjectStatus.bat:

@echo off
cd C:\ProjectReloadProcess
cscript //nologo GetProjectStatus.vbs ListProjectPropertiesResult.xml
exit /b %errorlevel%
 
notice: ListProjectPropertiesResult.xml is the output result of step 3

GetProjectStatus.vbs:

Set args = WScript.Arguments
Your_file = args.Item(0) 'thought that workDir would come in here
 
Dim xDoc 
Set xDoc = CreateObject("Microsoft.XMLDOM")
xDoc.validateOnParse = False
If xDoc.Load(Your_file) Then
   DisplayNode xDoc.childNodes, 0
Else
   ' The document failed to load.
End If
 
WScript.Quit 1
 
Public Sub DisplayNode(ByRef Nodes, ByVal Indent)
   Dim xNode 
   For Each xNode In Nodes
      If xNode.hasChildNodes Then
         DisplayNode xNode.childNodes, Indent
      else
        if xNode.parentNode.nodeName = "ProjStatus" and xNode.nodeValue = "Unloaded" then
            wscript.echo xNode.parentNode.nodeName & ":" & xNode.nodeValue
            wscript.quit 0
        end if
       
      End If
   Next
End Sub

Step 5: Check whether the project status is "Unloaded" or not.
A decision will decide the next step depending on the project status.

  1. Go to step 2 if the project status is not “Unloaded”
  2. Go to step 6 if the project status is “Unloaded”

Step 6: Load project
Using Command manager command:


LOAD PROJECT "XXXXX";

WARNING:
The scripts (bat, VBS) provided above is only for reference, Strategy doesn’t provide any warrant that it can execute properly, and we also don’t provide any troubleshoot for it.
KB442301


Comment

0 comments

Details

Knowledge Article

Published:

November 22, 2018

Last Updated:

November 26, 2018