Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

SDC Component Diagram

...

Image RemovedImage Added

Sequence Diagram

...

Image Removedimage2018-1-25_18-47-38.pngImage Added

In this case, the Catalog plays a manager role of the workflows, it manage the designed workflows and  provide the Create/Updata/Query actions for 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:

Image RemovedImage Added

So, the rest APIs of '(ZTE) WF Designer' should be provided as follow:

  1. Open and Navigates to (ZTE) WF Designer


The rest APIs of Catalog should be provide by Amdocs/AT&T provided as follow:

  1. Get workflow JSON Workflow Content by WF ID

  2. Save Workflow Content with WF ID (to Catalog)
  3. Get Extend BPMN Activities Activites (from Catalog)
  4. Get Detail Category Information of a Extend BPMN Activity Activities (from Catalog)
  5. Save workflow JSON with WF ID (to Catalog)

  6. Store BPMN Artifact against WF ID:

...


Rest APIs of

...

(ZTE) WF Designer

...

Define the Rest APIs

  1. Open and Navigates to (ZTE) WF Designer
  2. Generate WF ID(s) BPMN Artifact

Rest APIs of (ZTE) WF Designer (Workflow Editor) :

Rest API definitions 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 (workflow manager) should create it first.  The Sequence Diagram shows as follow:

Image RemovedImage Added

URL:

Code Block
languagebash
GetGET httphttps://{wf-designer-ip}:{port}/workflow-modeler?operationID={operationID}&uuid={uuid}&id={id}&displayMode={view/modify/create}

Request:

Query Parameters:

The following attribute data transfers using Query Parameters

Name

Data Type

Required

Description

Comment

operationID

String

Y

The new generated ID of the operation

uuid

String

Y

Versioned identifier of the resource model (this uuid changed for every major version of the resource)

Ex.: b8ff69ca-786d-479e-9f9c-217a90ee0ebc

id

String

Yes

Y

Unique UUID of the workflow

operation

displayMode

Enum

Yes

Y

The

operation

Display Mode for the workflow, Valid value as follow:

view - can view only, can't modify. - OOS

modify - can

view and modify both.

modify workflow - OOS

create - can create the workflow

Response:

Navigate to the (ZTE) WF Designer UI, load the workflow data content with the given id from Catalog (Workflow Manager).

Generate WF ID(s) BPMN Artifact:

First, The generator call query API (see: Get workflow JSON by WF ID) to retrieve the json content of the workflow from Catalog.

Secend, The generator convert the data of the workflow from json format to BPMN format.

After then, the generator call save API (see: Store BPMN Artifact against WF ID) to save the BPMN content back to the  Catalog.

The Sequence for Generate BPMN Artifacts with WF ID(s) as follow:

Image Removed

Sequence Diagram, Rest API and Data Information for the Requirement

.

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:

Code Block
languagebash
POSTGET http://{wf-designersdc-ip}:{port}/api/sdc/v1/workflow-modeler/v1models/generateBPMN{id}

Request:

...

Path Parameters:

NameData TypeRequiredDescriptionComment
ids
idString
[]
Yes
ids
Unique UUID of the
workflows need to generate the BPMN Artifacts.
workflow

Response:

...

Rest APIs of Catalog (Workflow Manager):

Rest API definitions of Catalog (Workflow Manager), these APIs will be provided by Amdocs/AT&T.

...

Return the BPMN file content of the workflow in the format of string.

Save Workflow Content with artifactUUID(WF ID) (to Catalog)

Save workflow content to the Catalog.

URL:

Code Block
languagebash
GETPOST http://{sdc-ip}:{port}/api/sdc/v1/workflow-modeler/models/{id}

Request:

/catalog/resource/{uuid}/interfaces/{operationID}/artifacts/{artifactUUID}


Path Parameters:

The following attribute data will be transfer using path Parameters

...

Name

Data Type

Required

Description

CommentidStringYes

uuid

String

Y

Versioned identifier of the resource model (this uuid is changed for every major version of the resource)

Ex.: b8ff69ca-786d-479e-9f9c-217a90ee0ebc

