Workflow registration and management

Prev Next

Available in Classic and VPC

The Workflow menu is for creating and managing workflows utilizing the APIs registered in the API Template. Using intuitive UI editing tools, you can quickly and easily create workflows, set schedules to run them automatically, and view execution history, including success status and response times.

Create a workflow

To create a workflow, follow these steps:

  1. In the NAVER Cloud Platform console, click i_menu > Services > Management & Governance > API Workflow > Workflow menu in order.
  2. Click the [Create workflow] button.
  3. Enter a name for the workflow you want to create.
  4. On the Workflows tab, configure the desired workflow.
    apiworkflow-workflow_add_ko.png
    • You can change the order of entities by clicking the [Edit Position] button.
    • Click the [Expand] button to close the Entity Information pane and see only the Workflow diagram.
  5. To add a new entity, click the [+] icon and then click the desired entity.
    • API: Entity that specifies the API to call
    • if: Entities that use comparison operators to set conditions
    • Loop: Entities that set recurring conditions
    • Set Properties: Entity to set the value of Properties
  6. To delete the created Entity, click the [Delete Entity] button.
    • The "start" and "finish" entities cannot be deleted because they are required entities.
  7. To verify that the workflow you configured is working properly, click the [Run Test] button.
  8. Click the [Create workflow] button.
Note

See Entity for information about entity types and how to edit entities.

Entity

Entities are the smallest units that make up a workflow, and can be organized into a three-level substructure.

Entity types

Workflows have the following entity types:

  • Start: Entity that specifies the starting point of the workflow. It is automatically created when you create a workflow and cannot be deleted. When you call an Endpoint in a Workflow, you can edit the Parameters, Header, and Body contained in the request. You can use it to take over parameters and use them in your behavior.
  • End: Entity that specifies the end point of a workflow. It is automatically created when you create a workflow and cannot be deleted. When you call an Endpoint in your Workflow, you can edit the Header and Body to be included in the response returned. If you utilize a Property to enter a value in the form of ${propertyKey}, it will be substituted with that Property value when it is actually returned.
  • API: Entity that specifies the API to call. You can nest workflows by entering the endpoint of an already created workflow.
  • IF: Entity that sets conditions via comparison operators. The supported operators are <, <=, >, >=, ==, and =.
  • Loop: Entity that sets the recurrence conditions. You can iterate with simple iteration and a JsonArrayList as the cursor value. The maximum number of iterations is limited to 1000.
  • Set Properties: Properties are variables that are commonly accessible to Workflow actions. The Set Properties Entity allows you to put values into its Properties and utilize arithmetic operators to compute the values. You can use this to get a value to use during the response and have it returned by the End entity. You must first create a Property, then access the Path to a specific Entity via Set Properties Entity and store that value in the Property.

Edit an Entity

To add an entity in your workflow configuration, click the [+] icon, then click the desired entity.
apiworkflow-workflow_entity_ko.png

Start

Entity that specifies the starting point of the workflow. It is automatically created when you create a workflow and cannot be deleted.
When calling a Workflow Endpoint, you can edit the Parameters, Header, and Body in the request and use them to pass parameters to your actions. For example, when sending the value "date" as a query parameter when calling an Endpoint, you must set the query parameter "date" in the Start Entity to use it in the Workflow.

End

Entity that specifies the end point of a workflow. It is automatically created when you create a workflow and cannot be deleted. You can edit the Header and Body included in the response returned when calling a Workflow Endpoint. If you set the Body to a string in JSON format and then enter values in the form of ${propertyKey} using keys, values, and other elements as Properties, they are replaced with the values stored in the corresponding Properties when the response is returned.

  • END entity body

    {
      "result": "${propertyKey}"
    }
    
  • Workflow endpoint response

    {
      "result": "propertyValue"
    }
    

API

Entity that sets the API to call. You can enter your own API information or import an API that you've already registered. You can also import user-created workflows, so you can create workflows at the microservice level and then assemble the right mix of workflows you need.

The steps to add an API Entity are as follows:

  1. Click the [+] icon in the Workflow organization chart, then click API.
  2. Enter a name in Entity Name on the right side of the screen.
  3. Enter your API information in the Request area.
  4. To get the API information you registered in the API Template menu, click the [Import] button on the API Template.
  5. To import workflow information that you have already created, click the [Import] button on the workflow.

IF

