Workflow and ServiceDesk Community

 View Only
  • 1.  Source of data shown by WorkflowManagement.aspx

    Posted Nov 03, 2011 06:27 AM

    I am migrating our workflow installation (not ServiceDesk) between two servers. The hostname and AD domain name is being changed. 

    I'm running the following SQLs shown below to change this the servername and AD domain.  However, when I visit http://DESTSVR/<wfproj>/WorkflowManagement.aspx the domain name and server contained within are not updated.

    Where does WorkflowManagement.aspx get its data from? See below:

    ===================

     -- Change AD server in table “ActiveDirectoryServer”
    
    Update ActiveDirectoryServer
    Set    ADDomainName = REPLACE(ADDomainName, 'ORIGDOMAIN', 'DESTDOMAIN')
    where  [ADDomainName] like '%ORIGDOMAIN\%'
    
    -- Change ADLoginName and OrganizationUnit in “User” table
    
    Update [User]
    Set    [ADLoginName] = REPLACE(ADLoginName, 'ORIGDOMAIN\', 'DESTDOMAIN\')
    where  [ADLoginName] like '%ORIGDOMAIN\%'
    
    Update [User]
    Set    [OrganizationUnit] = REPLACE(OrganizationUnit, 'ORIGDOMAIN\', 'DESTDOMAIN\')
    where  [OrganizationUnit] like '%ORIGDOMAIN\%'
    
    -- Change GroupName in “Group” table
    
    Update [Group]
    Set    [GroupName] = REPLACE(GroupName, 'ORIGDOMAIN\', 'DESTDOMAIN\')
    Where  [GroupName] like '%ORIGDOMAIN\%'
    
    -- Change Name in “OrganizationUnitID” table
    
    Update [OrganizationUnit]
    Set    [Name] = REPLACE(Name, 'ORIGDOMAIN\', 'DESTDOMAIN\')
    Where  [Name] like '%ORIGDOMAIN\%'
    
    -- Update server name within database in "ReportProcess", “Task” and “DirectoryCategoryEntries”
    
    UPDATE ReportProcess
    SET    UrlOfProcess = replace(UrlOfProcess, 'ORIGSVR', 'DESTSVR')
    WHERE  UrlOfProcess LIKE '%ORIGSVR%';
    
    UPDATE ReportProcess
    SET    [ReferralURL] = replace([ReferralURL], 'ORIGSVR', 'DESTSVR')
    WHERE  [ReferralURL] LIKE '%ORIGSVR%';
    
    UPDATE ReportProcess
    SET    LogonUserIdentity = replace(LogonUserIdentity, 'ORIGSVR', 'DESTSVR')
    WHERE  LogonUserIdentity LIKE '%ORIGSVR%'
    
    UPDATE ReportProcessReference
    SET    [Url] = replace([Url], 'ORIGSVR', 'DESTSVR')
    WHERE  [Url] LIKE '%ORIGSVR%';
    
    UPDATE Task
    SET    UrlOfProcess = replace(UrlOfProcess, 'ORIGSVR', 'DESTSVR')
    WHERE  UrlOfProcess LIKE '%ORIGSVR%';
    
    UPDATE Task
    SET    UrlOfResponseService = replace(UrlOfResponseService, 'ORIGSVR', 'DESTSVR')
    WHERE  UrlOfResponseService LIKE '%ORIGSVR%';
    
    UPDATE TaskResponse
    SET    Url = replace(Url, 'ORIGSVR', 'DESTSVR')
    WHERE  Url LIKE '%ORIGSVR%';
    
    UPDATE  DirectoryCategoryEntries
    SET     URL = replace(URL, 'ORIGSVR', 'DESTSVR')
    where   URL LIKE '%ORIGSVR%'
    
    -- Rename "workflow references" --
    
    UPDATE  DirectoryCategoryEntries
    SET     [URL] = replace([URL], 'http://workflow', 'http://DESTSVR')
    WHERE   [URL] LIKE '%http://workflow%'
    
    UPDATE  MasterSettings
    SET     [BaseURLToEnsemble] = replace([BaseURLToEnsemble], 'http://workflow', 'http://DESTSVR')
    WHERE   [BaseURLToEnsemble] LIKE '%http://workflow%'
    
    UPDATE  MasterSettings
    SET     [GlobalServiceLocationURL] = replace([GlobalServiceLocationURL], 'http://workflow', 'http://DESTSVR')
    WHERE   [GlobalServiceLocationURL] LIKE '%http://workflow%'
    
    UPDATE  profile_common
    SET     [Docstore_url] = replace([Docstore_url], 'http://workflow', 'http://DESTSVR')
    WHERE   [Docstore_url] LIKE '%http://workflow%'
    
    UPDATE  profile_common
    SET     [Processmanager_url] = replace([Processmanager_url], 'http://workflow', 'http://DESTSVR')
    WHERE   [Processmanager_url] LIKE '%http://workflow%'
    
    UPDATE  profile_rfceng_sk
    SET     [workflow_url] = replace([workflow_url], 'http://workflow', 'http://DESTSVR')
    WHERE   [workflow_url] LIKE '%http://workflow%'
    
    UPDATE ReportProcess
    SET    UrlOfProcess = replace(UrlOfProcess, 'http://workflow', 'http://DESTSVR')
    WHERE  UrlOfProcess LIKE '%http://workflow%';
    
    UPDATE ReportProcess
    SET    [ReferralURL] = replace([ReferralURL], 'http://workflow', 'http://DESTSVR')
    WHERE  [ReferralURL] LIKE '%http://workflow%';
    
    UPDATE ReportProcessComment
    SET    [Comment] = replace([Comment], 'http://workflow', 'http://DESTSVR')
    WHERE  [Comment] LIKE '%http://workflow%';
    
    UPDATE Task
    SET    UrlOfProcess = replace(UrlOfProcess, 'http://workflow', 'http://DESTSVR')
    WHERE  UrlOfProcess LIKE '%http://workflow%';
    
    UPDATE Task
    SET    UrlOfResponseService = replace(UrlOfResponseService, 'http://workflow', 'http://DESTSVR')
    WHERE  UrlOfResponseService LIKE '%http://workflow%';
    
    UPDATE TaskResponse
    SET    Url = replace(Url, 'http://workflow', 'http://DESTSVR')
    WHERE  Url LIKE '%http://workflow%'; 
    


  • 2.  RE: Source of data shown by WorkflowManagement.aspx

    Posted Nov 03, 2011 08:29 AM

    Hi filcole

    I've checked the code of WorkflowManagement.aspx script.

    The section "Responses" for each task gets its values directly reading it from native task messages.

    In script the WorkflowServices class providing direct access to Exchange functionality is used. For each workflow task two messages are stored:  WorkQueueItem in "*.tasks" queues and  TaskAssignmentStructure in "*.assignments" queues.

    You can check it by viewing the content of files stored in any folder: c:\Program Files\Altiris\Workflow\Data\MQWorkflowFileStorage\localworkflowfilestorage-<ServiceID>.assignments where by default 'local.workflow-' exchange configuration points. If you are using database storage look into messages with QueueName ending with ".assignments". Messages have binary structure but it is possible to find inside them strings with URLs using even text editor.

    The TaskAssignmentStructure message contains structure TaskResponse from which URLs for WorkflowManagement.aspx script are retrived.

    Unfortunately messages are serialized objects and it's not possible to change their content without reading it, deserializing and serializing and storing it again.
    It is not so hard for someone who knows a bit SWS architecture and programming in .NET.