• 沒有找到結果。

When creating a new flow, if you know the circumstances under which you want the flow to activate, select Start with a trigger and select an available trigger that will activate the flow.

If you are unsure of the circumstances under which the flow should be activated or if you want the flow to be activated under more than one situation, use the Configure flow inputs and outputs and add the trigger(s) at a later time as needed to the flow. See Creating a Flow without a Trigger for more details on this.

Creating a Flow with a REST (Receive HTTP Message) Trigger

When creating a flow with a REST trigger, you have the option to either enter the schema in the Add a trigger dialog while creating the flow or you can start by using a Swagger-compliant JSON file to create the flow.

You can create a REST flow by entering a JSON schema or dragging and dropping a Swagger-compliant JSON file. See Using a Swagger 2.0 Compliant File section for how to use a Swagger file.

To create a REST flow by entering the schema, do the following:

Procedure

1. Click an app name on the Apps page in TIBCO Cloud Integration- Flogo (PAYG) to open its page.

2. Click the Create button.

The Create flows and triggers dialog opens.

3. Enter a name for the flow in the Name text box.

Flow names within an app must be unique. An app cannot contain two flows with the same name.

4. Optionally, enter a brief description of what the flow does in the Description text box.

5. Select New flow and click Create.

6. Select Start with a trigger.

The Add a trigger dialog opens with all the available triggers showing.

7. Click Receive HTTP Message, the REST trigger.

The Add a trigger dialog opens.

8. Select the REST operation you want to implement by clicking on the box for the operation under Method.

A flow can have multiple REST triggers. Two REST triggers cannot have an identical port, path, and method combination. Each REST trigger needs to differ from the other REST triggers for the same flow with either a unique port, path, or operation (GET, PUT, POST, DELETE).

9. Enter a resource path in the Resource Path text box.

10. Enter the JSON schema or JSON sample data for the operation in the Enter a JSON Schema or an example of your JSON message. This will be the schema for both input and output.

11. Click Continue.

12. If this is the first REST trigger you are adding to the flow, you get the following dialog:

If you select Copy Schema, the schema that you entered in step 9 above gets automatically gets copied or displayed in a tree format to the following locations when the trigger gets added:

Trigger output in the Map to Flow Inputs tab of the trigger

Flow input in the Input Settings tab of the Flow Inputs & Outputs accordian tab.

Trigger reply (If the trigger has a reply) in the Reply Settings of the trigger.

Refer to the "REST Trigger" section in the TIBCO Flogo® Activities and Triggers Guide for details on configuration parameters.

If you select Just add the trigger, a REST trigger gets added to the flow without any configuration.

You can configure this REST trigger by clicking on it at a later time.

The flow page opens with the Input Settings tab of the Flow Inputs & Outputs accordian tab open.

13. Collapse the Flow Inputs & Outputs tab to see the buttons for adding activity in the flow.

14. Map the trigger output to the flow input.

a) Open the trigger configuration dialog by clicking on the trigger.

b) Open the Map to Flow Inputs tab.

c) Map the elements under Flow input to their corresponding elements under Trigger Output one at a time.

15. Map the flow output to the trigger reply as follows:

a) In the trigger configuration dialog, click the Map from Flow Outputs tab.

b) Map the elements under Trigger Reply to their corresponding elements under Flow Output one at a time.

c) Close the dialog by clicking on the x at its top right corner.

16. Add activites to the flow by hovering your mouse cursor next to the Flow Inputs & Outputs tab and clicking the plus sign.

Creating a Flow with the GraphQL Trigger

You create GraphQL flows by uploading a GraphQL schema file with an extension, .gql or .graphql. TIBCO Cloud Integration- Flogo (PAYG) creates the appropriate flows based on your schema. When the flow gets created, a GraphQL trigger automatically gets generated and attched to each flow that gets created.

Refer to the section, "Using GraphQL Schema" on how to create a flow using a GraphQL schema. Also, refer to the "GraphQL Trigger" section in the TIBCO Flogo® Activities and Triggers Guide for details on the GraphQL trigger.

Creating a Flow with Other Triggers

This section applies to triggers that are not REST or GraphQL triggers.

To create a flow with such a trigger, follow these steps:

Procedure

1. Click an app name in the Apps page in TIBCO Cloud Integration- Flogo (PAYG) to open its page.

2. Click the +Create if this is the first flow in the app or the Create button if a flow already exists in the app.The Create flows and triggers dialog opens.

3. Select New flow.

4. Enter a name for the flow in the Name text box.

Flow names within an app must be unique. An app cannot contain two flows with the same name.

5. Optionally, enter a brief description of what the flow does in the Description text box and click Create.

6. Select Start with a trigger.

The Add a trigger dialog opens with all the available triggers showing.

7. Click the trigger that you want to add. For non-Timer triggers you will be required to select a connection that you want to use with the trigger.

The flow page is displayed with the trigger.

8. Click the trigger to display its properties. For example, the image below shows the Timer trigger.

9. Configure the trigger properties for the trigger. See the respective trigger section in the TIBCO Flogo® Activities and Triggers Guide for details.

10. Add activities to the flow by clicking the + icon next to the Flow Inputs & Outputs tab.

相關文件