When creating BPM processes, it is possible to use VB language syntax. For instance, initial values can be assigned to parameters in such way or operations on numbers or texts inside processes can be performed.
Operators
Visual Basic supports the following types of operators:
Operation Name | VB.NET | C# | T-SQL |
---|---|---|---|
A less than B | A < B | A < B | A < B |
A less than or equal to B | A <= B | A <= B | A <= B |
A equal to B | A = B | A == B | A = B |
A greater than B | A > B | A > B | A > B |
A greater or equal to B | A >= B | A >= B | A >= B |
A different from B | A <> B | A != B | A <> B |
A or B | A OrElse B | A | | B | A OR B |
A and B | A AndAlso B | A & & B | A AND B |
Assigning decimal value 10,1 to A | A = 10.1D | A = 10.1m | A = 10.1 |
Assigning floating-point value 10,1 to A | A = 10.1R | A = 10.1 | A = 10.1 |
Negation of A | Not A | !A | - |
Combining strings | ”a” & b.ToString() | ”a” + b.ToString() | ‘a’ + b |
The first element of T table | T(0) | T [0] | - |
Creating an object of nullable integer type | New Nullable(Of Int32) | New Nullable | - |
Invoking a method with SalesInvoice generic type | ObjectFactory.Create(Of SalesInvoice)() | ObjectFactory. Create | - |
Converting an object object into type Type | DirectCast(object, Type) CType(object, Type) | (Type)Object | - |
Null value | Nothing | null | NULL |
A is not a null | A IsNot Nothing | A !=null | A IS NOT NULL |
A is a null | A is Nothing | A == M | |
A is of Type type | TypeOF A Is Type | A Is Type | - |
Creating a directory of String types key and Decimal values and initiating it with”KOS” key of value 2.0D | New Dictionary(Of String, Decimal)() From {{"KOS", 2.0D}} | new Dictionary | - |
Creating an object of DocumentEventParams type and initiating its property DocumentId with value 169 | New DocumentEventParams() With {.DocumentId = 169} | new DocumentEventParams() {DocumentId = 169} | - |
Assigning a text value: Text to variable A | A ="Text" | A ="Text" | SET @A = 'Text' |
Assigning a text value in inverted commas: “Text” to variable A | A ="""Text""" | A ="\"Text\"" | SET @A = '"Text"' |
Using a conditional operator to assign a text value to a variable of string type A on the basis of the value B (if B equals to Nothing, A will equal to String.Empty, otherwise, A will equal to B) | A = If(B Is Nothing, String.Empty, B) | A = B == null ? String.Empty : B | - |
Creating an anonymous method | IEnumerable | IEnumerable |
Note
It is necessary to remember about correct types when comparing. For example, expression “73” <“9” returns True, because the first character in the first expression is classified higher than in the other one. If first characters are equal, then the next character from both expressions is compared, etc.
Intellisense mechanism
Comarch ERP Standard BPM has its own Intellisense mechanism. Intellisense is a form of automatic completion. At the same time, it is designed for documenting and disambiguating names of variables, functions and methods. Using the mechanism is a convenient way to get access to descriprions of functions, and partially to the list of their parameters.