harcon-flow
Advanced tools
Comparing version 2.6.0 to 2.6.5
@@ -44,2 +44,7 @@ const Assigner = require('assign.js') | ||
let skipIndex = def.indexOf('^') | ||
if ( skipIndex >= 0 ) { | ||
res.skipIf = def.substring( skipIndex + 1 ).trim() | ||
def = def.substring( 0, skipIndex ).trim() | ||
} | ||
if ( def.startsWith('*') ) { | ||
@@ -154,2 +159,3 @@ res.foreach = true | ||
message.domain = flowLink.source.domain | ||
message.actor = flowLink.source.actor | ||
@@ -167,3 +173,5 @@ message.message = flowLink.source.message | ||
type: flow.source.type, | ||
primers: flow.messages.map( function (message) { return message.actor + '.' + message.message } ), | ||
primers: flow.messages.map( function (message) { | ||
return { message: message.message, actor: message.actor, event: message.actor + '.' + message.message, domain: message.domain, foreach: message.foreach, external: message.external, fragmented: message.fragmented, skipIf: message.skipIf } | ||
} ), | ||
validation: flow.validation, | ||
@@ -170,0 +178,0 @@ timeout: flow.timeout |
{ | ||
"name": "harcon-flow", | ||
"version": "2.6.0", | ||
"version": "2.6.5", | ||
"description": "Small utility library to descript business flows for harcon", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -42,10 +42,15 @@ Harcon-flow is a simple utility library aiming to leverage a very simple syntax to define microtransaction between entities. | ||
or | ||
['*'] [domain '|'] [ interface ] actor : message | ||
['*' | '«' | '»'] [domain '|'] [ interface ] actor : message [ '^' actor.message ] | ||
``` | ||
The optional '*' sign means, that the result of the flow's main actor will be interpreted as array and for all elements that given message will be sent to as a series of operation. | ||
The optional | ||
'*' means: the result of the flow's main actor will be interpreted as array and for all elements that given message will be sent to as a series of operation. | ||
'«' means: external call. That message will be sent to an external endpoint. | ||
'»' means: fragmented execution. This message won't be included in the ongoing thread and current execution won't wait for the arrival of the answer, controll will step to the next message. | ||
Domain and interface specifications are optional. These information should be defined here only if no Flow definition exists assosiated to the given actor. | ||
A 'skip if' can be added to the end of the definition to declare, that the given message can be sent only if the 'actor.message' is performed and returned with approving answer. | ||
#### Control flow | ||
@@ -52,0 +57,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20673
400
184