Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

 Training Exercise

You have now learnt how to create and configure Actionflows that require sophisticated processing logic in PhixFlow. To reinforce the techniques you have learnt, complete these assignments. 

Don't worry, this is not an exam. You can use the Help to broaden your understanding and assimilate knowledge. A number of hints have been provided; use these if you are struggling as each hint gives you more information on the solution.  

.

 Assignment Hint

Remember to close and reopen your screen if you do not see the changes you expect.

Assignment 1

Difficulty Level: Hot

Task 1

On the Government Organisations screen, create an Actionflow on the Run API button that retrieves and interprets JSON data from this API: https://www.gov.uk/api/organisations

Save the data to the table, Gov_Organisations.

 Hint

The table, Gov_Organisations, can be found in the Repository for your application if you would like to add it to your ERD and take a closer look at its setup. This table backs the screen, Government Organisations.

.

 Solution

Actionflow Setup

HTTP Action Setup

Mappings - HTTP to JSON

JSON Action Setup

Mappings - JSON to Save

Save Action Setup


Task 2

Modify the Actionflow on the Run API button to split the data and where the ClassName attribute receives "ministry-of-justice", set the Justice boolean attribute to Y. Then converge both flows of data back together before completing the save action.

 Solution

Actionflow Setup

Mappings - JSON to Gateway

Mappings - Gateway to Calculate

Calculate Action Setup


Mappings - Calculate to Converge

Mappings - Gateway to Converge

Converge Action Setup

Mappings - Converge to Save



Task 3

Modify the Actionflow on the Run API button to initiate a new phase after the Save action. In the new phase send an email to yourself stating that the API has been successfully called. Set the To field on the  Email action to your own email so you can see it working.

 Hint

To trigger the next phase, the last action node in the first phase (Save) must be connected to a Start Phase action node.


 Hint

Remember Actionflows cannot pass data between phases. 


 Solution


.


Assignment 2

Difficulty Level: Medium

Task 1

Create an duplication check Actionflow on the Check button on the Government Organisations Form screen. This Actionflow should:

  • take the value that the user has entered into the Title field
  • look up into the Government Organisations data for matches
  • count the number of matches returned
  • output this count back onto the Government Organisations Form
 Solution

Actionflow Setup

Mappings - Input Connection Point to Input

Mappings - Input to Calculate Action

Calculate Action Setup

Mappings - Incoming to View Action

Mappings - Outgoing from View Action

View Action Setup

Mappings - Calculate to Output 

Mappings - Output to Output Connection Point

.



.

Assignment 3

Difficulty Level: Mild

Task 1

Modify the Actionflow on the Save button on the Government Organisations Form by embedding the Actionflow Gov Org Validation before the Save action.

.


.


.

.

Once you have verified your Actionflows are working, the screens and data can be modified in any way you wish. For example, you may wish to enhance the Email phase of the Actionflow that runs the API to pass in more detail to the Email action, such as, the number of records returned from the API call.

  • No labels