0

我的工作流是通过 SharePoint 2010 中的以下脚本部署的:

# Set CurrentDirectory
$callingDir = Split-Path -Parent $MyInvocation.MyCommand.Path
[Environment]::CurrentDirectory = $callingDir

# Includes
$MainScriptName = "XXX.SharePoint.Powershell.YYY.ps1"
$MainScriptPath = Join-Path -Path $callingDir -ChildPath $MainScriptName

if (Test-Path $MainScriptPath)
{
    # use file from local folder
    . $MainScriptPath
}
else
{
    # use central file (via PATH-Variable)
    . $MainScriptName
}

Setup

$WebAppUrl = "NONE"

$SolutionPackageName = "Dataport.Survey.Webpart.wsp"
InstallSolution $SolutionPackageName $WebAppUrl

TearDown

之后,工作流显示为“已部署”(提供了解决方案)。如果我想使用工作流程(例如在列表中),我不能这样做。在网站设置(在“工作流程”下)中,工作流程显示为非活动状态。但为什么?我可以做些什么来使用工作流?

先感谢您!

4

2 回答 2

1

All the script you posted is doing is installing (deploying) a solution InstallSolution $SolutionPackageName $WebAppUrl. Also this is not standard Powershell and you only posted half the script.

Maybe you will need to activate some features after deploying the workflow.

于 2012-09-04T10:56:30.563 回答
0

好的 - 现在问题已解决。我不小心在该功能上设置了“hidden=true”。如果我在该功能上设置“hidden = false”,则工作流程是可用的。

于 2012-09-05T11:48:34.093 回答