Entity that is used to set conditions using comparison operators. For example, you can set what to do next if the result obtained from an API call is above or below a certain value. The supported operators for setting conditions are -, <, <=, >, >=, ==, and =.

The steps to add an IF Entity are as follows:

  1. Click the [+] icon in the workflow organization chart, then click if.
  2. Enter the relevant information in the Condition component on the right side of the screen.
    • Logical: Select the and or or function. Selectable only when at least one condition is added
    • Operand 1st: Select conditions. Select from the Key values added to Properties
    • Comparison: Select a comparison operator
    • Operand 2nd: Enter a baseline value
  3. After setting the conditions, click the [Add] button.
  4. Click the [Edit Location] button in the Entity organization chart on the left side of the screen to move the Entity to be performed under the IF Entity.
    • The action to take when the IF condition is satisfied.

Loop

Entity that is used to set recurrence conditions for a specific action. The maximum number of iterations is limited to 1000.
The steps to add an Loop Entity are as follows:

  1. Click the [+] icon in the Workflow organization chart, then click Loop.
  2. Enter the relevant information in the Condition component on the right side of the screen.
    • [forEach] Type: Iterate over large amounts of data in JSON Arrays. This is used when you receive a JSON Array List as an API Response and need to perform iterative tasks for each object. In this case, the Target must be a JSON Array–type Property, and the JSON Array Property must contain the JSON Array list from the Response used in the previous step.
    • [count] Type: Set the number of simple iterations directly. Enter the number of times to repeat in the input area that appears when you select count.
    • ignore Error: Set whether to abort on error. If enabling results in an error, move on to the next step

  • Cursor value area in forEach
    //the value contained in the targetList property
    [
            {
                "servername":"a",
                "ip":"aaa.bbb.ccc.ddd"
    
            },
            {
                "servername":"b",
                "ip":"bbb.bbb.ccc.ddd"
            }
    ]
    

Suppose there is a JSON Array–type Property named targetList, and the parameters passed from the API Response or Start in the previous step were stored in targetList using SetProperties.

If you want to iterate over each List containing two JSON Objects, select forEach for type and ${targetList} for target. The Loop will iterate over the two JSON Objects in the form shown below.

//forEach loop 1 time
"cursor":{
                "servername":"a",
                "ip":"aaa.bbb.ccc.ddd"
              }
              
//forEach loop 2 times
"cursor":{
               "servername":"b",
               "ip":"bbb.bbb.ccc.ddd"
               }

The Loop can access each JSON Object, but the Entity that performs the actual iterative processing under the Loop cannot access the cursor value. Therefore, at each iteration in the Loop, we need to put the value of cursor in the Property so that it is available to the child Entity.

Here's an example of performing a specific action to find the cases where servername is b.

  1. Create a Property named 'servername' to store and pass the value.
  2. In the Loop's Cursor Value, select Property > ${servername}, and in the Cursor value tab, select ${cursor.servername}.
    • Each time the iterator is executed, the 'servername' Property stores the servername of the target's currently iterating cursor in the target.
  3. Add an IF Entity to the bottom of the Loop and fill in the information.
    • Operand1st: ${servername}
    • Comparison: ==(Equal)
    • Operand2nd: Direct input, b

At the start of the iteration, the cursor.servername of that Target is stored in the 'servername' Property, and then the entities down the Loop process the data using the 'servername' Property.

Set Properties

Properties is an Entity that is used to manage common Properties within the Workflow. This has two functions.
By default, the Set Properties Entity is an Entity that allows you to store the results of API operations in Properties configured in the Manage Properties pane. If you need to pass values passed from the first API to the second API, or if you have specific values that you need to keep using when running your workflow, you manage them as Properties.
Second, as an Operational Function, it is used to compute and process the value of a Property. It provides basic arithmetic and more, and the operations that can be performed on each type of Property are different.

Basic Set Properties

  1. Click the [+] icon in the Workflow organization chart, then click Set Properties.
  2. Enter a name in Entity Name.
  3. Enter the relevant information and click the [Add] button.
    • Property: Can set preset variables. In the Manage Properties window, a list of the Properties you created is displayed
    • Entity: Allows you to specify the Entity value to import. The Start Entity and a list of added API Entities are displayed, and you can get values for Request Parameter, Request Header, Response Header, and Response Body.
    • Key: You can enter or select the values you want to import. Only JSON Objects can be accessed in the form key1.key2.key3.