operationID

String

Y

identifier of the operation

Ex.: b8ff69ca-786d-479e-9f9c-217a90ee0ebc

artifactUUID

 

String

Y

Unique UUID of the workflow

Response:

Return the information of the workflow in json format. see Sequence Diagram, Rest API and Data Information for the Requirement: for details.

Get Extend BPMN Activities (from Catalog):

Get the extend Activities such as 'Stop Traffic', 'Stop VNF', 'Create VNF', etc.

URL:

Code Block
languagebash
GET http://{sdc-ip}:{port}/api/sdc/v1/workflow-modeler/ext-activities

Request:

(WF ID)

Request (POST):

Request Headers

Header Name

Mandatory?

Description

Content-Type

Y

Valid value is : application/json

Content-MD5

 

Y

The value for this header must be the MD5 checksum over the whole json body

USERID

Y

The user ID of the SDC Designer.

This user must also have a Designer role in SDC

X-ECOMP-RequestID

N

According to the general ECOMP agreement the  "X-ECOMP-RequestID"  header with  the transaction UUID should be published  by ECOMP component calling an  exposed by  other  ECOMP component API in order to  make possible the  transaction traceability across ECOMP.  If it is not sent it will be automatically generated by SDC on request receipt.

X-ECOMP-InstanceID

Y

For auditing purpose each component calling the SDC API should identify itself by sending its  identity  (  e.g. Instar  name ...)

in  "X-ECOMP-InstanceID" header.

If this header with non-null value is not supplied the HTTP Request will be rejected with '400 Bad Syntax’ response code.

Ex.: “workflow”

Accept

N

Determines the format of the body of the response. Valid values are:  “application/octet-stream”

Authorization

Y

The username and password are formed into one string as “username: password”.  This string is then Base64 encoded to produce the encoded credential which is communicated in the header after the string “Authorization: Basic “.   If the Authorization header is missing, then an HTTP “401 Unauthorized” with ‘WWW-Authenticate’ header specifying the type of required client authentication and realm token will be returned. “401” response  should trigger  the  repeated  HTTP  request  sending with  “Authorization”  header containing the client ’s credentials.

 If  “Authorization”  header is received, but  the client‘s authentication fails  (  due to  either  unknown “username”  or invalid “password” )  the  “403 Forbidden”  response  code  will be  returned

Request Body

The body of the save request must be in a json format that specifies the metadata.

The workflow contents or artifacts. See WorkflowInfo

WorkflowInfo

...

Name

Data Type

Required

Description

CommentsceneEnumYes

the scene of the workflow designer. Valid value as follow:

resource - open a VNF's workflow

service - open a Service's workflow

different scene may has different activities extend.

Response:

...

activities

...

ExtendActivityBriefInfo[]

...

extend activity brief information list

Get Detail Information of a BPMN Activity (from Catalog):

URL:

Code Block
languagebash
GET http://{sdc-ip}:{port}/api/sdc/v1/workflow-modeler/ext-activities/{id}

Request:

Path Parameters:

...

id

...

Uniqued id of the extend bpmn activity.

Response:

Return the detail information of the extend activity. see ExtendActivity for details.

...

artifactName

String

Y

Name of the workflow

description

String

Y

description of the workflow

artifactType

String

Y

‘PLAN’

payloadData

String

Y

The workflow artifact or assets file.

The data of the artifact after Base64 encoding

Info
titleBase64

The resulting string is then encoded using the RFC2045-MIME variant of Base64


Response:

Response Headers

Header Name

Mandatory?

Description

Content-Type

Y

Determines the format of the response body.

Valid value is:  “application/json”

Content-Length

Y

Length of the response body

Response Body

Response body is sent as JSON object (Content-Type: application/json). 

Response Example

HTTP/1.1 200 OK

Content-MD5: NWQwZmZhZjFjNDc3NDFlZjkzMzBhZjcwN2YzODhjNDc=

Content-Type: application/json

X-ECOMP-RequestID: 3d3da579-455d-4dab-af4a-dc4ea60ff6ea

Content-Length: 893

