📖
Rulecube documentation
v2.0
v2.0
  • Overview
  • Quick Start
  • Tutorial
    • Getting started
    • Create and Run Your First Ruleset
    • Use Constants and Methods
    • Create and Call Functions
    • Adding Testcases
    • Using Lookup Tables
    • Using Entities
  • How-to Guides
    • Logging in and Authorization
      • Activate Your Account From an Invitation
      • Log in to Rulecube
      • Change Your Password
      • Recover Your Password
      • Two-factor authentication (2FA)
      • Invite Other Users to Rulecube
      • Edit a User's Role
      • Delete a User
    • Ruleset Development
      • Create a Ruleset
      • Set the Input for a Ruleset
      • Create a Rule
      • Generate Alerts
      • Try out a Ruleset
      • Call a Ruleset from Your Software
      • Entities
        • Create an Entity
        • Drag and Drop a JSON Schema or XSD to create entities
        • Advanced topic: Entity instantiation
      • Constants
        • Constant Tables
      • Functions
      • Built-in Functions
      • Create and Run a Testcase
      • Delete a Ruleset or Components
      • Debugging your Ruleset
    • Create a Workflow
      • Workflow step types
      • Working with documents in a workflow
    • Work with (Environment) Variables
    • Call a Ruleset via Its API From Postman
    • Creating input from JSON Schema
    • Use a Ruleset from Your Software
    • Ruleset Productivity Tips
  • Language Reference
    • Global
    • Finance
    • Http
    • Mail
    • MongoDB
    • SQL
    • Statistics
    • Workflow
    • System
    • Array
    • Date
Powered by GitBook
On this page
  • Static properties
  • signal any
  • signalObject { [key: string]: any; }
  • tags { [key: string]: any; }
  • Methods
  • getInstanceId
  • createSignalUrl
  • createNextSignalUrl
  • sendHubSignal
  • queue
  • queueLibrary
  • setProgress
  1. Language Reference

Workflow

Workflow helper library.

Static properties

signal any

Signal data.

signalObject { [key: string]: any; }

Signal data as an object. If the signal data is not an object, this will be null.

tags { [key: string]: any; }

Metric tags to override the default tags for the generated alerts.

Methods

getInstanceId

getInstanceId()

Get the current workflow instance id.

Parameters

Return type

string

Examples

createSignalUrl

createSignalUrl(nextStep: string, token: any, title?: string)

Create a signal url.

Parameters

nextStep string

The ID or name of the next step.

token any

The token or signal data.

title string

(optional) The title of the signal.

Return type

string

Examples

createNextSignalUrl

createNextSignalUrl(token: any, title?: string)

Create a signal url using the configured next step.

Parameters

token any

The token or signal data.

title string

(optional) The title of the signal.

Return type

string

Examples

sendHubSignal

sendHubSignal(name: string, data: { [key: string]: any; })

Send a signal to all Hub clients connected to the workflow instance.

Parameters

name string

The name of the signal.

data { [key: string]: any; }

The data to send.

Return type

void

Examples

queue

queue(name: string, version: string, input: { [key: string]: any; }, options?: { [key: string]: any; }, tags?: string[])

Queue another workflow ruleset to start.

Parameters

name string

The name of the workflow ruleset.

version string

The version of the workflow ruleset.

input { [key: string]: any; }

The input data for the workflow.

options { [key: string]: any; }

(optional) The options for the workflow.

tags string[]

(optional) The tags for the workflow.

Return type

void

queueLibrary

queueLibrary(library: function, input: { [key: string]: any; }, options?: { [key: string]: any; }, tags?: string[])

Queue another workflow library ruleset to start.

Parameters

library function

The library that is a workflow ruleset.

input { [key: string]: any; }

The input data for the workflow.

options { [key: string]: any; }

(optional) The options for the workflow.

tags string[]

(optional) The tags for the workflow.

Return type

void

setProgress

setProgress(completed: number, total: number)

Set the progress of the workflow.

Parameters

completed number

The number of completed items.

total number

The total number of items.

Return type

void

PreviousStatisticsNextSystem

Last updated 2 years ago