Workflow submission and management
    • PDF

    Workflow submission and management

    • PDF

    Article Summary

    Available in Classic and VPC

    The workflow menu is where you can create workflows using APIs registered in the API Template. You can easily and quickly create workflows using the intuitive UI editing tool, manage them to be executed automatically by setting Schedules, and check the execution history, execution success status, and response speed of workflows.

    Create a workflow

    The following describes how to create a workflow.

    1. In the NAVER Cloud Platform console, click Services > Management & Governance > API Workflow > Workflow menus, in that order.
    2. Click the [Create workflow] button.
    3. Enter the name of the workflow to create.
    4. In the workflow tab, configure the desired workflow.
      apiworkflow-workflow_add_ko.png
      • Click the [Edit position] button to change the Entity order.
      • You can click the [Unfold] button to close the Entity information window and only view the workflow diagram.
    5. To add a new Entity, click the [+] icon, and then click the Entity you want.
      • API: an Entity that specifies the API to be called
      • if: an Entity that sets the conditions using comparison operators
      • Loop: an Entity that sets the conditions for repetition
      • Set properties: an Entity that sets Properties values
    6. Click the [Delete entity] button to delete created Entities.
      • The "start" and "finish" entities can't be deleted as they're required entities.
    7. To check if the configured workflow operates normally, click the [Run test] button.
    8. Click the [Create workflow] button.
    Note
    • For Entity types and editing methods, refer to Entity.

    Entity

    Entity is the smallest unit that comprises workflow, and can be configured with 3-level substructures.

    Entity type

    The following are the Entity types of workflows.

    • Start: It is an Entity to specify the starting point of a workflow. It is created automatically upon creation of a workflow, and can't be deleted. You can edit the parameter, header, and body included in the request when calling the workflow endpoint. Using this, you can get parameters and use them for actions.
    • End: It is an Entity to specify the endpoint of a workflow. It is created automatically upon creation of a workflow, and can't be deleted. You can edit the header and body to be included in the response returned when calling the workflow endpoint. When you enter the value in the form of ${propertyKey} using the Property, it is substituted with that Property value and sent for the actual return.
    • API: It's an Entity that specifies the API to be called. You can nest workflows by entering the endpoint of a workflow that's already been created.
    • IF: It's an Entity that sets the conditions using comparison operators. The supported operators are <, <=, >, =>, ==, and =.
    • Loop: It's an Entity that sets the conditions for repetition. It can be repeated as simple repetition, or with the JsonArrayList cursor value. The maximum number of repetitions is limited to 1000.
    • Set Properties: Property is a variable that can be accessed commonly upon operation of a workflow. Set Properties Entities allow you to put a value in the Property and use the basic arithmetic operators to calculate the value. You can use this to acquire a value to be used during the response and return it from the End entity. You need to first create a Property, and save the value to the Property by accessing the Path of a specific Entity through the Set Properties Entity.

    Edit Entity

    To add an Entity while configuring a workflow, click the [+] icon, and then click the Entity you want.
    apiworkflow-workflow_entity_ko.png

    Start

    It is an Entity to specify the starting point of a workflow. It is created automatically upon creation of a workflow, and can't be deleted.
    You can edit the parameter, header, and body included in the request when calling the workflow endpoint, and use it to get parameters, which are then used for actions. For example, if you're sending a value of "date" as the Query parameter when calling the Endpoint, you need to set a query parameter of "date" in the Start Entity to use that value in the workflow.

    End

    It is an Entity to specify the endpoint of a workflow. It is created automatically upon creation of a workflow, and can't be deleted. You can edit the Header and Body to be included in the response returned when calling the workflow endpoint. If you set the Body with a string in the form of JSON and enter values in the form of ${propertyKey} using Key, value, etc. as Properties, then they are substituted with values saved in those Properties and sent for the actual return.

    • END entity body

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

      {
        "result": "propertyValue"
      }
      

    API

    It's an Entity that sets the API to be called. You can directly enter the API information, or import an API already registered. You can also import workflows created by the user, so you can combine necessary workflows appropriately after creating workflows in units of Microservices.

    The following describes how to add an API entity.

    1. Click the [+] icon in the workflow diagram, and then click API.
    2. Enter the Entity Name on the right side of the page.
    3. Enter the API information in the Request area.
    4. To import the API information registered in the API Template menu, click the [Import] button of the API Template.
    5. Click the [Import] button in workflow to import the information of a workflow that's already been created.

    IF

    It's an entity that sets the conditions using comparison operators. For example, you can set the next job to be performed when the result acquired from the API call is higher or lower than a specific value. The supported operators when setting conditions are "- <, <=, >, =>, ==, =."

    The following describes how to add an If Entity.

    1. Click the [+] icon in the workflow diagram, and then click If.
    2. Enter the appropriate information in the Condition area on the right side of the page.
      • Logical: select and, or functions. It can be selected only when 1 or more conditions are added.
      • Operand 1st: select conditions. You can select from Key values added to Properties.
      • Comparison: select the comparison operator
      • Operand 2nd: enter the base value
    3. Set conditions, and then click the [Add] button.
    4. Click the [Edit position] button of the Entity diagram on the left side of the page to move entities to be executed under the If entity.
      • These are jobs to be executed when the If conditions are met.

    Loop

    It's an Entity that sets the repetition conditions for a specific job. The maximum number of repetitions is limited to 1000.
    The following describes how to add a Loop Entity.

    1. Click the [+] icon in the workflow diagram, and then click Loop.
    2. Enter the appropriate information in the Condition area on the right side of the page.
      • [forEach] Type: it can process multiple data in the JSON array format repeatedly. It receives the JSON array list format as the API's Response, and uses this list when each object needs repetition jobs. In this case, the target must be a property in the JSON array format, and the JSON Array List of the response to be used in the previous step must be included in the JSON Array Property.
      • [count] Type: manually set the number of simple repetitions. Enter the number of repetitions in the input area that appears when selecting count.
      • ignore Error: set whether to suspend when an error occurs. When activated, it proceeds to the next step, even if an error occurs.

    <example>

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

    It assumes that a property in the JSON array format called targetList exists, and that the parameter passed from the previous step's API response or Start is saved to targetList using SetProperties.
    If you want to repeat each list with 2 jsonObjects, select forEach for type and ${targetList} for target. Loop performs repetition jobs for 2 jsonObjects as follows:

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

    While Loop can access each jsonObject, the Entity that needs to process actual repetitions under that Loop can't access the cursor value. Thus, the cursor value needs to be inserted to the Property by Loop for each repetition so that lower Entities can use it.

    The following is an example of performing a specific job for finding cases where the servername is b.

    1. Create a property called "servername," which will save and pass the value.
    2. From Loop's Cursor value, select Property > ${servername}, and select ${cursor.servername} from the Cursor value tab.
      • Whenever the Loop is executed, the servername of the current repeated cursor of the target is saved to the "servername" property.
    3. Add an If entity under Loop, and then enter the information.
      • Operand1st: ${servername}
      • Comparison: ==(Equal)
      • Operand2nd: manual input, b

    The data is processed as follows: when the repetition starts, cursor.servername of the target is saved to the "servername" Property, and the Entities under Loop use that "servername" Property.

    Set Properties

    Properties is an entity that manages Properties to be used commonly in a workflow. This has two functions.
    Using the Set properties entity, you can include the API's computation results to the properties configured in the Manage properties window. If the value passed on from the first API needs to be sent to the second API, or if a specific value needs to be used continuously when executing a workflow, then it is managed with Property.
    Secondly as an Operational Function, Property values ​​can be calculated and processed. Basic arithmetic operations are provided, and the calculations that can be performed for each type of Property are different.

    Basic Set Properties

    1. Click the [+] icon in the workflow diagram, and then click Set properties.
    2. Enter the name in Entity Name.
    3. Enter the related information, and then click the [Add] button.
      • Property: the variable configured in advance can be set. It displays the list of Properties created in the Manage Properties window.
      • Entity: you can specify the Entity value you want to import. It displays the Start Entity and the list of added API Entities, and you can import the value of Request Parameter, Request Header, Response Header, and Response Body.
      • Key: you can manually input or select the value to import. You can only access JSON object in the form of key1.key2.key3.

    Operational Function

    1. Click the [+] icon in the workflow diagram, and then click Set properties.
    2. Operate the table for Operational Function at the bottom of SetProperties.
    3. Enter the name in Entity Name.
    4. Enter the related information, and then click the [Add] button.
      • Property: set the Property where the result value will be saved after calculation. The Property type must be able to contain the values ​​to be calculated.
      • Operator: select the type of operation to perform. It depends on the type of Property
        • String Property: concat (string concatenation)
        • Json Array: add (add value), clear (clear array), delete (remove value)
        • Json Object: add, delete (remove)
        • Long, Integer, Double: add (addition), sub (subtraction), mul (multiplication), div (division), sum
      • Operand: an operand that has a value that is actually calculated. Depending on the type of Operator, there may be 1, 2 or none.

    Properties

    Properties refer to variable values that can be used in a workflow. The values in Properties can be searched and imported from all entities of a workflow. The values configured in Properties can be referenced by other Entities in the form of ${property key}, and using this, they can contain the computation results of an API and be used in various forms, such as being utilized as a cursor value for the Loop Entity, or for the conditional statement of the If Entity.
    The following describes how to configure Properties to be commonly used in a workflow.

    1. In the NAVER Cloud Platform console, click Services > Management & Governance > API Workflow > Workflow menus, in that order.
    2. Click the workflow name to go to the Edit workflow page.
    3. Click the [Properties] button at the upper right corner of the page.
    4. When the Manage Properties window appears, configure variables to be used in the workflow.
      • It supports String, Long, Integer, Double, JSON array, and JSON object formats.
    5. Click the [Add] button.

    Check workflow execution result

    You can monitor the execution result of a workflow. It displays the execution history of a workflow in a Scatter Chart, which you can use to identify the success status of the workflow and distribution of the execution time at a glance. The following describes how to check the execution result of a workflow.

    1. In the NAVER Cloud Platform console, click Services > Management & Governance > API Workflow > Workflow menus, in that order.
    2. Click the [View result] button of the workflow whose execution history you want to check.
    3. To check the execution history for a specific time range, click the apiworkflow-workflow_charticon icon from the Scatter Chart, and then specify the desired area.
    4. Click the result ID to check the detailed result.
    Note

    The execution history is stored for 1 month, and the history is automatically deleted after 1 month. Details are kept for one week.

    Set automatic execution schedule

    The following describes how to set the execution cycle of a workflow.

    1. In the NAVER Cloud Platform console, click Services > Management & Governance > API Workflow > Workflow menus, in that order.
    2. Select the workflow you want to set the execution cycle for, and then click the [Schedule] button.
    3. When the Set schedule window appears, set the start/end period.
    4. Enter the automatic execution cycle with a Cron expression in the Cron expression input area.
    5. Enter the request information.
    6. Click the [Apply] button.

    Manage authority

    You can register the key information for NCP Signature authentication and AWS Signature authentication. In API Workflow, after you register NCP Signature, you can call NAVER Cloud Platform’s APIs conveniently without any additional Signature configuration process. This guide is based on registering NCP Signature.

    1. In the NAVER Cloud Platform console, click Services > Management & Governance > API Workflow > Workflow menus, in that order.
    2. Click the [Authority] button.
    3. When the Manage authority window appears, click the [Register] button of the NCP Signature.
    4. Enter the access key and secret key.
      • You can check the Access Key and Secret Key of the NCP Signature from the Portal > My page > Manage account > Manage authentication key menu.
    5. Click the [Save] button.
    Note
    • You can register the AWS Signature with the same method.
    • The [Authority] button is activated once you have one or more registered workflows.

    Manage workflow

    It describes how to modify and delete workflows, as well as how to create a new workflow using the information of an existing workflow.

    Copy workflow

    The following describes how to copy information of an existing workflow and use it to create a workflow.

    1. In the NAVER Cloud Platform console, click Services > Management & Governance > API Workflow > Workflow menus, in that order.
    2. Select the workflow you want to copy, and then click the [Create duplicate] button.
      • The Create workflow page appears with the same values entered for the selected workflow.
    3. Modify the workflow information, and then click the [Create workflow] button.

    Modify workflow

    The following describes how to modify a workflow.

    1. In the NAVER Cloud Platform console, click Services > Management & Governance > API Workflow > Workflow menus, in that order.
    2. Select the workflow you want to modify, and then click the [Edit] button.
    3. When the Modify workflow page appears, modify the workflow, and then click the [Edit workflow] button.

    Delete workflow

    The following describes how to delete a workflow.

    1. In the NAVER Cloud Platform console, click Services > Management & Governance > API Workflow > Workflow menus, in that order.
    2. Select the workflow to delete, and then click the [Delete] button.
    3. When the Delete window appears, click the [OK] button.

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.