Server: Jetty(9.3.6.v20151106)

{

"Response code":"500",

"Exception Code":"POL5000",

"Reason":" The POST request failed either due to internal SDC problem."

}
Http Response Code

Response code

Exception Code

Reason /Description

200

N/A

component is authenticated and list of Catalog Assets Metadata is saved.

400 

POL5001

Missing “ID” or “UUID” from HTTP header

404

SVC4063

Error: Requested resource was not found.

405

POL4050

Method Not Allowed:  Invalid HTTP method type used

500 

POL5000

The POST request failed either due to internal SDC problem.

Get Extend BPMN Activites (from Catalog)

Get the detail information of the extend BPMN activities such as 'Stop Traffic', 'Stop VNF', 'Create VNF', etc.

These information 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:

Code Block
languagebash
PUTGET http://{sdc-ip}:{port}/api/sdc/v1/workflow-modeler/models/{id}ext-activities

Request:

...

Path Parameters:

NameData TypeRequiredDescriptionComment
id
StringYes
Unique UUID

Uniqued id of the

workflow

...

extend bpmn activity.


Response:

The Return the detail information of the workflow in json format, see Sequence Diagram, Rest API and Data Information for the Requirement: for details.

Response:

...

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:

Code Block
languagebash
PUTGET http://{sdc-ip}:{port}/api/sdc/v1/workflow-modeler/models/{id}/bpmnext-activity-categories

Request:

...

Query Parameters:

NameData TypeRequiredDescriptionComment
id
scene
String
EnumYes
Unique UUID

the scene of the

workflow

...

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:

NameData TypeRequiredDescriptionComment
idString
nodesMap<String, CategoryInfo>Yes
Unique UUID

Category Informations of the

workflownameStringYesName for the workflowbpmnDataStringYesContnent of workflow in bpmn format

...

extend activities.

key – extend activity id

value - Category Information of the extend activity


categoryDataMap<String, CategoryData>Yes

Category Data of the group.

key - Category id

value - Category Data


CategoryInfo:
NameData TypeRequiredDescriptionComment
id
categoryString
Yes
No
Unique UUID

Category id of the

workflow saved

Data Information?

extend activity.


CategoryData

...

:
NameData TypeRequiredDescriptionComment
id
nameStringYes
Unique UUID of the workflow
name
String
YesName of the workflowversion
String
Noversion of the workflowdescription
String
Nodescription of the workflowsceneEnumYes

the scene of the workflow designer. Valid value as follow:

resource - open a VNF's workflow

service - open a Service's workflow

different scene may has different activities extend.data
String
YesContnent of the workflow in json format

ExtendActivityBriefInfo:

Brief informtion of the extend activity.

...

Name

...

Data Type

...

Required

...

Description

...

Comment

Category name.


collapseBooleanNoDo you collapse this category by default?
sample:
Code Block
languagexml
collapsetrue
{
    "nodes":{
        "extend-activity-id-stop-traffic":{
            "category":"aaa"
        },
        "extend-activity-id-stop-vnf":{
            "category":"bbb"
        }
    },
    "categoryData":{
        "aaa":{
            "name":"aaa",
            "collapse":false
        },
        "bbb":{
            "name":"bbb",
            "collapse":true
        }
    }
}


Data Model

ExtendActivity

...

id

...

String

...

Yes

...

id of the activity

...

name

...

String

...

Yes

...

name of the activity

...

description

...

String

...

No

...

String

...

No

...

Categorization to help better experience to the Designer while building the work-flow

...

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
category

icon
String
IConDataNo
Categorization to help better experience to the Designer while building the work-flow
the icon to show

type

Enum

Yes

activity type, valid values as follow:

java

serviceTask - Service(Java) Task

script

scriptTask - Script Task

rest

restTask - Rest Task

activity

content
JavaTask
ServiceTask|ScriptTask|RestTaskYes
Type related

Related bpmn task information of the extend activity. These information will be used by the workflow engine.

JavaTask
ServiceTask for Service(Java) Task, ScriptTask for Script Task, RestTask for Rest Task.

IConData

Name

Data Type

