Skip to content

3.3. Services

Ettiene Mare edited this page Mar 7, 2020 · 10 revisions

The services will encapsulate the generic functionality, making http calls for example.
The services will be provided to the activities, components, validators, pipes and other
services via the context object. Add the ctx as a field to your object to access
the Context object.

Examples

Activity

export class MyActivity implements Activity {
    name = "start";
    type = "my-activity";

    ctx?: Context;

    async execute(): Promise<boolean> {  
       doSomething();
    }
}

Component

class MyComponent extends HTMLElement {
    constructor() {
      super();

      this.shadow = this.attachShadow({mode: 'open'});
    }

    get ctx() { return this._ctx; }
    set ctx(value) { this._ctx = value; }
  
    ......
    ......
}

customElements.define('my-Component', MyComponent);

Services

Service Description
3.3.1. Workflow Workflow related actions like goto for example.
3.3.2. Analytics Analytics related functions.
3.3.3. Config Provide configured values like the url of the processes.
3.3.4. Model The interaction with the model.
3.3.5. Validator Perform validation on the controls on the page.
3.3.6. Http Encapsulates the http calls.

Home

  1. Setup

  2. Configure

  3. Design

    3.1.Introduction

    3.2. Core

    3.2.1. Workflow
    3.2.2. Analytics
    3.2.3. Messages

    3.3. Services

    3.3.1. Workflow
    3.3.2. Analytics
    3.3.3. Config
    3.3.4. Model
    3.3.5. Validator
    3.3.6. Http

    3.4. Validators

    3.4.1. Required
    3.4.2. Regex
    3.4.3. Range
    3.4.4. Custom

    3.5. Pipes

    3.5.1. Currency

    3.6. Activities

    3.6.1. Page
    3.6.2. Api
    3.6.3. Assign
    3.6.4. Decision
    3.6.5. Code
    3.6.6. IPC
    3.6.7. Finish
    3.6.8. Redirect
    3.6.9. Switch
    3.6.10. Custom

    3.7. Web Components

    3.7.1. React

Clone this wiki locally