/// <summary> /// Called when a user clicks the Save button in the Workflow Designer. /// Returns an instance of the Activity class that /// has its properties set to the values entered into the text box controls /// used in the UI of the activity. /// </summary> public override Activity GenerateActivityOnWorkflow(SequentialWorkflow workflow) { PowerShellActivity powerShellActivity = new PowerShellActivity(); powerShellActivity.Script = this.GetText("txtScript"); powerShellActivity.PowerShellModule = this.GetText("txtPowerShellModule"); powerShellActivity.PowerShellVariables = this.GetText("txtPowerShellVariables"); powerShellActivity.WorkflowDataNameForOutput = this.GetText("txtWorkflowDataNameForOutput"); return powerShellActivity; }
/// <summary> /// Called by FIM when the UI for the activity must be reloaded. /// It passes us an instance of our workflow activity so that we can /// extract the values of the properties to display in the UI. /// </summary> public override void LoadActivitySettings(Activity activity) { PowerShellActivity powerShellActivity = activity as PowerShellActivity; if (null != powerShellActivity) { this.SetText("txtPowerShellVariables", powerShellActivity.PowerShellVariables); this.SetText("txtPowerShellModule", powerShellActivity.PowerShellModule); this.SetText("txtScript", powerShellActivity.Script); } }
/// <summary> /// Called when a user clicks the Save button in the Workflow Designer. /// Returns an instance of the Activity class that /// has its properties set to the values entered into the text box controls /// used in the UI of the activity. /// </summary> public override Activity GenerateActivityOnWorkflow(SequentialWorkflow workflow) { PowerShellActivity powerShellActivity = new PowerShellActivity(); powerShellActivity.Script = this.GetText("txtScript"); powerShellActivity.PowerShellModule = this.GetText("txtPowerShellModule"); powerShellActivity.PowerShellVariables = this.GetText("txtPowerShellVariables"); powerShellActivity.WorkflowDataNameForOutput = this.GetText("txtWorkflowDataNameForOutput"); return(powerShellActivity); }