Skip to content

Commit

Permalink
update to timer quickstart and added cli devtool docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Ellis authored and Matt Ellis committed Jul 25, 2019
1 parent e4080ce commit 592b900
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
2 changes: 2 additions & 0 deletions build-docs.sh
Expand Up @@ -30,6 +30,8 @@ ext_docs() {
sed -i -e 's/<!--/---/g' -e 's/-->/---/g' docs/content/flogo-cli/flogo-cli.md
curl -o docs/content/flogo-cli/plugins.md https://raw.githubusercontent.com/project-flogo/cli/master/docs/plugins.md
sed -i -e 's/<!--/---/g' -e 's/-->/---/g' docs/content/flogo-cli/plugins.md
curl -o docs/content/flogo-cli/dev-plugin.md https://raw.githubusercontent.com/project-flogo/cli-plugins/master/devtool/README.md
sed -i -e 's/<!--/---/g' -e 's/-->/---/g' docs/content/flogo-cli/dev-plugin.md
}

#--- Update contributions page ---
Expand Down
1 change: 1 addition & 0 deletions docs/content/flogo-cli/dev-plugin.md
@@ -0,0 +1 @@
THIS PAGE IS AUTOMATICALLY GENERATED DURING BUILD
42 changes: 20 additions & 22 deletions docs/content/labs/timers.md
Expand Up @@ -15,7 +15,7 @@ This demo makes use of the Flogo Web UI. To make it easy to get started the Flog

In Flogo terminology, an app is comprised of one or more triggers and flows (actions). The app itself is really just an organizational mechanism that can be leveraged when developing microservices & functions. An app contains a set of configurations, as well as triggers and a collection of flows.

To create a new app, open the Flogo Web UI and from there, click "_New_" to create a new microservice and give your new app a name. Click "_Create a Flow_" to create a new flow and give it any name that you want. Now click on the flow you just created and to open the canvas where you can design your flow.
To create a new app, open the Flogo Web UI and from there, click "_New_" to create a new microservice and give your new app a name. Click "_Create an Action_" and select "_Flow_" to create a new flow and give it any name that you want. Now click on the flow you just created and to open the canvas where you can design your flow.

![step 1](../../images/labs/timers/step1.png)

Expand All @@ -29,12 +29,8 @@ In this case you want to start with a `Timer`. To add a trigger, click on the "+

Now it is time to configure the trigger. To start, click on the trigger and a new dialog will open with a bunch of options. In this dialog you'll have to provide:

* **repeating**: This tells the trigger wheter it should stop after executing once, or repeat itself after a certain interval (set this to `true`)
* **notImmediate**: This tells the trigger to wait until tehe first interval is done or start right away (set this to `false`)
* **startDate**: You can specify what the start date is for the trigger to become active, for example if you want to deploy the app and want it to start in a few hours (keep this at `2018-01-01T12:00:00Z00:00`)
* **hours**: This will tell the trigger how many hours to wait between runs (keep this field empty)
* **minutes**: This will tell the trigger how many minutes to wait between runs (keep this field empty)
* **seconds**: This will tell the trigger how many seconds to wait between runs (set this to `5`, to start a new flow every 5 seconds)
* **startDelay**: The start delay (ex. 1s, 1m, 1h, 1h30m etc.), immediate if not specified
* **repeatInterval**: The repeat interval (ex. 1m, 1h, etc.), doesn't repeat if not specified

Click "_save_" to make sure everything is, well…, saved. You can click the little `X` on the top-right (no, not your browser…) to close the dialog window and go back to the flow.

Expand All @@ -44,7 +40,7 @@ An activity is the unit of work that can be leveraged within a Flow. An activity

![step 3a](../../images/labs/timers/step3a.png)

