Additional rules Workflow
Start Task
The start task is the only one that differs depending on the type of process. The other tasks may or may not be present, but they are exactly the same, maintaining the same properties.
Start Task: Additional Rules
Each process can have only one start task. By definition, the process is associated with a record type, so it can take all active records of that type. The 'filters' property allows you to narrow down these files by applying filters using ANSI SQL. The properties for this task are: name, description, and filter.
Note:
To accept all files, use a '.' in the filter, as shown in the image.
Conditional Task
The conditional task evaluates a condition and, based on the response, takes one path or another. The properties of this task are: Name, Description, Field, Condition, and Value.
Field: Lists the possible existing fields of the process {cp_<field_name>} and the index fields of the record {ci_<field_name>}.
Condition: Presents a list with the following options: '=', '<', '>', '<=', '>=', '!='.
Value: The value can be entered by the user, or a process field or index field of the record can be used. If a process field or index field is entered, the correct nomenclature must be followed.
One key aspect of this task is that each outgoing flow must specify the condition it corresponds to, as there will be two possible outcomes: one for true and another for false. To cover more conditions, the user can create multiple nested tasks.
Field Setting Task
This task allows for the creation or initialization of process fields.
In this task, the user can create process variables and assign them initial values. Alternatively, database or C# scripts can be executed to handle more complex tasks. The properties for this task include:
Field: You can type the desired field name, and the list will autocomplete with the existing process fields. If the field you want to use is found, you can select it; otherwise, a new field will be created.
Expression: You can assign a fixed value, the value of another process field, an existing index field, or a scripting operation to the selected field.
To do this, you must follow the established nomenclature by indicating the field within braces. If it is a process field, it will be {cp_<field_name>}, and for an index field, {ci_<field_name>}.
For mathematical operations, the possible operators can be any recognized by C# or ANSI SQL.
An example would be performing mathematical operations like ({ci_<field_name>} + 2) / 2 or taking the current date using "Now." You can also perform more complex operations, such as calculating the number of days that have passed since a given date.
Por ejemplo utilizando un campo índice:
You can also add an ANSI SQL expression, such as taking a string representing a period, converting it to the YYYYMM format, then taking the current date and converting it to the same format to compare them. It will return a 1 if the current period is greater than that of the record. Since it is SQL, the expression must start with BEGIN and end with END.
Database Field Update Task
This task allows you to update a field in the database.
The properties for this task are: name, description, field, and value.
- Field: Select the field to update from a list of index fields of the record and process fields.
- Value: The value can be entered by the user or can be a process field or an index field. If entering a process or index field, the proper nomenclature must be followed.
Export Record Task
This task allows you to export a record to a physical location or a database using the preloaded connections.
The properties for this task are: name, description, export type (CSV file, JSON file, and existing connections), export path, include details, attach to existing content, and others depending on the selected export type.
Wait Task
This task allows you to delay the process for a specified period of time.
The properties for this task are: name, description, and time.
Time: Amount of time to wait, in minutes. For example, if the wait time should be one day, enter 1440.
Database Search Task
Allows searching for values in an SQL Server, Oracle, or MySQL database and passing the result to process fields. It will only take the first row of results from the query, so it is most frequently used when aggregation functions are applied to it (COUNT, SUM, MAX, MIN, etc.).
The possible properties for this task are: name, description, connection, SQL Query, and field mapping.
Database Connection String: The OLDB representation of the connection. The connections used here are preloaded in the Netcontent database, specifically in the NC_Connections table.
SQL Query: An SQL query that will return results in multiple columns.
Field Mapping: Each field from the query will be loaded into the field defined here, in the order of appearance.
Email Task
Allows the sending of an email.
The possible properties for this task are: name, description, recipients, subject, and message.
Recipients: Specify one or more recipients, separated by ‘,’.
Subject: Provide a brief text.
Message: Enter a message.
Consume SOAP Service Task
Allows consuming information from a SOAP service.
The properties for this task are: name, description, data mapping, request (WSDL and method), request headers (field and value), request message, and script.
Some of them are described below:
Field Mapping: The result of the service execution will be loaded into a process field. You must define here the name of the process field and the variable used internally for the service execution.
WSDL: The endpoint of the service to be consumed.
Request Header: Service headers can be defined here.
Request Message: The XML parameters that will be sent.
Script: The result of the execution can be used as-is, or a parsing script can be defined. Here, you can add logic to process the result using C# or SQL scripting.
Consume REST Service Task
Allows consuming information from a REST service.
The properties for this task are: name, description, data mapping, request (URL and method: POST, PUT, GET, PATCH, DELETE, COPY, HEAD, OPTIONS, LINK, UNLINK, and PURGE), request headers (field and value), request message, and script.
Some of these are described below:
Field Mapping: The result of the service execution will be loaded into a process field. Here, you must define the name of the process field and the variable used internally for the service execution.
URL: The HTTP/HTTPS address of the service to be consumed.
Method: GET, POST, PUT, etc. If it is a GET request, the parameters can be directly defined in the URL. For POST or PUT requests, the Request Message can be used to define the JSON that will be sent.
Request Header: The service headers can be defined here.
Script: The result of the execution can be used as-is, or a parsing script can be defined. Here, you can add logic to process the result using C# or SQL scripting.
End Task
There can only be one end task in each process. It indicates the completion of the process.
The possible properties for this task are: name, description, and linked process.
Linked Process: The completion of one process can trigger the start of another. This will result in the creation of a Case of the Case Type of the selected process.
FTP Service Task
This task allows you to exchange data with another server.
The properties for this task are: name, description, path, and the option to delete the file after sending.
Digital Signature Task
This task allows you to perform a digital signature, either via external signature or internal.
The properties for this task are: name, description, type (external or internal), status, control email, files to sign, template ID, and status. Some properties may change depending on the type of signature selected.
Created with the Personal Edition of HelpNDoc: Create help files for the Qt Help Framework