System / Add-in Manager / Define Workflow Rules
Archibus SaaS / System / SaaS Partner Administrator / Define Workflow Rules
Create and Edit Scheduled Workflow Rules
This kind of workflow rule is run on a pre-determined interval (every hour, every Monday and Tuesday at 1 am, etc.). It is run by the application itself. Scheduled workflow rules run repeat reminders, data transfers, benchmark calculations, and other actions that should be performed at specified intervals.
You can also configure a scheduled rule to run immediately after the application server starts. You can use this option to ensure that if the application server was not running when the rule was scheduled to execute, the rule would be executed the next time the application server starts.
Scheduled rules can use all common handlers, update the database, perform notifications, and execute other chained rules.
Scheduled rules can access other aspects of the context, such as the afm-config.xml information (such as the enabled languages or document management settings).
You can examine all scheduled workflow rules with the System / Add-In Manager / Scheduled Workflow Rules report.
To edit or create a scheduled workflow rule
- Access the Workflow Rules Manager at the above locations.
- Select an application and then a scheduled rule.
- For scheduled workflow rules, the Workflow Rules form displays the following options:
- Click Save to save your edits to the database.
- If you change any workflow rule properties on this form, you will need to restart the application server in order to reload workflow rules with updated properties. For Archibus SaaS deployments, you must contact Archibus Technical Support and request a restart of the cloud environment.
Option | Value |
---|---|
Primary Application |
The primary application to which this rule will pertain. This field is validated by the Archibus Applications table. |
Rule Name |
This field, together with Primary Application, define the unique key that can be used to call this rule, either from the Web Central interface using <afmAction>, or from another workflow rule. |
Description |
Enter a description of the workflow rule. |
Security Group |
Enter the security group of the user allowed to execute this rule. For instance, if you are currently logged in as SMITH, SALLY, SMITH, SALLY must be a member of a security group specified by this option in order to execute the rule. |
Rule Type |
Set this to Scheduled. |
Active? |
If you want this workflow rule to take place now, set to yes. If you want to retain its definition to be used later, set to No. See Activate Workflow Rules for information. |
Event Handler Class |
Click on the Event tab to display this and the next option. Defines the full Java class name that implements the workflow rule. Typically you will use one of the pre-defined Java classes that is provided by Web Central, but you can also create your own Java class and enter it here. |
Event Handler Method |
Specifies which method of the Event Handler Java class should be called. For workflow rule classes that contain multiple methods, this field should be empty. |
XML Schedule Properties | Enter or update the XML definition of the scheduled properties. For example:
<xml_schedule_properties>
<schedule startTime="now" endTime="" runOnStartup="true">
<simple repeatCount="-1" repeatInterval="86400"/>
</schedule> </xml_schedule_properties> |
Notes about the XML Schedule Properties Example
startTime=”now”: specifies that the rule can be executed as soon as the repeat interval is due.
You can also specify a date in the future: startTime=”01-01-2017 15:00:00”. The time value you specify is the time when the rule will run. Note that the date format used by Web Central’s core is mm-dd-yyyy, so this example is January 1, 2017 at 3:00:00 pm.
Note If you are using cron rules, scheduled rules do not obey the runOnStartup
parameter when it is set to False. To correct this, set startTime to "now" and runOnStartup
to "false".
endTime=””: specifies that the rule can be executed for as long as the application server runs. You can also specify a date in the future: endTime=”01-01-2018 15:00:00”.
runOnStartup=”true”: specifies that in addition to the schedule, the rule should also be executed immediately after the application server starts.
repeatCount=”-1”: specifies that the rule will continue to execute indefinitely. You can also specify how many times the rule will execute: repeatCount=”1”.
repeatInterval=”86400”: specifies that the rule will be executed every 86400 seconds, i.e. once a day.
Alternatively, you can use UNIX Crontab scheduler syntax to control the schedule. For example:
<xml_schedule_properties>
<schedule startTime="now" endTime="" runOnStartup="true">
<cron expression="0 0 8 1 * ?" />
</schedule>
</xml_schedule_properties>
See Also
For full Crontab expression syntax, see http://adminschoice.com/crontab-quick-reference.