Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


_GoBack
Anchor
_GoBack
Table of Contents

Anchor
_Toc410658603
_Toc410658603
Tutorials

 

Anchor
_Toc410658604
_Toc410658604
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>.

...


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:


Anchor
_Toc410658605
_Toc410658605
StateMachine_Tutorial

 

Anchor
_Toc396477965
_Toc396477965
Anchor
_Toc399323862
_Toc399323862
Anchor
_Toc410658606
_Toc410658606
Common Implementation Details


Process States

  • Anchor
    _Toc396477967
    _Toc396477967
    Anchor
    _Toc399323864
    _Toc399323864
    Initialization STATE


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

  • Anchor
    _Toc396477968
    _Toc396477968
    Anchor
    _Toc399323865
    _Toc399323865
    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.

  • Anchor
    _Toc396477969
    _Toc396477969
    Anchor
    _Toc399323866
    _Toc399323866
    Execution STATE


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

  • Anchor
    _Toc396477971
    _Toc396477971
    Anchor
    _Toc399323868
    _Toc399323868
    Final STATE


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

Anchor
_Toc399323873
_Toc399323873
Anchor
_Toc410658607
_Toc410658607
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.

Anchor
_Toc399323874
_Toc399323874
Anchor
_Toc410658608
_Toc410658608
Input Data Validation STATE


In this state the values provided for Value1 input argument is evaluated depending on the results, the task 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 task 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 task will go to the Final state.

Anchor
_Toc399323875
_Toc399323875
Anchor
_Toc410658609
_Toc410658609
Execution STATE


At this state the task 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 task will go to the Final state.

Anchor
_Toc399323877
_Toc399323877
Anchor
_Toc410658610
_Toc410658610
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:


Anchor
_Toc410658611
_Toc410658611
Flowchart_Tutorial

 

Anchor
_Toc410658612
_Toc410658612
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.

Anchor
_Toc410658613
_Toc410658613
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.


Anchor
_Toc410658614
_Toc410658614
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>.

...

  • 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.

...

  • 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:



Anchor
_Toc410658615
_Toc410658615
TriggerWebservice_Tutorial


This workflow triggers WorkflowDemo as a webservice. Fur further more information on how to publish a webservice, check Flowster User Guide - Publish tasks as web service .


WorkflowDemo will be published as a webservice prior to the execution of TriggerWebService_Tutorial.

...