New element in frends 5.2

This shape should only be used if the developer is proficient with programming and C#. Especially if the code in the C# Code shape gets duplicated into multiple different Processes or is starting to get complicated it is recommended to create a frends Task instead.

The C# Code shape functions in the same way as the Code shape except it is possible to write a multiple lines of code.

If 'Assign variable' is set all execution paths in the code need to end in a return or throw.

Example

Advanced usage

In some cases there is a need for some re-usable function in an Process that is small and simple enough to not be worth creating a one-off task for. In this case the C# Code shape can return a Func. This re-usable function can be called later in the Process multiple times with different parameters. To be able to call the function Assign variable needs to be set.

Example

This piece of code can now later be executed in the process by using #var.UpperCase("foo") giving the result "FOO".

Did this answer your question?