SDC Component Diagram
Sequence Diagram
In this case, the Catalog plays a manager role of the workflows, it manage the designed workflows and provide the Create/Updata/Query operations of workflows for Service Designer and provide the storage of workflows.
At the same time, the '(ZTE) WF Designer' plays an editor role of a workflow selected.
The interaction between Catalog and '(ZTE) WF Designer' is as follows:
So, the rest APIs of '(ZTE) WF Designer' should be provided as follow:
- Open and Navigates to (ZTE) WF Designer
The rest APIs of Catalog should be provided as follow:
Get Workflow Content by WF ID
- Save Workflow Content with WF ID (to Catalog)
- Get Extend BPMN Activites (from Catalog)
- Get Category Information of Extend BPMN Activities (from Catalog)
Rest APIs of (ZTE) WF Designer
Define the Rest APIs of (ZTE) WF Designer, these APIs will be provided by ZTE.
Open and Navigates to (ZTE) WF Designer
Open the an existed workflow and navigate to the '(ZTE) WF Designer'.
For a new workflow, before it be opened, the catalog should create it first. The Sequence Diagram shows as follow:
URL:
Get http://{wf-designer-ip}:{port}/workflow-modeler
Request:
Query Parameters:
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
id | String | Yes | Unique UUID of the workflow | |
operation | Enum | Yes | The operation for the workflow, Valid value as follow: view - can view only, can't modify. modify - can view and modify both. |
Response:
Navigate to the (ZTE) WF Designer UI, load the workflow content with the given id from Catalog.
Rest APIs of Catalog
Define the rest APIs of Catalog, these APIs will be provided by Amdocs/AT&T.
Get Workflow Content by WF ID
URL:
GET http://{sdc-ip}:{port}/api/sdc/v1/workflow-modeler/models/{id}
Request:
Path Parameters:
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
id | String | Yes | Unique UUID of the workflow |
Response:
Return the content of the workflow. For details to see data model 'WorkflowInfo'.
Save Workflow Content with WF ID (to Catalog)
Save workflow content to the Catalog.
URL:
PUT http://{sdc-ip}:{port}/api/sdc/v1/workflow-modeler/models/{id}
Request:
Pah Parameters:
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
id | String | Yes | Unique UUID of the workflow |
Body Parameters:
The workflow content, for details to see data model 'WorkflowInfo'.
Response:
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
id | String | Yes | Unique UUID of the workflow saved |
Get Extend BPMN Activites (from Catalog)
Get the detail informtion of the extend BPMN activities such as 'Stop Traffic', 'Stop VNF', 'Create VNF', etc.
These informations will describe the details of the activities which can be deployed to the workflow engine finally. At the same time the activity's detail information will be used to generate the BPMN artifacts.
URL:
GET http://{sdc-ip}:{port}/api/sdc/v1/workflow-modeler/ext-activities
Request:
Path Parameters:
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
id | String | Yes | Uniqued id of the extend bpmn activity. |
Response:
Return the detail information of the extend activities, that is ExtendActivity[]. For details to see data model 'ExtendActivity'.
Get Category Information of Extend BPMN Activities (from Catalog)
Get the category information of extend Activities. If the extend activities have category informations, the WF Designer will organize and display extend activities in categories.
URL:
GET http://{sdc-ip}:{port}/api/sdc/v1/workflow-modeler/ext-activity-categories
Request:
Query Parameters:
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
scene | Enum | Yes | the scene of the workflow designer. Valid value as follow: vnf - open a VNF's workflow service - open a Service's workflow | different scene may has different activities extend. |
Response:
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
nodes | Map<String, CategoryInfo> | Yes | Category Informations of the extend activities. key – extend activity id value - Category Information of the extend activity | |
categoryData | Map<String, CategoryData> | Yes | Category Data of the group. key - Category id value - Category Data |
CategoryInfo:
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
category | String | No | Category id of the extend activity. |
CategoryData:
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
name | String | Yes | Category name. | |
collapse | Boolean | No | Do you collapse this category by default? |
Data Model
WorkflowInfo
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
id | String | Yes | Unique UUID of the workflow | |
name | String | Yes | Name of the workflow | |
version | String | No | version of the workflow | |
description | String | No | description of the workflow | |
scene | Enum | Yes | the scene of the workflow designer. Valid value as follow: vnf - open a VNF's workflow service - open a Service's workflow | different scene may has different activities extend. |
data | Object | Yes | The workflow content | for new workflow, the data field maybe empty. |
Example:
{ "id":"activity-id", "name":"Upgrade Image", "version":"1.0", "description":"Upgrade Image", "scene":"vnf", "data":{ } }
ExtendActivity
Detail informtion of the extend activity.
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
id | String | Yes | id of the activity | |
name | String | Yes | name of the activity | |
description | String | No | description of the activity | |
icon | IConData | No | the icon to show | |
type | Enum | Yes | activity type, valid values as follow: serviceTask - Service(Java) Task scriptTask - Script Task restTask - Rest Task | |
activity | ServiceTask|ScriptTask|RestTask | Yes | Related bpmn task information of the extend activity. These information will be used by the workflow engine. | ServiceTask for Service(Java) Task, ScriptTask for Script Task, RestTask for Rest Task. |
IConData
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
name | String | Yes | Icon Name | |
width | integer | No | The width of the icon. | |
height | integer | No | The height of the icon. |
ServiceTask
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
class | String | Yes | The implement class of the bpmn service task | |
inputs | Map<String, Input> | No | The input parameter definitions of the task. key - Input parameter name value - Input parameter definition | These parameters will dispaly on UI for designer to fullfill. |
Example:
ScriptTask
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
scriptFormat | String | Yes | The script format, For example: javascript, groovy | |
script | String | Yes | The script content. |
Example:
[ { "id":"extend-activity-id-stop-vnf", "name":"Stop VNF", "description":"Stop VNF", "type":"scriptTask", "icon":{ "name":"stop-vnf", "width":56, "height":56 }, "activity":{ "scriptFormat":"Groovy", "script":"test groovy script" } } ]
RestTask (TBD)
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
url | String | No | The URL of the REST API exposed through the API router. | Choose between the 'url' field and ('name', 'version') filed. |
name | String | No | The microservcie name of the REST API. Only for the condition of access the REST API via MircoServiceBus. | |
version | String | No | The microservcie version of the REST API. Only for the condition of access the REST API via MircoServiceBus. | In the condition of access the REST API via MircoServiceBus, The workflow engine can query the URL of the REST API exposed through the MircoServiceBus by name and version. |
path | String | Yes | The path of the REST API relative to the API router exposed path. | |
method | Enum | Yes | The method of the rest api to be called while the activity be executed on the workflow engine. Valid value as follow: get, post, put, delete | |
headers | Map<Strting, String> | Yes | The header paramters of the rest api associated to the rest task. Map key is the header paramter name, such as 'Accept'.Map value is the header paramter name, such as ''application/json. | |
inputs | Map<String, Input> | No | The input parameter definitions of the task. key - Input parameter name value - Input parameter definition |
Input
Name | Data Type | Required | Description | Comment |
---|---|---|---|---|
type | Enum | Yes | data type of the input paramter. Valid value as follow: string, integer, float, boolean, enum | |
default | any | No | the default value of the input paramter. | |
required | boolean | Yes | Should the input paramter be necessary? true - necessary false - not necessary | |
constraints | ||||
displayName | String | No | Alias of the Input paramter only for displaying use. | If there is no alias, the original name will be displayed |
show | boolean | No | Is it displayed in the UI? | If false, this input parameter will be hided on the UI. |