"functionRef" and "refName" (#161)
* Rename 'functionref' to 'functionRef' * changing 'refname' to 'refName'
This commit is contained in:
parent
0e189d09a8
commit
d98b902c58
|
@ -235,7 +235,7 @@
|
|||
"action": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"functionref": {
|
||||
"functionRef": {
|
||||
"description": "References a reusable function definition to be invoked",
|
||||
"$ref": "#/definitions/functionref"
|
||||
},
|
||||
|
@ -252,7 +252,7 @@
|
|||
}
|
||||
},
|
||||
"required": [
|
||||
"functionref"
|
||||
"functionRef"
|
||||
]
|
||||
},
|
||||
"retry": {
|
||||
|
@ -309,7 +309,7 @@
|
|||
"type": "object",
|
||||
"description": "Function Reference",
|
||||
"properties": {
|
||||
"refname": {
|
||||
"refName": {
|
||||
"type": "string",
|
||||
"desription": "Name of the referenced function"
|
||||
},
|
||||
|
@ -319,7 +319,7 @@
|
|||
}
|
||||
},
|
||||
"required": [
|
||||
"refname"
|
||||
"refName"
|
||||
]
|
||||
},
|
||||
"branch": {
|
||||
|
|
|
@ -167,8 +167,8 @@ becomes the workflow data output (as it is an end state):
|
|||
"actionMode":"SEQUENTIAL",
|
||||
"actions":[
|
||||
{
|
||||
"functionref": {
|
||||
"refname": "greetingFunction",
|
||||
"functionRef": {
|
||||
"refName": "greetingFunction",
|
||||
"parameters": {
|
||||
"name": "$.greet.name"
|
||||
}
|
||||
|
@ -203,8 +203,8 @@ states:
|
|||
type: OPERATION
|
||||
actionMode: SEQUENTIAL
|
||||
actions:
|
||||
- functionref:
|
||||
refname: greetingFunction
|
||||
- functionRef:
|
||||
refName: greetingFunction
|
||||
parameters:
|
||||
name: "$.greet.name"
|
||||
actionDataFilter:
|
||||
|
@ -320,8 +320,8 @@ filters what is selected to be the state data output which then becomes the work
|
|||
},
|
||||
"actions":[
|
||||
{
|
||||
"functionref": {
|
||||
"refname": "greetingFunction",
|
||||
"functionRef": {
|
||||
"refName": "greetingFunction",
|
||||
"parameters": {
|
||||
"name": "$.greet.name"
|
||||
}
|
||||
|
@ -359,8 +359,8 @@ states:
|
|||
eventDataFilter:
|
||||
inputPath: "$.data.greet"
|
||||
actions:
|
||||
- functionref:
|
||||
refname: greetingFunction
|
||||
- functionRef:
|
||||
refName: greetingFunction
|
||||
parameters:
|
||||
name: "$.greet.name"
|
||||
stateDataFilter:
|
||||
|
@ -434,8 +434,8 @@ result of the workflow execution.
|
|||
"actionMode":"SEQUENTIAL",
|
||||
"actions":[
|
||||
{
|
||||
"functionref": {
|
||||
"refname": "solveMathExpressionFunction",
|
||||
"functionRef": {
|
||||
"refName": "solveMathExpressionFunction",
|
||||
"parameters": {
|
||||
"expression": "$.singleexpression"
|
||||
}
|
||||
|
@ -479,8 +479,8 @@ states:
|
|||
type: OPERATION
|
||||
actionMode: SEQUENTIAL
|
||||
actions:
|
||||
- functionref:
|
||||
refname: solveMathExpressionFunction
|
||||
- functionRef:
|
||||
refName: solveMathExpressionFunction
|
||||
parameters:
|
||||
expression: "$.singleexpression"
|
||||
end:
|
||||
|
@ -692,8 +692,8 @@ If the applicants age is over 18 we start the application (subflow state). Other
|
|||
"actionMode":"SEQUENTIAL",
|
||||
"actions":[
|
||||
{
|
||||
"functionref": {
|
||||
"refname": "sendRejectionEmailFunction",
|
||||
"functionRef": {
|
||||
"refName": "sendRejectionEmailFunction",
|
||||
"parameters": {
|
||||
"applicant": "$.applicant"
|
||||
}
|
||||
|
@ -742,8 +742,8 @@ states:
|
|||
type: OPERATION
|
||||
actionMode: SEQUENTIAL
|
||||
actions:
|
||||
- functionref:
|
||||
refname: sendRejectionEmailFunction
|
||||
- functionRef:
|
||||
refName: sendRejectionEmailFunction
|
||||
parameters:
|
||||
applicant: "$.applicant"
|
||||
end:
|
||||
|
@ -810,8 +810,8 @@ The data output of the workflow contains the information of the exception caught
|
|||
"actionMode":"SEQUENTIAL",
|
||||
"actions":[
|
||||
{
|
||||
"functionref": {
|
||||
"refname": "provisionOrderFunction",
|
||||
"functionRef": {
|
||||
"refName": "provisionOrderFunction",
|
||||
"parameters": {
|
||||
"order": "$.order"
|
||||
}
|
||||
|
@ -913,8 +913,8 @@ states:
|
|||
type: OPERATION
|
||||
actionMode: SEQUENTIAL
|
||||
actions:
|
||||
- functionref:
|
||||
refname: provisionOrderFunction
|
||||
- functionRef:
|
||||
refName: provisionOrderFunction
|
||||
parameters:
|
||||
order: "$.order"
|
||||
onError:
|
||||
|
@ -1029,8 +1029,8 @@ In the case job submission raises a runtime error, we transition to a SubFlow st
|
|||
"actionMode":"SEQUENTIAL",
|
||||
"actions":[
|
||||
{
|
||||
"functionref": {
|
||||
"refname": "submitJob",
|
||||
"functionRef": {
|
||||
"refName": "submitJob",
|
||||
"parameters": {
|
||||
"name": "$.job.name"
|
||||
}
|
||||
|
@ -1083,8 +1083,8 @@ In the case job submission raises a runtime error, we transition to a SubFlow st
|
|||
"actionMode":"SEQUENTIAL",
|
||||
"actions":[
|
||||
{
|
||||
"functionref": {
|
||||
"refname": "checkJobStatus",
|
||||
"functionRef": {
|
||||
"refName": "checkJobStatus",
|
||||
"parameters": {
|
||||
"name": "$.jobuid"
|
||||
}
|
||||
|
@ -1130,8 +1130,8 @@ In the case job submission raises a runtime error, we transition to a SubFlow st
|
|||
"actionMode":"SEQUENTIAL",
|
||||
"actions":[
|
||||
{
|
||||
"functionref": {
|
||||
"refname": "reportJobSuceeded",
|
||||
"functionRef": {
|
||||
"refName": "reportJobSuceeded",
|
||||
"parameters": {
|
||||
"name": "$.jobuid"
|
||||
}
|
||||
|
@ -1148,7 +1148,7 @@ In the case job submission raises a runtime error, we transition to a SubFlow st
|
|||
"actionMode":"SEQUENTIAL",
|
||||
"actions":[
|
||||
{
|
||||
"functionref": {
|
||||
"functionRef": {
|
||||
"name": "reportJobFailed",
|
||||
"parameters": {
|
||||
"name": "$.jobuid"
|
||||
|
@ -1184,8 +1184,8 @@ states:
|
|||
type: OPERATION
|
||||
actionMode: SEQUENTIAL
|
||||
actions:
|
||||
- functionref:
|
||||
refname: submitJob
|
||||
- functionRef:
|
||||
refName: submitJob
|
||||
parameters:
|
||||
name: "$.job.name"
|
||||
actionDataFilter:
|
||||
|
@ -1216,8 +1216,8 @@ states:
|
|||
type: OPERATION
|
||||
actionMode: SEQUENTIAL
|
||||
actions:
|
||||
- functionref:
|
||||
refname: checkJobStatus
|
||||
- functionRef:
|
||||
refName: checkJobStatus
|
||||
parameters:
|
||||
name: "$.jobuid"
|
||||
actionDataFilter:
|
||||
|
@ -1244,8 +1244,8 @@ states:
|
|||
type: OPERATION
|
||||
actionMode: SEQUENTIAL
|
||||
actions:
|
||||
- functionref:
|
||||
refname: reportJobSuceeded
|
||||
- functionRef:
|
||||
refName: reportJobSuceeded
|
||||
parameters:
|
||||
name: "$.jobuid"
|
||||
end:
|
||||
|
@ -1254,7 +1254,7 @@ states:
|
|||
type: OPERATION
|
||||
actionMode: SEQUENTIAL
|
||||
actions:
|
||||
- functionref:
|
||||
- functionRef:
|
||||
name: reportJobFailed
|
||||
parameters:
|
||||
name: "$.jobuid"
|
||||
|
@ -1376,8 +1376,8 @@ CloudEvent upon completion of the workflow could look like:
|
|||
"type": "OPERATION",
|
||||
"actions": [
|
||||
{
|
||||
"functionref": {
|
||||
"refname": "provisionOrderFunction",
|
||||
"functionRef": {
|
||||
"refName": "provisionOrderFunction",
|
||||
"parameters": {
|
||||
"order": "$.order"
|
||||
}
|
||||
|
@ -1428,8 +1428,8 @@ states:
|
|||
- name: DoProvision
|
||||
type: OPERATION
|
||||
actions:
|
||||
- functionref:
|
||||
refname: provisionOrderFunction
|
||||
- functionRef:
|
||||
refName: provisionOrderFunction
|
||||
parameters:
|
||||
order: "$.order"
|
||||
end:
|
||||
|
|
|
@ -50,8 +50,8 @@ So let's define a simple example workflow model and then add our custom extensio
|
|||
"actions":[
|
||||
{
|
||||
"name": "callFirstFunction",
|
||||
"functionref": {
|
||||
"refname": "firstFunction"
|
||||
"functionRef": {
|
||||
"refName": "firstFunction"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -69,8 +69,8 @@ So let's define a simple example workflow model and then add our custom extensio
|
|||
"actions":[
|
||||
{
|
||||
"name": "callSecondFunction",
|
||||
"functionref": {
|
||||
"refname": "secondFunction"
|
||||
"functionRef": {
|
||||
"refName": "secondFunction"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -608,7 +608,7 @@ Once defined actions finished execution, a transition to the next state can occu
|
|||
|
||||
| Parameter | Description | Type | Required |
|
||||
| --- | --- | --- | --- |
|
||||
| [functionref](#Functionref-Definition) | References a reusable function definition to be invoked | object | yes |
|
||||
| [functionRef](#FunctionRef-Definition) | References a reusable function definition to be invoked | object | yes |
|
||||
| timeout |Max amount of time (ISO 8601 format) to wait for the completion of the function's execution. For example: "PT15M" (wait 15 minutes), or "P2DT3H4M" (wait 2 days, 3 hours and 4 minutes) | integer | no |
|
||||
| [retry](#Retry-Definition) |Defines if function execution needs a retry | array | no |
|
||||
| [actionDataFilter](#action-data-filter) | Action data filter definition | object | no |
|
||||
|
@ -620,7 +620,7 @@ Once defined actions finished execution, a transition to the next state can occu
|
|||
"type": "object",
|
||||
"description": "Action Definition",
|
||||
"properties": {
|
||||
"functionref": {
|
||||
"functionRef": {
|
||||
"$ref": "#/definitions/functionref",
|
||||
"description": "References a reusable function definition to be invoked"
|
||||
},
|
||||
|
@ -640,7 +640,7 @@ Once defined actions finished execution, a transition to the next state can occu
|
|||
"$ref": "#/definitions/actiondatafilter"
|
||||
}
|
||||
},
|
||||
"required": ["functionref"]
|
||||
"required": ["functionRef"]
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -649,11 +649,11 @@ Once defined actions finished execution, a transition to the next state can occu
|
|||
Actions reference a reusable function definition to be invoked when this action is executed.
|
||||
They define a timeout wait period as well as a retry policy.
|
||||
|
||||
#### Functionref Definition
|
||||
#### FunctionRef Definition
|
||||
|
||||
| Parameter | Description | Type | Required |
|
||||
| --- | --- | --- | --- |
|
||||
| refname | Name of the referenced function | string | yes |
|
||||
| refName | Name of the referenced function | string | yes |
|
||||
| parameters | Parameters to be passed to the referenced function | object | no |
|
||||
|
||||
<details><summary><strong>Click to view JSON Schema</strong></summary>
|
||||
|
@ -663,7 +663,7 @@ They define a timeout wait period as well as a retry policy.
|
|||
"type": "object",
|
||||
"description": "Function Reference",
|
||||
"properties": {
|
||||
"refname": {
|
||||
"refName": {
|
||||
"type": "string",
|
||||
"description": "Name of the referenced function"
|
||||
},
|
||||
|
@ -673,7 +673,7 @@ They define a timeout wait period as well as a retry policy.
|
|||
}
|
||||
},
|
||||
"required": [
|
||||
"refname"
|
||||
"refName"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
@ -2035,8 +2035,8 @@ and the state is defined as:
|
|||
"actionMode":"SEQUENTIAL",
|
||||
"actions":[
|
||||
{
|
||||
"functionref": {
|
||||
"refname": "sendConfirmationFunction",
|
||||
"functionRef": {
|
||||
"refName": "sendConfirmationFunction",
|
||||
"parameters": {
|
||||
"orderNumber": "$.completedorder.orderNumber",
|
||||
"email": "$.completedorder.email"
|
||||
|
@ -2073,8 +2073,8 @@ states:
|
|||
type: OPERATION
|
||||
actionMode: SEQUENTIAL
|
||||
actions:
|
||||
- functionref:
|
||||
refname: sendConfirmationFunction
|
||||
- functionRef:
|
||||
refName: sendConfirmationFunction
|
||||
parameters:
|
||||
orderNumber: "$.completedorder.orderNumber"
|
||||
email: "$.completedorder.email"
|
||||
|
@ -2355,8 +2355,8 @@ output of the state to transition from includes an user with the title "MANAGER"
|
|||
"actionMode":"Sequential",
|
||||
"actions":[
|
||||
{
|
||||
"functionref":{
|
||||
"refname": "doLowRistOperationFunction"
|
||||
"functionRef":{
|
||||
"refName": "doLowRistOperationFunction"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -2377,8 +2377,8 @@ output of the state to transition from includes an user with the title "MANAGER"
|
|||
"actionMode":"Sequential",
|
||||
"actions":[
|
||||
{
|
||||
"functionref":{
|
||||
"refname": "doHighRistOperationFunction"
|
||||
"functionRef":{
|
||||
"refName": "doHighRistOperationFunction"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -2401,8 +2401,8 @@ states:
|
|||
type: OPERATION
|
||||
actionMode: Sequential
|
||||
actions:
|
||||
- functionref:
|
||||
refname: doLowRistOperationFunction
|
||||
- functionRef:
|
||||
refName: doLowRistOperationFunction
|
||||
transition:
|
||||
nextState: highRiskState
|
||||
expression:
|
||||
|
@ -2414,8 +2414,8 @@ states:
|
|||
type: DEFAULT
|
||||
actionMode: Sequential
|
||||
actions:
|
||||
- functionref:
|
||||
refname: doHighRistOperationFunction
|
||||
- functionRef:
|
||||
refName: doHighRistOperationFunction
|
||||
```
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -2771,8 +2771,8 @@ and then lets us know how to greet this customer in different languages. We coul
|
|||
},
|
||||
"actions":[
|
||||
{
|
||||
"functionref": {
|
||||
"refname": "greetingFunction",
|
||||
"functionRef": {
|
||||
"refName": "greetingFunction",
|
||||
"parameters": {
|
||||
"greeting": "$.languageGreetings.spanish",
|
||||
"customerName": "$.customer.name"
|
||||
|
@ -2974,8 +2974,8 @@ Let's take a look at a small example:
|
|||
"actionMode":"SEQUENTIAL",
|
||||
"actions":[
|
||||
{
|
||||
"functionref": {
|
||||
"refname": "throwRuntimeErrorFunction"
|
||||
"functionRef": {
|
||||
"refName": "throwRuntimeErrorFunction"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -3014,8 +3014,8 @@ states:
|
|||
end: false
|
||||
actionMode: SEQUENTIAL
|
||||
actions:
|
||||
- functionref:
|
||||
refname: throwRuntimeErrorFunction
|
||||
- functionRef:
|
||||
refName: throwRuntimeErrorFunction
|
||||
onError:
|
||||
- expression:
|
||||
language: spel
|
||||
|
@ -3081,8 +3081,8 @@ workflow definition. Let's take a look:
|
|||
"actionMode":"SEQUENTIAL",
|
||||
"actions":[
|
||||
{
|
||||
"functionref": {
|
||||
"refname": "throwRuntimeErrorFunction"
|
||||
"functionRef": {
|
||||
"refName": "throwRuntimeErrorFunction"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -3096,8 +3096,8 @@ workflow definition. Let's take a look:
|
|||
"actionMode":"SEQUENTIAL",
|
||||
"actions":[
|
||||
{
|
||||
"functionref": {
|
||||
"refname": "throwRuntimeErrorFunction"
|
||||
"functionRef": {
|
||||
"refName": "throwRuntimeErrorFunction"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
@ -3130,8 +3130,8 @@ states:
|
|||
end: false
|
||||
actionMode: SEQUENTIAL
|
||||
actions:
|
||||
- functionref:
|
||||
refname: throwRuntimeErrorFunction
|
||||
- functionRef:
|
||||
refName: throwRuntimeErrorFunction
|
||||
transition:
|
||||
nextState: doSomethingElse
|
||||
- name: HandleErrors2
|
||||
|
@ -3139,8 +3139,8 @@ states:
|
|||
end: false
|
||||
actionMode: SEQUENTIAL
|
||||
actions:
|
||||
- functionref:
|
||||
refname: throwRuntimeErrorFunction
|
||||
- functionRef:
|
||||
refName: throwRuntimeErrorFunction
|
||||
transition:
|
||||
nextState: doSomethingElse
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue