Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
To create your project, simply navigate to the appRules designer home page and drag-and-drop activities from the toolbox on to the designer.
The user id to be used for accessing the designer must be set up as a developer in user settings
There are several sample projects in the Samples database that show examples of completed projects.
To configure an activity:
Optionally edit the Display Name of the activity.
Optionally enter a short description for the activity.
Select the Execution Plan for the activity (Automatic, On-Demand, etc.)
Configure the required properties using the many built-in property editors.
Optionally configure the condition for executing the activity.
Optionally configure the actions to execute based on execution events.
Click the Save toolbar button to save the activity. If no errors are found, the activity configuration will be saved.
Once saved, you can connect the activity to another activity by dragging an arrow from one activity to another.
Drag-and-drop an activity on to the designer and the "Add New Activity" form will be displayed:
One of the key features of appRules is that the system provides several options for validating activities on the designer, functions, expressions, data source metadata and other items used in the development of your projects.
When using appRules Designer, at design time, appRules flags all activity errors on the designer (using a red dot). You can mouse over the error flag to view the error message. As each error is corrected, the error flag is removed.
At any time, you can perform a detailed validation of your projects.
To perform a detailed project validation, display the Project Validation modal as follows:
Click the Validate button from appRules project toolbar for validation the current project.
The project is validated and the results are displayed as shown below:
This section covers the appRules Designer environment. It covers the main components including the toolbox, the designer, the property grid associated with the active activity, the Main Menu and Ribbon bar.
The main menu gives you access to the general features:
System settings including runtime, user, data source and project definitions.
The Run menu for directly running jobs.
Logs/Statistics for viewing logs and statistics from running and completed jobs.
Check In/Check Out for checking in and checking out project databases.
Job Monitor for monitoring running jobs.
The Designer is the work surface for composing appRules projects. It is the drag/drop environment on which activities are defined and connected to form the flow of the process. To add a workflow activity to any part of the designer, drag it from the toolbox and drop it on the designer.
The Toolbox shows the available workflow activities including the Generic activities and appConnector activities. The activities in the toolbox are grouped into sections.
The project toolbar gives you access to the project management tools and the properties of the currently opened Project
To include activity modules in the toolbox, click the gear icon located at the top right of the toolbox in the home page or select "Configure Toolbox" from the File Menu:
Select the modules to be included from each category (eg CRM, ERP, etc.) and Click ”Reset Toolbox” when done.
Main Menu
Designer
ToolBox
Project Toolbar
Menu
Option
Description
File
Log Into Project Database
To Open a different project Database
User Settings
To Edit the current user settings
Configure Toolbox
To Add or Remove activity modules from the current Toolbox
Master Admin Options
This submenu gives access to the Admin features (Create New Project Database and other utilities).
Developer Options
If the current user is a developer, his submenu includes options for additional settings including project settings.
Log Out
Log Off from the current database and close the application
Settings
RunTime Settings
Define the runtime settings for the different environments (Test, Production, Development…)
Users
(Admin Only) Define and change user types and settings.
Data Sources
Manage settings for the Data Sources used in the current project database including metadata generation and connections
Projects
Manage the settings for all projects in the current project database including Conditions, Actions, Schedules, Notifications, etc.
Run
Validate Project
Validates a selected project and displays results.
Run Project
Runs a select project directly
Rerun Data Migration Job
If the platform product is Data Migration Engine or the Enterprise Portal, this option reruns a data migration job.
Logs/Statistics
Project Run Details
Displays the complete Logs/Stats of a selected project ordered by Run Instances
Project Run Instances
Displays the Run Instances of a selected project
Database Log Entries
Displays the contents of the logs for a selected project based on a specific date range.
Project Activity Statistics
Displays the statistics related to project activities.
Project Data Source Statistics
Display the statistics about the project data sources.
System Log Files
Access the optional log files generated if extended logging is selected at runtime.
CheckIn/CheckOut
CheckIn Project Database
Checks in (copy) one project database into another. Note: Source records are not locked for editing.
CheckOut Project Database
Checks out (copy) one project database into another. Note: Source records are locked for editing.
Data Source Browser
Browse selected records in any supported data source type using the data source browser.
Job Monitor
Monitor and control all running jobs using the Job Monitor.
Options
Description
New
Creates a new project.
Open
Opens an existing project.
Save
Saves the current project designer settings.
Details
Displays the Project Details for the currently selected project. Project settings including, schedule, notifications, variables, etc. can be added, changed or deleted.
Validate
Validates the current project and displays the results.
Run
Runs the current project
Logs/Stats
Displays logs and statistics for the current project
Undo
Undo the last designer action
Redo
Redo the last designer action
Zoom in
Increase the size of the designer view
Zoom out
Decrease the size of the designer view
Delete
Deletes the selected activities from the designer view
Your projects will be writing data to files, databases, SAAS, and other targets. appRules includes activities for writing data in a variety of data sources.
To write data to an appRules target, you will need to initialize the Target of the data, select the connector to use and define other properties using the InitializeTarget activity.
For example, to write data to Microsoft SQL Server, drag and drop the InitializeTarget activity from the SQL Server toolbox on to the designer and configure the properties as follows:
You can specify whether to cache the records in a preloaded table (set a lookuppreloaded source in the project and select it here), optionally select an insert/update activity (set in the project) and execute a customfunction or a child workflow for each batch completion.
Before writing records in the target data source, the values of the data fields of the active record must be set.
The table below shows the activities that can be used to set the data field values of the active record:
Once the data field values in the active record have been set, you can save the new record in the target by using the SaveRecord activity.
For example, to insert record into SQL Server, drag and drop the SaveRecord activity from the SQL Server toolbox activities on to the designer.
Select the Target for inserting the record. All the field values that have been set or mapped to the current record for the selected target will be added to the data source.
Click on the Option field and Select Insert in the Configure Record Save Option Window
To retrieve the key of the newly created record, tick the Retrieve New Record Key box. The key value will be made part of the target record after inserting the record (to be used for example to generate a related record in the following processed activities).
You can also define optional properties for including more field values to save and also for logging detailed errors associated with adding the new record. To define optional details, click the Optional properties button. The following window will be displayed:
Enter the property values as follows:
Existing records can be updated using the SaveRecord activity, drag and drop the SaveRecord activity from the related connector activities tool box into the designer.
Select the Target for updating the record (see Inserting Records). All the field values that have been set or mapped to the current record for the selected target will be updated to the data source.
Click on the Option field and Select Update in the Configure Record Save Option Window
You must also select whether to update the record using a PrimaryKey or a CompositeKey. Click on the Unique Key or Composite Key value to do it.
All the field values that have been set or mapped to the current record for the selected target will be updated in the data source.
You can also define optional properties for including more field values to update. click the optional properties button. The following window will be displayed:
Enter the property values as follows:
The SaveRecord has an option to combine the Insert and Update
At run time, if the record exists, it is updated. If the record does not exist at run time, it is inserted into the target.
Select the Target for upserting the record and Upsert in the Configure Record Save Option
Specify the Insert/Update and the Lookup Settings (value to be tested to check if the record exists or not)
Optional Properties are defined the same way as Insert/Update above
The DeleteRecord activity is used for deleting records from a target.drag and drop the DeleteRecord activity on to the designer. To delete a record, the record key is required.
At run time, if the record exists, it is deleted.
Select the Target for updating the record. You must also select whether to delete the record using a PrimaryKey or a CompositeKey (RecordKeyType). If you use a composite key, define the fields/values used in the CompositeKey collection.
No Optional properties available for this activity
Once you are done with composing and orchestrating your project
1 - you can launch it directly on any computer using the Designer:
Previously you can open the Project Details to set the Run Options (mouse over the option to get explanations):
Click Run button as below
Click button 1 to run a selected project
Click button 2 to run a currently opened project (same as the Run button in the Project Details window above)
The following window is displayed:
Properties:
Unselect “Run in Interactive mode” to run the project in the background if you want to use appRules during the execution. (if you have specified Viewxxxx activities (Base Toolbox) or display results in the activities definition, they will not be displayed during the execution)
The Project is Run by Default as a process launch by the HostService or IIS, but you can also Run it remotely using a selected WebApi Service (Run On server list) - in this case the service must be defined in File-->Master Admin Settings-->WebApi Server Definitions.
Debug (tick this checkbox if you want to log every activities execution details during execution - this info is saved in a file accessible from the Logs/Statistics -> System Log Files menu option - the file name is : project name_timestamp.log - file location: C:\ProgramData\appStrategy\PortalData\Default\Logs)
Monitor Job (check this option to Monitor the execution)
Click the Run button at the top of window to start the execution.
At the end of the execution, click on the Logs/Stats button in the project ribbon to display the project execution statistics
If you tick the View execution Flow checkbox, the process shows the activities executed at run time (in green with a delay at each step specified in the Delay field) and an Execution flow window displayed at runtime allows you to end the execution flow display or cancel the job.
Mapping in appRules is unlike mapping in legacy ETL tools. In appRules, mapping is another option for setting record values before each record is saved. You can compose projects that do not utilize any mapping to set record values as you can use extension functions and other options to set data field values. In addition, you can also use the SetValues, TransformValues, ClearRecord and CopyRecord activities from the appRules Base module to set record values. However, the MapAndSetFields activities are the most commonly used method of setting record field values in appRules projects.
Most modules in appRules include a MapFields activity for mapping. For example, to map Salesforce account records with a sqlserver datasource, drag and drop the MapAndSetFields activity from the Salesforce toolbox on to the designer:
Select a Source (this will be the main one but you will be able to map targets fields with other sources using the DataFieldValue source value) and Target then click on the FieldMaps property button. The Field Mapping window will be displayed:
The MapFields window shows the fields in the entity. Fields required by the target are flagged. Use a Source / Value combination to populate the field values. You only need to map the fields that you wish to include and the required fields. Over fifty built-in Source/Value options are available including DataFieldValue (to set the field from the Source if one was selected) and CustomFunction (to set the field from a function). You can utilize any number of MapAndSetFields activities to set values in any number of Targets in your appRules projects.
You can set a mapcondition per field (for example to not set the target value if the source value is null)
You can run your project directly from the appRules Home Page. Click the Run button on the Project Toolbar and the following modal will be displayed:
Enter an optional reference for the job, the Server on which to run the job (or Default). "Max Run Time" and "Cache TimeSpan" are defined in the project settings for the project.
Check whether to run the job in background and if extended logging is required (for example if you are debugging the project).
Click the Run toolbar button to run to job.
You can also schedule the workflow to run at a specific time or regularly: see
You can launch a project remotely on the current or a distant machine using the Web Api Service, this service is installed by the appRules Portal Installation Package. see: for Manual Installation this service can be called by a POST request using Postman for example or can be also launched by an executable with parameters (see )
The web api service must be first installed and started (see topic )
Property
Description
DataSource
Select the datasource and entity (table) to be used in this Target for inserting/updating/deleting data records.
Activity
Module
Notes
MapAndSetFields
Supported in every modules such as SQL Server, Dynamics CRM etc.
Any number of MapAndSetFields activities can be used to set data field values. Field mapping was described in detail in the previous chapter.
SetValues
Base Module
Any number of SetValues activities can be used to set data field values
ClearRecord
Record Module
Clears the active record from the selected Datasource
CopyRecord
Record Module
Copies field values from another Source or Target record to the active record
TransformValues
Base Module
Transforms data field values from the related target record
MapAndSaveRecords
Base Module
Use the MapAndSaveRecords activity for bulk imports. This activity takes a source and a target and automatically reads all the records into the target.
Property
Description
DataFieldValues
Click to Collection property button to define the additional fields and values to be saved in the data source.
TargetClearRecord
Check this box to clear the target record before setting the values using DataFieldValues.
Property
Description
DataFieldValues
Click to Collection property button to define the additional fields and values to be saved in the data source.
TargetClearRecord
Check this box to clear the target record before setting the values using DataFieldValues.
Connection Params | Description |
Organization | The organization. When not specified, Default is used |
DatabaseId | The id the project database. |
UserId | The user id for running the job |
Password | The encrypted user password for running the job. |
ApiKey | Security feature, Optional if a webapi key is not specified in the WebApi service config file, Must match the ApiKey on the server if specified - the project will be only run if Apikeys match on client and server |
Execution Params | Description |
Projectid | The integer id of the project to run |
Reference | Optional reference for the job |
Interactive | Mode for running the job: false = background (the project is launched only), true = foreground (the api waits for the project to end (used when return arguments are specified -example waiting for a return code to execute another project), Note: Default is false |
Arguments | Optional name/value dictionary of arguments for running the job in Json format, leave blank if none (remove the Arguments json) |
The appRules Job Monitor is used for monitoring running jobs. Click the Job Monitor toolbar button on the home page to display the Job Monitor modal.
From the job monitor you can perform the following actions:
View job details
Set a job control value
Pause job
Cancel job
The jobs you create in appRules are organized as specific projects. Each project includes the workflow representation of the job, conditions, actions, activities and other definitions required to run the job. Projects are stored in the project database. They can also be copied from one project database to another. appRules projects can be created, composed and orchestrated directly in appRules.
In appRules, the terms project, workflow, job, etc. are used interchangeably.
To create a new project in appRules, click the “New” application toolbar button on the top left corner of the appRules home page:
Enter the values for creating the new project as follows:
Name: Enter a unique name for the project.
Description: Enter an optional description for the project.
Type: Select the type of project - (parent or child workflow). Child workflows can be called from a parent workflow.
Click the OK button to create the project and continue.
Once created, all definitions for the project will be associated with it and will be accessible from the Project Details page.
You can start configuring activities or access the Project Details page to optionally define variables, schedule jobs, etc. for the newly created project.
To schedule a job, display the job scheduling window as follows:
1 - Select the Projects option from the Settings Menu.
2 - In the window displayed, select the project to schedule from the list and click on the Schedule Tab:
Tick the schedule project checkbox and enter the required fields:
Next Run Date/Time: initialize with the first launching date
End Run Data/Time; Set the ending date for the scheduling (Run Until date)
Frequency: Preset (will fill the cron settings for you) or Custom
Hour: 7-22 to run between 7 and 22h59
Day of Week= 0 to 6 (sunday to saturday)
Cron examples:
The Scheduler Service must be installed and started on the machine. see: Scheduler Service Setup
appRules includes several options for logging entries in the project database and for reporting. Normal Log entries are by default automatically written to the project database by the running process or they can be written to the database by using a logging activity (WriteLogs) at specific points in the running process. Extended or Debug Logs are automatically written to the file system in the appStrategy/PortalData/<Company>/DbFiles/<ProjectDatabase>/Logs folder. (<Company> default is Default for a single company environment). The file name is prefixed by the project name + a timestamp.
You can set the default logging options for your project by setting the LogOption property in the Run Options tab of the Project Details window:
You can also specify the logging option for each activity in your project by setting the LogType property of the activity. The LogType property can be accessed by clicking the Option property button of the Configure Activity page.
Select your logtype option:
None: Only errors will be logged in the database Normal: Logs will be written to the database Debug: Extended logs will be written to a specific file (stored in C:\ProgramData\appStrategy\PortalData\Default\DbFiles\<ProjectDatabaseName>\Logs)
Log entries can be viewed by selecting either the Project Run Details or View Logs option from the Log/Statistics menu option in the main menu.
Or from the Log/Stats button in the project bar for the current opened project.
The Project Run Details shows the run instances and tabs showing the statistics and logs for each run (instance) of the project.
The Log Entries selection allows you to select the list and type of log entries to view.
appRules creates log files for certain errors or processes. For example, if the project database is not available, errors are automatically written to the Logs folder (C:\ProgramData\appStrategy\PortalData\Default\DbFiles\<DataBaseName>\Logs).
When tracking down an issue after running your project, you should first check the project logs as shown in the section above. In addition, you should also check the System Log Files option or Logs folder for any message files that may have been created by the process.
The appRules Portal Application application includes tools that you can use to view Logs and Statistics stored in the project database as you run your jobs. The viewers can be accessed from the “Logs/Statistics” menu or the Logs/Stats button for the current opened project.
You can configure your projects to capture as much information as possible regarding the process. After running the job or while it is still running, you can use the Project Run Details window to view all details related to the job, including Activity statistics, Source and Target statistics and system logs. The Project Run Details gives you a centralized report showing all details about instances of the project.
In addition, the Project Run Details also allows you to view details on child jobs launched by each job.
Database Log Entries captured during the course of running your jobs can be viewed using the Database Log Entries of the Logs/Statistics menu. Log entries can be selected by date range and other criteria.
Each run instance of a project makes an entry in the Run Instance table. This selection shows a summary of the run instances for the project selected by date range.
This selection allows you the view the statistics for each activity for each instance of the project. Entries can be viewed by specifying a date range.
This selection shows statistics on data sources that have been used by projects in the project database. Entries can be viewed by specifying a date range.
min
hour
day/month
month
day/week
Execution time
30
0
1
1,6,12
*
— 00:30 Hrs on 1st of Jan, June & Dec.
0
20
*
10
1-5
–8.00 PM every weekday (Mon-Fri) only in Oct.
0
0
1,10,15
*
*
— midnight on 1st ,10th & 15th of month
5,10
0
10
*
1
— At 12.05,12.10 every Monday & on 10th of every month
Your appRules projects may require reading data from files, data bases, SAAS applications and other sources. appConnector activity modules include activities for initializing Sources for reading data. For example, the appConnector SQL Server module features the InitializeMssqlSource activity. Once initialized, you can use the GetNextMssqlRecord activity to read the next record from the result set in the Source.
NB: The BaseData module features the common activities, for all the connectors available. (InitializeSouce, IntializeTarget, GetNextRecord, SaveRecord...). The dedicated connector module can have additional specific activities (Ex: ExecuteStoredProcedure in Microsoft SQL Server).
The appRules InitializeSource activity is used for initializing the Source. For example, to read data from Microsoft SQL Server, you will need to initialize the Source of the data, select the datasource and entity (table) to use and define filters for specifying the records to read. At design time, you can also get a count and view the records defined by the Source that you have defined.
To define the Source for reading SQL Server data source, drag the InitializeSource activity from the SQL Server module activities on to the designer and configure the properties as follows:
Type the sql query to load the data, you can mix data from several tables (using SQL statement with JOIN or WHERE CLAUSE).
Use the Tables and DataFields button to select the correct names from the datasource definitions.
ViewQuery, viewrecords and viewcount buttons to test your query
See samples section of the documentation for learning more about the use of customquery
To read the next record from an open connection in appRules, you use the GetNextRecord activity from the appropriate activity module. For example, to read the next record from a SQL Server data source, drag and drop the GetNextRecord activity on to the designer. The only property required is the Source (An InitializeSource activity defined previously in the project).
appRules includes activities for looking up data from data sources. Lookups provide a convenient means of reading a specific record from the data source. You can also use the Lookup activities to verify existence of a record in the data source.
The LookupRecord activity returns a specific record from a data source. It uses the same properties as the as the InitializeSource activity discussed in the previous chapter.
The appConnector InitializeSource activities can be configured to load records into memory. If an activity module supports preloading of records, a record can be loaded from the list by using a LookupPreloadedRecord activity.
Property
Description
QueryType
Configuration (user defines fields to read, filters ...) or CustomQuery (user defines a SQL query to read the data)
QueryType
Configuration
DataSource
Select the SQL server Datasource from the List of defined datasources:
Next to the list, you can choose to define a new datasource, test the connection or browse the datasource
PrimaryEntity
Select the primary SQL Server table from the list.
SourceRecords
Click to access the following properties
AutoRecordCount
Whether to automatically count the number of records.
Datafields
FilterItems
You can optionally use this property to define the criteria for selecting the entity records to be included in the result set.
SelectDistinctRecords
True or False
SelectTopNRecords
option to specify a number of records to load (for testing purpose)
SortItems
You can optionally use this property to define how the records in the Source are to be sorted.
UseWithNoLock
RecordCount
Displays a count of the records that meet the criteria defined by the FilterItems property. If no filter is defined, the count of the total number of records in the table is displayed. This is a design time feature that gives you the number of records in the list.
Records
Displays a list of the records that meet the criteria defined by the FilterItems property. If no filter is defined, browsing starts at the first record in the list. This is a design time property for viewing table records before running your project.
ViewQuery
Displays the current query depending on the selected datafields, filters, sorts defined (see below)
AutoLoadFirstRecord
Set to True to automaticaly read the first record from the list of records that meet the filter criteria.
PreloadAllRecords
If Set to True, allows you to utilize preloaded records for tables with a small number of records. This option is especially useful if you will be performing a lot of lookups from the table.
QueryType
CustomQuery
Select only the datasource to use and In this case clicking on SourceRecords will display the CustomQuery editor
Click to select the data fields to be returned from the PrimaryEntity. If no data fields are specified, all fields are returned.