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.
Select One of the Argument defined in the current project
Get/Set value using the auto-iteration key of an activity which is using auto-iteration - (EvaluateDecisionTable etc.)
Select a boolean value - False or True
Returns a key value generated in an SavedRecords Activity (Insert) and marked to be saved in the Cache
Use Concatenation to concatenate values. Project values can be included by clicking the Insert button.
Returns the result of a condition function - (boolean). The conditionfunction that you select must be previously defined in the project’s functions (see Project Details)
Returns a counter field value (The Counters are defined in the Project Details)
Returns the result of executing preset conditions like lastactivityresult, valuecontainsdata etc.
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)
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.
Returns a guid value. Type a guid or select New Guid from the list to get a unique value
Returns a time span (type format : days:hours;minutes:seconds)
Gets a value by executing a CustomFunction. The customfunction that you select should be previously defined in the project’s functions (see Project Details)
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)
Select a source or target name from the current project
Gets a date or a date related value. You can enter a date and also add/subtract timespans as shown below: You can also select a date related entry as shown below:
Gets a date/time or a date/time related value. You can enter a date and also add/subtract timespans as shown below: You can also select a date related entry as shown below:
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): The FilePath Field is defined in the Runtime Fields of the RuntimeServer (Menu Settings -> Runtime Settings) for the Test Server in this example :
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.
Reads the entire contents of the file as the value to use.
Gets a file path
Gets a sub string from a text file record
Gets a folder path
Gets an HTML value
Gets HTML value with project fields merged in (datafield, argument, variable values etc)
Gets an integer value
Gets value by executing a predefined internal function :
Displays a custom list associated with a property:
Gets the value of a long string
Gets a Numeric value
Gets a password value (encrypted):
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)
Gets the primary key value of the selected entity of a data source
Gets the record count of a Source (set up with the InitializeSource or Lookup activity) in the project
Returns a value from a selected Source (set by InitializeSource or LookupRecord in the current project)
Gets an long string value with merged fields from the project
Gets a string value
Gets the count of records in a Source
Returns a value from a selected Target (set by InitializeTarget in the current project)
Gets a variable value: The variables are defined in the Project Details :
Gets a timespan value
Gets the display name of a selected activity in the current project
Gets the result of a selected activity in the current project (Valid or Invalid)
Gets the name of a project in the current project database
Gets a system value for the currently running project.
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.
Accept the entries
Configure or re-configure the data source
Select table names to be included in the query
Select data fields (column names) to be included in the query
Insert workflow values into the where clause of the custom query
Validates the custom query
Optionally maps the columns to the column assignment table
Preview the selected records
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.