To create your project, run appRules Portal (you must be set as a Developer in the user settings) and drag-and-drop activities from the toolbox on to the designer.
There are several sample projects in the Samples database that show examples of completed projects.
The properties associated with activity assemblies are displayed in the property grid as shown in the example below for the SendEmail activity:
The SendEmail activity features some of the property editors available in appRules including the highlighted SourcedValue editor, the Collection editor and several dialog editors designed to simply the configuration of the activity properties. In this chapter we will discuss the most commonly used property editors in appRules.
appRules uses drop down property editors to show lists of options from which the user can select one.
NB: The lists are editable so you can type a value to filter the list items and find the proper value
appRules single value editors are used for entry of single field value.
When no values have been entered for this value property, the field contains the Default SourceValue (String in the following example)
Simple Click on the value field
appRules single value editors are used for entry of multiple field values (collection).
When no values have been entered for this collection property, the field contains the value (***)
Simple Click on the value field
the collection editor window is displayed as shown below:
To add new, remove, copy values in the collection, click on the selected button in the top bar
You can change the Item sequences by selecting it in the left pane and drag it to the required position in the list.
appRules utilizes dialog editors throughout the system for entry of property data. An example is the Data File Definition window which is used for configuring the DataFileDefinition property of the InitializeTargetFile activity for delimited files.
SourcedValues are the most commonly objects in appRules and as such, SourcedValue property editors are the most commonly used property editors in appRules.
To configure a SourcedValue property, first you select the type of data value and then you click on the selector button to enter or select the value.
Sourced Values in Property Grid
Below are examples of Sourced Value controls on the property grid at design time:
Click on the Value field to be redirected to a selection window and display a list of values (example: DynamicValue above or DatafieldValue)
When you select Sources like DateTime, InternalFunction, you are automatically redirected to a selection window as below:
The example below shows Sourced Values in use for mapping. In this case the values are coming from DataFieldValue, InternalFunction, CustomFunction, Concatenation and even HTML:
The table in the following pages shows the different source and value options for SourcedValues (this list is not exhaustive depending on the appRules version used).
Depending on the activity property context, the Source list displayed may not contain all the listed Sourced Value.
Source | Value |
Argument | Select One of the Argument defined in the current project
|
AutoIterationKey | Get/Set value using the auto-iteration key of an activity which is using auto-iteration - (EvaluateDecisionTable etc.) |
Boolean | Select a boolean value - False or True |
CachedKeyValue | Returns a key value generated in an SavedRecords Activity (Insert) and marked to be saved in the Cache |
Concatenation | Use Concatenation to concatenate values. Project values can be included by clicking the Insert button.
|
ConditionFunction | Returns the result of a condition function - (boolean).
|
Counter | Returns a counter field value (The Counters are defined in the Project Details) |
BaseCondition | Returns the result of executing preset conditions like lastactivityresult, valuecontainsdata etc.
|
ConditionScript | Returns the value true or false of a condition script. The conditionscript that you select should be previously defined in the project’s scripts (see Project Details)
|
String | Returns a string value. Enter the string value or select from available options (preset null or empty value). |
Boolean Integer, Int16, Int32, Int64 Decimal, Numeric | Returns a boolean value. Select True or False from the list Returns an integer value. Returns an integer or a decimal value. |
Guid | Returns a guid value. Type a guid or select New Guid from the list to get a unique value |
TimeSpan | Returns a time span (type format : days:hours;minutes:seconds)
|
CustomFunction | Gets a value by executing a CustomFunction. The customfunction that you select should be previously defined in the project’s functions (see Project Details)
|
DataFieldValue | Gets the value of a data field in any record of a Source or Target defined in the project (InitializeSource, LookupRecord, InitializeTarget or InitializeSourceFromQuery activity)
|
WorkflowDataManagerName | Select a source or target name from the current project
|
Date | Gets a date or a date related value. You can enter a date and also add/subtract timespans as shown below:
|
DateTime | Gets a date/time or a date/time related value. You can enter a date and also add/subtract timespans as shown below:
|
RuntimeSettingField | Value defined for the currently active RuntimeServer (the one associated to the current user in the UserSettings). RuntimeServer fields allow you to define values that are specific to each deployment environment. This is especially useful when the value (for example, file location, connection strings etc.) changes from one deployment environment (development, test, production, etc.) to another. Below an example of RuntimeField (FilePath):
|
DynamicValue | Gets a dynamic value, a dynamic value is a local variable that you can use in the project to save values used in different activities. They behave as workflow variables. You can use the existing DynamicValue1 to DynamicsValue10 or create dynamically a new name when setting the variable.
|
FileContents | Reads the entire contents of the file as the value to use.
|
FilePath | Gets a file path
|
FileRecordSubString | Gets a sub string from a text file record |
FolderPath | Gets a folder path
|
HTML | Gets an HTML value
|
HTMLWithMergeFields | Gets HTML value with project fields merged in (datafield, argument, variable values etc) |
Integer | Gets an integer value |
InternalFunction | Gets value by executing a predefined internal function : |
ListValue | Displays a custom list associated with a property: |
LongString | Gets the value of a long string |
Numeric | Gets a Numeric value |
Password | Gets a password value (encrypted):
|
PickListEntry PickListEntryDescription | The picklist are associated to sources like Dynamics CRM (OptionSets) or Salesforce Some picklist associates a value with a description (like in DynamicsCRM), some other have only a value with is also a description (like in Salesforce)
|
PrimaryKey | Gets the primary key value of the selected entity of a data source |
RecordCount | Gets the record count of a Source (set up with the InitializeSource or Lookup activity) in the project |
SourceDataFieldValue | Returns a value from a selected Source (set by InitializeSource or LookupRecord in the current project) |
StringWithMergedFields | Gets an long string value with merged fields from the project
|
String | Gets a string value |
RecordCount | Gets the count of records in a Source |
TargetDataFieldValue | Returns a value from a selected Target (set by InitializeTarget in the current project) |
Variables | Gets a variable value:
|
TimeSpan | Gets a timespan value |
WorkflowActivityName | Gets the display name of a selected activity in the current project |
WorkflowActivityResultValue | Gets the result of a selected activity in the current project (Valid or Invalid) |
WorkflowName | Gets the name of a project in the current project database
|
System | Gets a system value for the currently running project.
|
values :
ActiveCulture Gets the active culture used in the current RunTimeSettings (en-US, de-DE, fr-FR…)
RuntimeSetting Gets the name of the currently active RuntimeSetting that is running the job (Default, Test, Production…)
EnvironmentUserName Gets the user name that is currently running the job
EnvironmentNewLine Gets a carriage return (or LineFeed).
LastErrorMessage Gets the last error message (if any in one of the previous executed activity)
LastRecordCount Gets the last record count of a selected Source (InitializeSource or LookupRecord activity)
LastRecordKey Gets the last Key that was added to a Target
LastResultValue Gets the last Result value of the last executed activity (if the previous activity sends one)
LastActionResult Gets the status of the last executed activity (Valid or Invalid)
LastSourceActivityName Gets the name of the last source activity in the current workflow (an InitializeSource or LookupRecord) -- is often used to be sent as a parameter to a function or a script
ProjectId Gets the internal id of the currently running job (integer)
ProjectInstanceId Gets the instance id of the currently running job
Runmode Gets the current run mode (Debug or Deploy) set in the UserSettings so depends on the user launching the project WorkflowCurrentStartDateTime Gets the datetime when the current instance of the job was started. This value can be used in combination with the WorkflowLastStartDateTime (below) to get records that have been added or modified since the last change. WorkflowLastStartDateTime Gets the datetime when the previous instance of the job was started WorkflowLastScheduledRunDateTime Gets the datetime when the job was scheduled (using Schedule settings in Project Details)
In this section we will review a few of the many dialogs used in appRules for entering required property values.
You can select data from data sources using the Custom Query Editor to enter a SQL statement and set arguments, variables and datasourcedatafields directly reading the record.
You can use SQL functions like COUNT, AVG, SUM etc.
Enter the custom SQL statement for selecting the records from the data source. The toolbar includes several buttons that you can use to configure the activity and to add table names, column names and other values to the SQL statement.
Toolbar Button | Description |
OK | Accept the entries |
DataSource | Configure or re-configure the data source |
Tables | Select table names to be included in the query |
DataFields | Select data fields (column names) to be included in the query |
Insert | Insert workflow values into the where clause of the custom query |
Validate | Validates the custom query |
Map Columns | Optionally maps the columns to the column assignment table |
View Records | Preview the selected records |
View Count | Preview the count of the selected records |
Column Assignment Table
You can optionally use the column assignment table to specify where the column values from the query will be stored. First select the storage location in the first column, then click the button to select the storage location.
The Concatenation Editor window is displayed for concatenating values. To include project values in the concatenation, click the Insert button.
The Html Editor is displayed for the entry of field values for your project as shown below. The editor allows you to enter HTML or text directly.
Text mode is the default. The top button bar provides options for changing colors, inserting images, selecting fonts, indentation, alignment etc.
When the selection is HtmlWithMergedFields, you can use the “Insert” button to include project values in the html document.