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.

 

 

image093.jpg
 

The properties associated with activity assemblies are displayed in the property grid as shown in the example below for the SendEmail activity:

  image094.jpg 

 

 

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.

image095.jpg 

Collection Editors

appRules collection editors are used for entry of multiple items of a specific type.

 

When no values have been entered for this collection property, the field contains the value (Undefined)

 

Click on the Pen icon below to add values:

 

 


 

the collection editor window is displayed as shown below:

 

image098.jpg 

To add new values in the collection, click right in the left pane to display the context menu.

You can change the Item sequences by selecting it in the left pane and drag it to the required position in the list.

 

 

 


 

Dialog Property Editors

 

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 (See the appConnector for Flat Files User Guide).

 

 

image099.jpg 

SourcedValue Property Editors

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:

 

 

image100.jpg 


 

 

 

Sourced Values in Mapping

  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:

  image101.jpg 


 

Sourced Value Editor Window

 

The example below shows the Sourced Value Editor window used for configuring a Sourced Value at design time:

 

image102.jpg 

The table in the following pages shows the different source and value options for SourcedValues.


 

Source Value
Argument   Select One of the Argument defined in the current project
image103.jpg    
Boolean   Select a boolean value - False or True      
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).
image105.jpg
The conditionfunction that you select must be previously defined in the project’s functions (see Project Details)
image106.jpg      
BaseCondition Returns the result of executing preset conditions like lastactivityresult, valuecontainsdata etc.
image107.jpg  
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)
image108.jpg        
String     Returns a string value. Enter the string value or select from available options (preset null or empty value).
image109.jpg
image110.jpg  
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)
image111.jpg  
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)
image112.jpg      
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)
image113.jpg        
WorkflowDataManagerName Select a source or target name from the current project
image114.jpg    
Date Gets a date or a date related value.   You can enter a date and also add/subtract timespans as shown below:
image115.jpg
You can also select a date related entry as shown below:
image116.jpg  
DateTime Gets a date/time or a date/time related value.   You can enter a date and also add/subtract timespans as shown below:
image117.jpg
You can also select a date related entry as shown below:
image118.jpg  
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):
image119.jpg
The FilePath Field is defined in the Runtime Fields of the RuntimeServer (Menu Settings → Runtime Settings) for the Test Server in this example :
image120.jpg  
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.
image121.jpg      
FileContents Reads the entire contents of the file as the value to use.
image122.jpg  
FilePath Gets a file path
image123.jpg    
FileRecordSubString Gets a sub string from a text file record      
FolderPath Gets a folder path  
image124.jpg      
HTML Gets an HTML value
image126.jpg
HTMLWithMergeFields Gets HTML value with project fields merged in (datafield, argument, variable values etc)image127.jpg    
Integer Gets an integer value    
InternalFunction Gets value by executing a predefined internal function :   image128.jpg
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):
image129.jpg
image130.jpg    
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)
image131.jpg
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   image134.jpg  
StringWithMergedFields Gets an long string value with merged fields from the project
image135.jpg  
String Gets a string value  
RecordCount Gets the count of records in a Source  
Variables Gets a variable value:
image137.jpg
The variables are defined in the Project Details :
{user_guide:image138.jpg?659×348}} 
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
image139.jpg  
System Gets a system value for the currently running project.
image136.jpg

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)

 

Other Property Editor Dialogs

In this section we will review a few of the many dialogs used in appRules for entering required property values.

 

Custom Query Editor (activity: InitializeSourceFromQuery)

 

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.

 

image140.jpg 

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.

 


 

Concatenation Editor

 

The Concatenation Editor window is displayed for concatenating values.  To include project values in the concatenation, click the Insert button.

 

 

 

 image141.jpg


 

Html Editor

 

 

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.

 

 


image143.jpg 

When the selection is HtmlWithMergedFields, you can use the “Insert” button to include project values in the html document.