Operational Function

  1. Click the [+] icon in the Workflow organization chart, then click Set Properties.
  2. At the bottom of SetProperties, manipulate the table for the Operational Function.
  3. Enter a name in Entity Name.
  4. Enter the relevant information and click the [Add] button.
    • Property: Set the Property where the result will be stored after the operation. The Property type must hold the values to be computed.
    • Operator: Select the kind of operation to perform. Depends on the type of Property
      • String Property: concat (concatenate strings)
      • JSON array: add, clear, delete
      • JSON Object: add, delete
      • Long, Integer, Double: add, sub, mul, div, sum
    • Operand: The operand whose value is actually being computed Depending on the type of operator, there may be one, two, or none.

Properties

Properties are variable values that are available in your workflow, and any Entity in your workflow can look up and retrieve the values contained in those Properties. The value set in Properties can be referenced by other entities in the form of ${property key}, which can be used in various ways, such as a cursor value in a Loop Entity to hold the result of an API operation or a conditional in an If Entity.

Here's how to set up Properties to be used commonly in your workflow.

  1. In the NAVER Cloud Platform console, click i_menu > Services > Management & Governance > API Workflow > Workflow menu in order.
  2. Click the workflow name to go to the Edit workflow screen.
  3. Click the [Properties] button in the top right corner of the screen.
  4. When the Manage Properties window appears, set the variables you want to use in your workflow.
    • Supports String, Long, Integer, Double, JSON Array, and JSON Object formats.
  5. Click the [Add] button.

View the results of running a workflow

You can monitor the results of your workflow's execution. The execution history of a workflow is displayed in a scatter chart, which allows you to understand the success of the workflow and the distribution of execution time at a glance.
The steps to view Workflow execution results are as follows:

  1. In the NAVER Cloud Platform console, click i_menu > Services > Management & Governance > API Workflow > Workflow menu in order.
  2. Click the [View results] button on the workflow you want to see the execution history for.
  3. To view the execution history for a specific time period, click the apiworkflow-workflow_charticon icon in the Scatter Chart and specify the desired area.
  4. Click the result ID to view detailed results.
Note

Execution history is kept for one month, and history older than one month is automatically deleted. Details are kept for one week.

Set up an autorun schedule

Here's how to set the execution cycle for your workflow.

  1. In the NAVER Cloud Platform console, click i_menu > Services > Management & Governance > API Workflow > Workflow menu in order.
  2. Select the Workflow for which you want to set the execution cycle and click the [Schedule] button.
  3. When the Schedule settings window appears, set the start and end periods.
  4. In the Cron expression input area, enter the execution cycle as a Cron expression.
  5. Enter your request information.
  6. Click the [Apply] button.

Managing Authorities

You can register key information for NCP Signature authentication and AWS Signature authentication.
In API Workflow, if you register NCP Signature authentication information, you can easily call NAVER Cloud Platform APIs without configuring a separate Signature. This description is based on how to register an NCP Signature.

  1. In the NAVER Cloud Platform console, click i_menu > Services > Management & Governance > API Workflow > Workflow menu in order.
  2. Click the [Authority] button.
  3. When the Manage Authority window appears, click the [Register] button for NCP Signature.
  4. Enter your Access Key and Secret Key.
  5. Click [Save].
Note
  • You can register for an AWS Signature in the same way.
  • At least one registered workflow must exist for the [Authority] button to be enabled.

Manage workflows

Describes how to modify and delete workflows, and how to create new workflows using existing workflow information.

Copying a workflow

To create a new workflow that copies the information from an existing workflow, follow these steps

  1. In the NAVER Cloud Platform console, click i_menu > Services > Management & Governance > API Workflow > Workflow menu in order.
  2. Select the Workflow to copy, then click the [Create Duplicate] button.
    • The Create Workflow screen appears with the same values entered as the selected workflow.
  3. After editing the Workflow information, click the [Create Workflow] button.

Edit a workflow

Follow these steps to edit a Workflow:

  1. In the NAVER Cloud Platform console, click i_menu > Services > Management & Governance > API Workflow > Workflow menu in order.
  2. Select the Workflow to edit, then click the [Edit] button.
  3. When the Edit Workflow screen appears, make your edits to the workflow and click the [Edit Workflow] button.

Delete a workflow

To delete a workflow, follow these steps:

  1. In the NAVER Cloud Platform console, click i_menu > Services > Management & Governance > API Workflow > Workflow menu in order.
  2. Click to select the Workflow you want to delete and click the [Delete] button.
  3. When the delete popup appears, click the [OK] button.