A list with all the activities the Flogo Web UI knows about will appear. From the list you can pick the "Log Message" activity (or use the searchbar to find it) and click it to make sure it is added to the flow. As you hover over the newly added activity, a cog will appear and as you hover over that thing, a menu will appear to configure your activity. In this window you can configure the inputs of the "Log Message" activity. Click on "_a.. message_" and type `Hello World` in the box (on the right hand side of the screen).
A list with all the activities the Flogo Web UI knows about will appear. From the list you can pick the "Log Message" activity (or use the searchbar to find it) and click it to make sure it is added to the flow. As you hover over the newly added activity, a ellipsis (...) will appear, click this and a menu will appear with options to configure or delete your activity. Click the gear icon to configure your activity. In this window you can configure the inputs of the "Log Message" activity. Click on "_a.. message_" and type `Hello World` in the box (on the right hand side of the screen).

![step 3b](../../images/labs/timers/step3b.png)

Expand All @@ -61,20 +57,22 @@ Those were all the steps needed to design the flow, now let's build an executabl
To run the app double-click it (on Windows), or open a terminal and execute:

```bash
2018-09-26 14:03:31.917 INFO [engine] - Engine Starting...
2018-09-26 14:03:31.917 INFO [engine] - Starting Services...
2018-09-26 14:03:31.917 INFO [engine] - Started Services
2018-09-26 14:03:31.917 INFO [engine] - Starting Triggers...
2018-09-26 14:03:31.917 INFO [trigger-flogo-timer] - Scheduling a repeating job
2018-09-26 14:03:31.917 INFO [engine] - Trigger [ timer ]: Started
2018-09-26 14:03:31.917 INFO [engine] - Triggers Started
2018-09-26 14:03:31.917 INFO [engine] - Engine Started
2018-09-26 14:03:31.917 INFO [engine] - Running FlowAction for URI: 'res://flow:timers'
2018-09-26 14:03:31.918 INFO [activity-flogo-log] - Hello World...
2018-09-26 14:03:31.918 INFO [engine] - Flow instance [db4cb555d16b2c2189f1a2b217379b66] Completed Successfully
2018-09-26 14:03:36.919 INFO [engine] - Running FlowAction for URI: 'res://flow:timers'
2018-09-26 14:03:36.919 INFO [activity-flogo-log] - Hello World...
2018-09-26 14:03:36.919 INFO [engine] - Flow instance [d84cb555d16b2c2189f1a2b217379b66] Completed Successfully
2019-07-25T07:46:46.224-0600 INFO [flogo.engine] - Starting app [ app-build ] with version [ 0.0.1 ]
2019-07-25T07:46:46.224-0600 INFO [flogo.engine] - Engine Starting...
2019-07-25T07:46:46.224-0600 INFO [flogo.engine] - Starting Services...
2019-07-25T07:46:46.224-0600 INFO [flogo] - ActionRunner Service: Started
2019-07-25T07:46:46.224-0600 INFO [flogo.engine] - Started Services
2019-07-25T07:46:46.224-0600 INFO [flogo.engine] - Starting Application...
2019-07-25T07:46:46.224-0600 INFO [flogo] - Starting Triggers...
2019-07-25T07:46:46.224-0600 INFO [flogo.trigger.timer] - Scheduling a repeating timer
2019-07-25T07:46:46.224-0600 INFO [flogo] - Trigger [ timer ]: Started
2019-07-25T07:46:46.224-0600 INFO [flogo] - Triggers Started
2019-07-25T07:46:46.224-0600 INFO [flogo.engine] - Application Started
2019-07-25T07:46:46.224-0600 INFO [flogo.engine] - Engine Started
2019-07-25T07:46:46.225-0600 INFO [flogo.activity.log] - Hello World
2019-07-25T07:46:46.225-0600 INFO [flogo.flow] - Instance [19ffa126322448d04fee092d29a7ce7b] Done
2019-07-25T07:46:51.227-0600 INFO [flogo.activity.log] - Hello World
2019-07-25T07:46:51.227-0600 INFO [flogo.flow] - Instance [1affa126322448d04fee092d29a7ce7b] Done
```

Every 5 seconds a new entry will appear in the log.

0 comments on commit 592b900

Please sign in to comment.