Tutorials
CustomIf_Tutorial
This workflow executes a sequence of actions based on the result of the condition.
- Custom If activity
- Custom If - Condition
The CustomIf activity is used to evaluate the result of the expression „Value1<Value2". Value1 and Value2 are input variables of type <Int32>.
- Custom If – True Sequence
If the condition is true, the workflow will continue executing Condition True branch.
Write activity is used to display the condition result.
- Custom If – False Sequence
If the condition is false, the workflow will continue executing Condition False branch.
Write activity is used to display the condition result.
- Execution result:
StateMachine_Tutorial
Common Implementation Details
Process States
- Initialization STATE
Local Variables are configured / assigned based on the Input Data.
- Input Data Validation STATE
The Input Values are evaluated; if validation is successful, the process advances to the Execution state, else it advances to the Finalize Process state.
- Execution 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.
- 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:
- Assign activity is used to log and display a status message stored in variable local_FinalStatusText.
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.
- Execution result:
Flowchart_Tutorial
Common Implementation Details
Flowchart activities
- Flowchart
This activity represents the parent activity for all flowchart specific activities.
- FlowDecision
The condition is evaluated and based on result, the flow will enter True or False branch for execution.
- FlowSwitch
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.
- The workflow will continue its execution following branch .
- StringLength activity is used to output the length of variable InputString.
- FlowDecision is used next to evaluate the length of InputString.
ForEach_Tutorial
This workflow executes an iteration through the elements of a collection and outputs the elements of the collection using different display activities.
- ForEach TUTORIAL sequence
- CollectionOfObjectsFromString – This activity is used to build a collection with elements of type <Object>.
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.
- WriteLine – This activity writes the result at the end of Tracking Data. The results are displayed on separate rows.The first element of the collection is displayed with WriteLine activity. The element is converted to String before it is displayed.
- ForEach<Object> - This activity iterates through the elements of the collection using an iterator.
For each member in Collection collection, an iteration containing actions is executed.
- Assign activity is used to increment the value of ForEachStep variable to display at the end of the workflow, the number of iterations.
- Write activity is used to display the members of the collection Collection. The results are displayed at the end of the execution on the same row.
- Message Box activity opens a message box during the execution of the workflow. In order to proceed forward with the execution of the workflow, click OK.
- Execution result:
TriggerWebservice_Tutorial
This workflow triggers WorkflowDemo as a webservice. Fur further more information on how to publish a webservice, check Flowster User Guide - Publish workflows as web service .
WorkflowDemo will be published as a webservice prior to the execution of TriggerWebService_Tutorial.
- TriggerWebservice activity
Input Parameters:
WorkflowName: represents the name of the published workflow as a webservice
WorkflowURL: represents the URL from Flowster Studio – Administrator , Webservices page
Argument1, Argument2, Variable1 : represent arguments for the published webservice
Output Parameters:
OutputTrigger: represents the OutputString returned by trigger webservice activity. This output will be processed and results will be extracted using XML activities and ForEach iterator.
Execution Result: