New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-ItemWorkflowEvent Exceptions for Missing Parameters That Aren't Required #545

Closed
DavidMtbg opened this Issue Dec 21, 2015 · 3 comments

Comments

Projects
None yet
3 participants
@DavidMtbg

DavidMtbg commented Dec 21, 2015

Hi,

I was excited to see the inclusion of this cmdlet in SPE, but I am not able to get it to work as documented (unless I am missing something). Here are example uses and how they are failing:

PS master:\>Get-ItemWorkflowEvent -Id {110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}


writeErrorStream      : True
Exception             : System.ArgumentNullException: Value cannot be null.
                        Parameter name: name
                           at Sitecore.Diagnostics.Assert.ArgumentNotNull(Object argument, String argumentName)
                           at Sitecore.Configuration.Factory.GetDatabase(String name)
                           at Cognifide.PowerShell.Commandlets.BaseCommand.FindItemFromParameters(Item item, String path, String id, Language language, String databaseName)
                           at Cognifide.PowerShell.Commandlets.BaseItemCommand.ProcessRecord()
                           at System.Management.Automation.CommandProcessor.ProcessRecord()
TargetObject          :
CategoryInfo          : NotSpecified: (:) [Get-ItemWorkflowEvent], ArgumentNullException
FullyQualifiedErrorId : System.ArgumentNullException,Cognifide.PowerShell.Commandlets.Workflows.GetItemWorkflowEventCommand
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails      :



PS master:\>Get-ItemWorkflowEvent -Path master:\sitecore\content\home


writeErrorStream      : True
Exception             : System.ArgumentNullException: Value cannot be null.
                        Parameter name: name
                           at Sitecore.Diagnostics.Assert.ArgumentNotNull(Object argument, String argumentName)
                           at Sitecore.Configuration.Factory.GetDatabase(String name)
                           at Cognifide.PowerShell.Commandlets.BaseCommand.FindItemFromParameters(Item item, String path, String id, Language language, String databaseName)
                           at Cognifide.PowerShell.Commandlets.BaseItemCommand.ProcessRecord()
                           at System.Management.Automation.CommandProcessor.ProcessRecord()
TargetObject          :
CategoryInfo          : NotSpecified: (:) [Get-ItemWorkflowEvent], ArgumentNullException
FullyQualifiedErrorId : System.ArgumentNullException,Cognifide.PowerShell.Commandlets.Workflows.GetItemWorkflowEventCommand
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails      :



PS master:\>Get-ItemWorkflowEvent -Path master:\sitecore\content\home -Database master


writeErrorStream      : True
Exception             : System.Management.Automation.ParameterBindingException: Parameter set cannot be resolved using the specified named parameters.
                           at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
                           at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts,
                        CommandRedirection[][] commandRedirections, FunctionContext funcContext)
                           at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
                           at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
TargetObject          :
CategoryInfo          : InvalidArgument: (:) [Get-ItemWorkflowEvent], ParameterBindingException
FullyQualifiedErrorId : AmbiguousParameterSet,Cognifide.PowerShell.Commandlets.Workflows.GetItemWorkflowEventCommand
ErrorDetails          :
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at <ScriptBlock>, <No file>: line 1
PipelineIterationInfo : {}
PSMessageDetails      :

Thanks,
David

@DavidMtbg DavidMtbg changed the title from Get-ItemWorkflowEvent Not Returning Output, Exceptions for Missing Parameters That Aren't Required to Get-ItemWorkflowEvent Exceptions for Missing Parameters That Aren't Required Dec 21, 2015

@michaellwest

This comment has been minimized.

Member

michaellwest commented Dec 21, 2015

Hey @DavidMtbg, thank you for reporting the issue. Looks like I may have recently introduced a bug.

Try this:

Get-ItemWorkflowEvent -Id {110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9} -Database master
@DavidMtbg

This comment has been minimized.

DavidMtbg commented Dec 22, 2015

Hi @michaellwest, I did end up doing just that - thanks for your reply!

@AdamNaj

This comment has been minimized.

Member

AdamNaj commented Dec 28, 2015

Presumed fixed

@AdamNaj AdamNaj closed this Dec 28, 2015

@michaellwest michaellwest removed their assignment May 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment