Utility commands for SHAR development and workflow management.

Subcommands

contact-sheet

Creates a BPMN contact sheet (reference document) from service task YAML files.

Usage:

shar util contact-sheet [task_yaml_files...] [flags]

Arguments:

  • task_yaml_files - One or more service/user task YAML files

Flags:

  • --output <filename> - Output filename for the BPMN file (default: “ContactSheet.xml”)

Example:

shar util contact-sheet task1.yaml task2.yaml --output MyContactSheet.xml

Output: Creates a BPMN XML file containing a visual reference of all the service tasks.


extract-tasks

Extracts service task definitions from BPMN XML files and generates YAML specification files.

Usage:

shar util extract-tasks [bpmn_files...]

Arguments:

  • bpmn_files - One or more BPMN XML files to extract tasks from

Example:

shar util extract-tasks workflow1.bpmn workflow2.bpmn

Output: Creates .serviceTask.yaml files for each service task found in the BPMN files. If existing task files are found, they are updated rather than overwritten.


create-service

Creates a template service application from service task specifications.

Usage:

shar util create-service [task_spec_files...] [flags]

Arguments:

  • task_spec_files (optional) - Service task YAML specification files. If not provided, looks for specs in <output>/spec/ directory

Flags:

  • --output <path> - Path for the service to create (default: “service1”)
  • --overwrite - Overwrite existing files. If set, existing user files will be overwritten or deleted

Example:

# Create service from task specs
shar util create-service task1.yaml task2.yaml --output my-service

# Create/update service from specs in existing project
cd my-service
shar util create-service --overwrite

Output: Generates a complete Go service application with:

  • cmd/<service-name>/main.go - Main entry point
  • implement/*.go - Implementation files for each task (not overwritten by default)
  • internal/*.go - Generated helper code (always regenerated)
  • spec/*.go - Task specification loader
  • go.mod - Go module file

template-task

Creates an example service task YAML template.

Usage:

shar util template-task <service_task_name>

Arguments:

  • service_task_name - Name for the service task (.yaml extension is optional)

Example:

shar util template-task EmailNotification
shar util template-task MyTask.yaml

Output: Creates a new YAML file with a template service task definition that can be customized.