Synapse TechSpecs: Plans

A Synapse Plan is a declarative workflow that is based on execution-result branching as part of a basic state machine. Plans are comprised of a series of hierarchical Actions, where each Action optionally specifies an Execution Case. The following is an extract from the documentation.

Contributing Author: Steve Shortt

Plan YAML

Name: myPlan
UniqueName: myPlan0123
Description: Runs important actions on nodes.
DefaultHandlerType: myLibrary.Utilities:SomeHandler
IsActive: true
Actions:
{Actions}
RunAs:
{SecurityContext}
Crypto:
KeyUri: {RSA key}
StartInfo:
RequestNumber: 12345
RequestUser: John Doe
Result:
{runtime data, emitted to ResultPlan}
InstanceId: {runtime data, emitted to ResultPlan}

Actions

An Action is a workflow process, which can essentially be anything. Synapse is extended by creating/invoking new, custom processes as required via runtime modules. Detailed information on Actions can be found here.

Name: Start Service
Proxy: http://remoteSynapseNodeUri
ExecuteCase: Success
Handler:
Type: myLibrary.Utilities:AnotherHandler
Config: {ParameterInfo}
Parameters: {ParameterInfo}
RunAs: {SecurityContext}
ActionGroup: {Single-node subtree of child Actions}
Actions: {Multi-node subtree of child Actions}
Result:
{runtime data, emitted to ResultPlan}
InstanceId: {runtime data, emitted to ResultPlan}

ParameterInfo

ParameterInfo blocks declare start-up configuration for Handler modules (Handler:Config), runtime invocation data for Handler methods (Action:Parameters), and start-up configuration for SecurityContext modules. ParameterInfo blocks can be inherited throughout Plans, and individual ParameterInfo Value settings can be overridden locally. Detailed information on Parameters can be found here.

Example YAML — YAML Values

Name: myYamlParms
Type: Yaml
Uri: http://foo
Values:
Custom: Data
DefinedBy: Requirements
Of:
Handler: Module
Expected: Input
Dynamic:
- Name: app
Path: Custom
- Name: type
Path: Of:Handler
ForEach:
- Path: DefinedBy
Values:
- x0
- x1
- x2
- Path: Of:Expected
Values:
- y0
- y1
- y2

Example YAML — XML Values

Type: Xml
Values: <xml attr="value1"><data>foo1</data></xml>
Dynamic:
- Name: app
Path: /xml[1]/data[1]
- Name: type
Path: /xml[1]/@attr

Example YAML — JSON Values

Type: Json
Uri: http://remoteSynapseNodeUri
Values:
{
"ApplicationName": "fooApp",
"EnvironmentName": "dev1",
"Tier": {
"Name": "webserver1",
"Type": "python1",
"Version": "1.0"
},
}
Dynamic:
- Name: app
Path: ApplicationName
Options:
- Key: 1
Value: barApp
- Key: 2
Value: blahApp
- Name: type
Path: Tier:Type

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.