Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Overview
Actionflows that require running at a particular time or frequency can be scheduled using a
. Insert excerpt _taskplan _taskplan nopanel true
Creating Task Plans
- In your application's Repository, expand
and clickInsert excerpt _taskplan _taskplan nopanel true Insert excerpt _new _new nopanel true - In the Basic Settings for the New Task Plan, set:
- Name: Give the task plan a name to indicate its purpose
- Enabled:
to indicate the task plan configuration is complete and it can be runInsert excerpt _toggle_on _toggle_on nopanel true - Scheduled:
to open a Schedule section in the properties, where the day and time that the task plan will run can be configuredInsert excerpt _toggle_on _toggle_on nopanel true - Suspend on Failure:
to automatically suspend the task plan if it generates an error on runningInsert excerpt _toggle_on _toggle_on nopanel true - For more details on these settings and further options, see Task Plans.
- Click
Insert excerpt _save _save nopanel true
Creating an Action Task
- In the Tasks section, hover over the
icon and choose Action TaskInsert excerpt _addIcon _addIcon nopanel true - In the Basic Settings for the New Action Task, set:
- Name: Give the action task a suitable name
- Click
.Insert excerpt _save _save nopanel true
- In the Actionflow Instance section, click the
icon to open a list of Actionflows in the RepositoryInsert excerpt _actionflow_icon _actionflow_icon nopanel true - Or click the
icon to create a new oneInsert excerpt _addIcon _addIcon nopanel true
- Or click the
- Drag the required Actionflow(s) into the Actionflow Instance section
Click - The Actionflow instance canvas will open
- Click Click to Connect and choose an input of Task Plan
- The Actionflow instance canvas will open
Tip |
---|
If you require many Actionflows to run at the same time, they can all be included in the same Action Task. |
For more on tasks, see Task.
Configuring Send By Email
- On the Task Plan settings, in the Send By Email section, set:
- Email from: This must be the email account used to send emails from PhixFlow
- To find this, in the
, expandInsert excerpt _repository _repository name full nopanel true Insert excerpt _emailConfiguration _emailConfiguration name accounts nopanel true - Double-click on
Outbound emailer and copy the login emailInsert excerpt _emailConfiguration _emailConfiguration name icon nopanel true
- To find this, in the
- Email from: This must be the email account used to send emails from PhixFlow
Subject Expression: Enter an appropriate subject
Message Expression: Enter an appropriate message
- Notification: click
Insert excerpt _addIcon _addIcon nopanel true
- In the Notification section, select
Insert excerpt _add_icon _add_icon nopanel true - To set up the User Notification Rule, See User Notification Rule
- Click
Insert excerpt _finish _finish nopanel true
Running and Scheduling Task Plans
Task plans can either be run manually from the Repository or run automatically by setting up a schedule.
- To run manually, right-click on the task plan in the Repository and select
Insert excerpt _taskplan_start _taskplan_start nopanel true - PhixFlow runs the task plan and sends an email to the selected user, if set up
- To run on a schedule, toggle on Scheduled in the Task Plan
Insert excerpt _property_settings _property_settings nopanel true - In the Schedule section, populate the appropriate fields to schedule the task plan, see Task Plans
- Wait for your task plan to start under its schedule
Worked Example
Here is a worked example using the Retail Data (available from the Learning Centre).
Tip |
---|
If you are completing this chapter as part of the Actionflow course and using a training instance, the data and screens have already been pre-loaded into the Actionflow Intermediate Application. For these example, we'll be working on the Shop Stock screen. |
Weekly Timesheet Reminder Email
In this example, we'll set up an Actionflow that retrieves the email address for specific staff members and sends them an email to remind them to fill in their timesheets. We'll then add this Actionflow to a Task Plan and specify the frequency (weekly) and day (Friday) that we want the email to be sent on.
Create Actionflow
- On the Actionflow homepage, create a new Actionflow
- Name: Timesheet Email
- Create a
actionInsert excerpt _action_calculate _action_calculate nopanel true - Name: Retrieve Staff Emails
- Hover over the
action to select Add LookupInsert excerpt _action_calculate _action_calculate nopanel true - Name:
RE
- Name:
- Create a lookup to the Shop_Staff data and output the email addresses
- Ensure the email attribute is mapped as an Outgoing Mapping and an Output Attribute
- On the
, create a filter:Insert excerpt _action_view _action_view nopanel true - Where ANY of the following are true:
- staffID
- equals
4385800847
- staffID
- equals
1546843809
- staffID
- Where ANY of the following are true:
- On the Calculate action, create an attribute to process the email addresses
- Name:
EmailAddresses
Expression:
Code Block listToString(RE.email)
- Name:
- Create a
action and connect it to the Calculate actionInsert excerpt _action_email _action_email nopanel true - Map across the EmailAddresses attribute
- Click on the Email action to open its Properties and pin the tab
- For the From field, we need to use the email address specified as the login email in your Outbound Emailer; to find this, in the
, expandInsert excerpt _repository _repository name full nopanel true Insert excerpt _emailConfiguration _emailConfiguration name accounts nopanel true - Double-click on
Outbound emailer and copy the login emailInsert excerpt _emailConfiguration _emailConfiguration name icon nopanel true
- Double-click on
- Paste this into the From field on your pinned
propertiesInsert excerpt _action_email _action_email nopanel true - To:
enter your email address
- This way you can see if the Actionflow is working
CC:
Code Block language js theme Emacs ${in.EmailAddresses}
Subject:
Code Block language js theme Emacs Timesheet Reminder
Message:
Code Block language js theme Emacs Please ensure your timesheet is completed by close of play today.
- Leave all other fields blank
Insert excerpt _finish _finish nopanel true
- For the From field, we need to use the email address specified as the login email in your Outbound Emailer; to find this, in the
Expand | ||
---|---|---|
| ||
Create Task Plan
- In the Repository, expand
and clickInsert excerpt _taskplan _taskplan nopanel true Insert excerpt _new _new nopanel true - In the Basic Settings for the New Task Plan, set:
- Name:
Weekly Timesheet Reminder
- Enabled:
Insert excerpt _toggle_on _toggle_on nopanel true - Scheduled:
Insert excerpt _toggle_on _toggle_on nopanel true - Suspend on Failure:
Insert excerpt _toggle_on _toggle_on nopanel true
- Name:
Task Plan Schedule
Schedule the task plan to run on a specified day at a specified time.
- In the Schedule section, populate the following fields:
- Seconds: 0
- Minutes: 0
- Hours: 10
- Choose an appropriate time to enter here based on the time where you are now so you can see the results of the task plan
- Due to international time differences, the time in PhixFlow may be different to where you are. Check the
for the time in PhixFlowInsert excerpt _console _console nopanel true
- Day of Month: ?
- Month: *
- Day of Week: FRI
- Choose today's day of the week so you can see the results of the task plan
- Year: *
the task planInsert excerpt _save _save nopanel true
Receive Notification of Task Plan Completion
Set up an email configuration to receive notification that the task plan has completed.
- In the Send By Email section, set:
- Email From: This must be the email account used to send emails from PhixFlow
- To find this, in the
, expandInsert excerpt _repository _repository name full nopanel true Insert excerpt _emailConfiguration _emailConfiguration name accounts nopanel true - Double-click on
Outbound emailer and copy the login emailInsert excerpt _emailConfiguration _emailConfiguration name icon nopanel true
- To find this, in the
- Email From: This must be the email account used to send emails from PhixFlow
Subject Expression: "
Weekly Timesheet Reminder Task Plan"
Message Expression: "
The Task Plan has completed."
- Notification: set up your own email address here
- Click
Insert excerpt _save _save nopanel true
Creating the Action Task
- In the Tasks section, hover over the
icon and choose Action TaskInsert excerpt _addIcon _addIcon nopanel true - Name: Timesheet Email
- Click
.Insert excerpt _save _save nopanel true - Actionflow Instance: click the
icon to open the list of ActionflowsInsert excerpt _actionflow_icon _actionflow_icon nopanel true - Drag across the Timesheet Email Actionflow into the Actionflow Instance section
- The Actionflow instance canvas will open
- Click Click to Connect and choose an input of Task Plan
- Wait for the task plan to run at your chosen time