Default Snippets

By installing Flowster Studio, in Snippets tab there will be deployed the following:


Templates


This category contains workflow templates and is deployed at Flowster Studio installation.

AD_AddUserToGroup


This snippet adds a specified user to an Active Directory group. 
General knowledge:




Where:


The output of the activity will be reflected in the Connection (ADConn) variable and it will be used for the rest of the Active Directory activities as an input.



Where:


The activity outputs the user entry path and is stored in the variable UserEntryPath <String>.

Where:


The activity outputs the group entry path and is stored in the variable GroupEntryPath <String>.

Where:


AD_ListMembers


This snippet lists all users members of a group in Active Directory. 
General knowledge:



Where:


The output of the activity will be reflected in the Connection (ADConn) variable and it will be used for the rest of the Active Directory activities as an input.


Where:



The activity outputs the list of users and their selected attributes in Output parameter and stored in variable MembersCollection <Collection<Collection<String>>>. The number of results are returned by Output Rows Count parameter and stored in variable MembersCount<Int32>

Where:






Citrix_CreateVMfromTemplate_PowerOn


This snippet creates a virtual machine from a template. At the end of the snippet the new virtual machine is powered on. 
General knowledge:



Where:


The output of the activity will be reflected in the Connection (XenConn) variable and it will be used for the rest of the Citrix Xen Server activities as an input.


Where:

The activity outputs the UUID of the new virtual machine in variable NewVm_UUID<String>.

Where:




VMware_CreateVMfromTemplate_PowerOn


This snippet creates a virtual machine from a template. At the end of the snippet the new virtual machine is powered on. 
General knowledge:

Where:


The output of the activity will be reflected in the Connection (VMConn) variable and it will be used for the rest of the VMware Server activities as an input.

Where:


The activity outputs the id of the input template stored in variable Template_ID <String>.

Where:

The activity outputs the id of the new created virtual machine stored in variable NewVM_ID <String>.


Where:


Where:



HyperV_CreateVMfromTemplate_PowerOn


This snippet creates a virtual machine from a template. At the end of the snippet the new virtual machine is powered on. 
General knowledge:

Where:


The output of the activity will be reflected in the Connection (HyperV_Conn) variable and it will be used for the rest of the HyperV Server activities as an input.


Where:

The activity outputs the status of the activity.

Where:




Powershell_GetProcess


This snippet uses powershell scripts to output the result of the Get-Process powershell command. 
General knowledge:

Where:

The output of the activity is stored in ListProcesses<Collection<PSObjects>>


The Name property returned by the powershell command is evaluated with a Custom If activity: 

In order to extract the Name property from the output returned and convert it to string, an Assign activity is used to store the Name property of the Process in ListProcesses collection: 


In order to output the values returned by Get CPU info activity, repeat the flow using ForEach activity. 


Tutorials

CustomIf_Tutorial


This snippet executes a sequence of actions based on the result of the condition.

The CustomIf activity is used to evaluate the result of the expression „Value1<Value2". Value1 and Value2 are input variables of type <Int32>


If the condition is true, the workflow will continue executing Condition True branch. 

Write activity is used to display the condition result. 

If the condition is false, the workflow will continue executing Condition False branch.

Write activity is used to display the condition result. 



StateMachine_Tutorial


Process States


Local Variables are configured / assigned based on the Input Data.


The Input Values are evaluated; if validation is successful, the process advances to the Execution state, else it advances to the Finalize Process state.


In this state, the business logic of the process is implemented. In case of an successful execution, the workflow advances to the Final state.


Based on the execution of the workflow, the Output Out Arguments are assigned and a workflow Status Email can be sent.

Initialization STATE


The StateMachine Sequence begins with Initialization STATE. The flags used in this workflow to act as triggers are defined with default values as follows: 

The condition to exit Initialization STATE and transition to Input Data Validation STATE must be evaluated by Trigger T1

If the condition evaluated in trigger T1 is true, the workflow will exit Initialization STATE and transition to Input Data Validation STATE.

Input Data Validation STATE

In this state the values provided for Value1 input argument is evaluated depending on the results, the workflow will continue to the next state or it will exit. 

If the value provided is negative, the Validation flag will be False: local_ExitFlag_InputDataValidation = False 
Another If activity will evaluate the flag value and if the conditions for the exit triggers will be met, the workflow will proceed to the Final state: 

Exit criteria: 
local_State_Execution = True - will activate the Execution STATE trigger, that will move to the Execution state. 
local_State_Finalize = True – will activate the Final STATE trigger and the workflow will go to the Final state.


Execution STATE

At this state the workflow will increment the value of Value1 argument and compare the incremented value with the value 1. If the condition is met, the workflow will exit Execution STATE and transit to Final STATE. 

Exit criteria: 
local_State_Finalize = True – will activate the Final STATE trigger and the workflow will go to the Final state.

Final STATE

The final state of the workflow displays the status message on the Tracking Data panel. The message status is stored in variable local_FinalStatusText

In StateMachine sequences, a state of type final does not have an Exit criteria because it does not transition to any other state.


Flowchart_Tutorial


Flowchart activities

This activity represents the parent activity for all flowchart specific activities.

The condition is evaluated and based on result, the flow will enter True or False branch for execution.

The condition is evaluated based on cases. If the input value is equal with the value of the case, the flow will enter that branch for execution.

Flowchart Sequence

This workflow will read an input value and based on that value a case branch will be executed. The value given by variable Value1 is evaluated with the FlowSwitch activity.



ForEach_Tutorial

This snippet executes an iteration through the elements of a collection and outputs the elements of the collection using different display activities.


Input Parameters: 
InputString<String> 


Output Parameters:
Define variable Collection. By default, the variable Type is <String>.


Change Type of variable Collection to Collection<Object> . Select Browse for Types… option to open Browse for Types… window.

 


Search the type of the variable in Type Name field. When finished, click OK.

 



For each member in Collection collection, an iteration containing actions is executed.



Create Snippet

In the main window, click on Snippets tab to open Snippets panel. 


To create a new snippet click on  button from Snippets menu. A Save As window will open and the user must specify the name of the new snippet.


When finished, click Save. The snippet will appear in the snippets list under Snippets root folder and a tab with the snippet name will be added to the Workflow Designer panel, for editing.

The final step after editing the snippet is to save it. Click on Close button from the snippet's tab in Workflow Designer.




Open Snippet

Select a snippet from the snippets list and click on Open button from the Local Menu or right click to enable the Context Menu and select Open option.


The snippet will be opened for editing in Workflow Designer panel.


Save Snippet

Select a snippet from the snippets list and click on Save button from the Local Menu.


Rename Snippet

Select a snippet from the snippets list and click on Edit button from the Local Menu or right click to enable the Context Menu and select Rename option.

Rename File window opens. Type a new name for the snippet. Click Rename.

In Snippets list the display name of the snippet will be changed according to the new name.


Close Snippet

To close a snippet , click on Close button from the snippet's Designer tab.

The snippet will be closed. The snippet tab will be removed from the Workflow Designer panel.


Delete Snippet

Select a snippet from the snippets list and click on Delete button from the Local Menu or right click to enable the Context Menu and select Delete option.


A Warning window will open. Click Yes.