Step through an example of how to build, test, and activate a flow using a flow
template in App Engine Studio.
始める前に
Create an application in App Engine Studio. Once your application is
built, you can use flow templates to create flows. For more information, see Building applications in App
Engine Studio.
Role required: admin, flow_designer, or delegated_developer
このタスクについて
To help you get started with building a flow from a flow template, follow along with the steps below. The example flow will start, or trigger, every time a user on the instance creates a request for a Service Catalog item. When a request is created, our flow will automatically run the following actions:
- Check if the catalog item's price is greater than $1,000.
- If the price is greater than $1,000, notify the requester's manager to approve the request.
- Otherwise, if the price is less than or equal to $1,000, automatically approve and close the request.
手順
-
Navigate to .
-
From the My Apps page, open your application.
-
In your application, next to Automation, click the add icon (
).
-
From the gallery of automation templates, select Create an approval
for a requested catalog item, then click
Begin.
-
From the Template catalog item list, select the
Standard Laptop.
-
In the Ask for approval if the catalog item's price is greater
than field, enter 1000, then click
Done.
-
In the Name field, enter Approval flow for
requested items.
-
In the Description field, enter Approval flow
for requested items, then click
Continue.
-
Once your flow is created, click Edit this flow.
-
On the flow page, click the If not approved step, then
click Delete to remove the step.
-
At the bottom of the flow, click the Log step, then
click Delete to remove the step.
-
In the same way, delete the last two log actions at the bottom of the
flow.
-
Select Add an Action, Flow Logic, or Subflow.
Then, select Flow Logic and choose
Else from the flow logic picker.
-
Under your Else flow logic, select the plus icon (
) and then select Action.
From the action picker, select the Update Record
action.
-
Add the following values for the Update Record action's inputs:
| Input |
Action |
| Record |
Click the pill picker icon ( ) to open the dot-walker. Then, navigate, or
dot-walk, to and select Requested Item
Record to add this data pill to the
input. |
| Table |
Leave as Requested Item
[sc_req_item]. |
| Fields |
Select + Add field value. Then,
select the Approval field and choose
Approved as the field's value.
Next, select the State field and
choose Closed Complete as the field's
value. Finally, select the Close
notes field and enter Request
automatically approved, as requested item's value is
less than $1,000 for the field's
value. |
Now, you've successfully set up a conditional action that automatically
approves and closes the catalog item request if the requested item's price is
less than or equal to $1,000.
-
To finish adding the conditional Update Record action
within the Else flow logic of your flow, click
Done.
-
In the main header, click Save to save the changes
you've made to your flow.
Your flow should look similar to the following example:

-
To test your flow and see if it triggers and runs properly without any errors,
go to the main header and click Test.
-
In the Test Flow window, select a Requested Item record that has a price greater than $1000, then select Run Test.
For example, select the requested item record that you previously created from the service catalog (RITM0010001).
You can select the Create new record icon (

) to create a new requested item.
-
Select Your test has finished running. View the flow execution
details.
-
On the Execution Details page, see the values that populated for the trigger and each automated action in your flow.
-
Navigate back to your flow.
-
In the main header, click Activate so that your flow's
trigger fires whenever a user on your instance creates a new Service Catalog Item Request record.
次のタスク
Your flow is now active and will run whenever it's triggered. Next, you can manage your flow every time it runs by viewing your flow's execution history. To view this history, click Executions in the main header. The resulting page shows you the state of completion for each flow execution as well as how long it took for each flow execution to run, or its runtime. To troubleshoot a flow execution for errors, select
an execution from this list to open the Flow execution details.