IT Monkey:   Join the Cireson Community today for your chance to win $50!

Issues setting an activity to ReRun inside a Cireson PowerShell Activity

Ryan_KennedyRyan_Kennedy Customer IT Monkey ✭
Hello,

I am having issues setting a previous activity back to ReRun within a Cireson PowerShell Activity.
The workflow I have looks something like this:

CiresonPSAct1
MA1
CiresonPSAct2
MA2

In the CiresonPSAct2 I am setting MA1 to rerun.
This does happen - MA1 goes to ReRun / In Progress and CiresonPSAct2 goes to Pending.
BUT MA2 also goes to In Progress.. So Once the ReRun on MA1 is Complete, CiresonPSAct2 never becomes In Progress..
I have tried to set MA2 to Pending within CiresonPSAct2 but it only goes to In Progress once the activity completes...

I have previously done this running a powershell script from a runbook and never had any issues but it just doesn't seem to work with the Cireson PowerShell Activities ...
Has anyone had an issue like this before?


I basically just get the class instance of the activity and run :
$MA1 | %{$_.Status= "ActivityStatusEnum.Rerun";$_} | Update-SCClassInstance

Have also tried getting the activity object and using
$MA1 | set-scsmobject -property Status -value "ActivityStatusEnum.Rerun"


Thanks for any help you can give,

Ryan

Answers

  • Justin_WorkmanJustin_Workman Cireson Support Adept IT Monkey ✭✭
    Hey Ryan,
    I'm glad to see someone using PS Activities.  I think they're a little unsung.  I'm experimenting with this in my lab now.  I'll get back with you on this shortly... :)
  • Ryan_KennedyRyan_Kennedy Customer IT Monkey ✭
    Did you end up testing this @Justin_Workman? Has anyone else had this issue?
  • Adam_DzyackyAdam_Dzyacky Customer Contributor Monkey ✭✭✭✭✭
    I can second this as I was recently experimenting with these. A rerun or an invocation/on-demand execution provides no actual re-run of the Cireson P$A. But rerunning runbooks (SCO or SMA) works as you cite works without issue.

  • Ryan_Kennedy1Ryan_Kennedy1 Customer IT Monkey ✭
    It also seems that if you have a Sequential Activity with a PowerShell Activity followed by a MA inside of it, if you skip the MA in the PowerShell Activity , once the PowerShell Activity completes, the MA changes state from Skipped to In Progress ..... I think this was working okay without the Sequential Activity but definitely not working with it... If I Skip the MA , put a sleep of 5 minutes in, then the PowerShell Activity completes, it still puts the MA In Progress ..
Sign In or Register to comment.