Required

Description

Comment

nameStringYesIcon Name

width

integer

No

The width of the icon.

...


heightintegerNoThe height of the icon.


ServiceTask

Name

Data Type

Required

Description

Comment

classStringYesThe implement class of the bpmn service task

inputs

Input[]

Map<String, Input>

No

The input parameter definitions of the

service

task.

key - Input parameter name

value - Input parameter definition

These parameters will dispaly on UI for designer to fullfill.
mappingInputsMappingInput[]NoThe mapping input parameter definitions of the service task. These parameters will tranform to the actual input parameters of the service task which will be executed on the workflow engine.Only define the relationshipe between the actual input parameter and the UI dispalyed input parameter of the bpmn task.

...

Sample:

Code Block
languagexml
collapsetrue
[
    {
        "id":"extend-activity-id-stop-traffic",
        "name":"Stop Traffic",
        "description":"Stop Traffic",
        "type":"serviceTask",
        "icon":{
            "name":"stop-traffic",
            "width":56,
            "height":56
        },
        "content":{
            "class":"org.onap.activity.ext.StopTrafficServiceTask",
            "inputs":{
                "param1":{
                    "type":"string",
                    "default":"value1",
                    "required":true,
                    "constraints":[

                    ],
                    "displayName":"aaa",
                    "show":true
                },
                "param2":{
                    "type":"string",
                    "default":"value2",
                    "required":false,
                    "constraints":[

                    ]
                }
            }
        }
    }
]


ScriptTask

Name

Data Type

Required

Description

Comment

format

scriptFormat

String

Yes

The

default

script format, For example:

javascript

JavaScript, groovy


script

String

Yes

The

default script content.

...

script content.


Sample:

Code Block
languagexml
collapsetrue
[
    {
        "id":"extend-activity-id-stop-vnf",
        "name":"Stop VNF",
        "description":"Stop VNF",
        "type":"scriptTask",
        "icon":{
            "name":"stop-vnf",
            "width":56,
            "height":56
        },
        "content":{
            "scriptFormat":"groovy",
            "script":"test groovy script"
        }
    }
]


RestTask (TBD)

Name

Data Type

Required

Description

Comment

url

baseUrl

String

No

The Base URL of the REST API exposed through the API router.

Choose between the 'url' field and ('name', 'version') filed.
name
serviceNameStringNo

The microservcie name of the REST API.

Only for the condition of access the REST API via MircoServiceBus.


versionStringNo

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.
pathStringYesThe 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

Input[]

Map<String, Input>

No

The input parameter definitions of the

rest

task.

These parameters will dispaly on UI for designer to fullfill.mappingInputsMappingInput[]NoThe mapping input parameter definitions of the rest task. These parameters will tranform to the actual input parameters of the rest task which will be executed on the workflow engine.Only define the relationshipe between the actual input parameter and the UI dispalyed input parameter of the bpmn task.

...

key - Input parameter name

value - Input parameter definition


Input

Name

Data Type

Required

Description

Comment

name

type

String

Yes

Input paramter name

dataType

Enum

Yes

data type of the input paramter. Such as: string


default

any

No

the default value

data type

of the input paramter.

Valid value as follow:

string, integer, float, boolean, enum


required

boolean

Yes

Should the input paramter be necessary?

true - necessary

false - not necessary

default

any

No

the default value of the input paramter.

enumValue

String[]

constraints





displayName

String

No

the enum value

Alias of the Input paramter only for displaying use.

only need when the dataType of the paramter is 'enum'.

MappingInput:

Define the relationshipe between the actual input parameter and the UI dispalyed input parameter of the bpmn task.

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.

Name

Data Type

Required

Description

Comment

name

String

Yes

The actual parameter name of the bpmn task.

valueTypeEnumYes

Type of the 'Value' field, Valid Value as follow:

fixed - fixed value, suck as 'abc', 123

reference - name of the UI displayed parameter referenced

valueanyNo

fixed value or UI displayed parameter name referenced. such as:

"abc" –fixed

123 --fixed

true –fixed

[Name] - UI displayed parameter name