File

C:/GoDev/src/TCSTK-Angular/projects/tibco-tcstk/tc-liveapps-lib/src/lib/components/live-apps-case-creator-widget/live-apps-case-creator-widget.component.ts

Description

Wraps case creators component (high level component)

Implements

OnInit

Example

<tcla-live-apps-case-creator-widget></tcla-live-apps-case-creator-widget>

Metadata

selector tcla-live-apps-case-creator-widget
styleUrls ./live-apps-case-creator-widget.component.css
templateUrl ./live-apps-case-creator-widget.component.html

Index

Properties
Methods
Inputs
Outputs

Constructor

constructor()

Inputs

application
Type : CaseType

CaseType model for the case type you want to run a case creator for (normally comes from an application selector component)

customFormDefs
Type : CustomFormDefs

Custom Form configuration file

initialData
Type : any

override the initial data for a case creator

sandboxId
Type : number

sandboxId - this comes from claims resolver

uiAppId
Type : string

The Application ID of the UI (should ideally be unique as it is shared state key)

Outputs

caseCreated
Type : EventEmitter<ProcessId>

~event caseCreated : Case Creator started (process started) ~payload ProcessId : ProcessId object output on case creation (details of process started)

Methods

ngOnInit
ngOnInit()
Returns : void

Properties

Public handleCaseCreation
Default value : () => {...}
import {Component, EventEmitter, Input, OnChanges, OnInit, Output} from '@angular/core';
import {CaseType, ProcessId} from '../../models/liveappsdata';
import {LaProcessSelection} from '../../models/tc-case-processes';
import {CustomFormDefs} from '@tibco-tcstk/tc-forms-lib';

/**
 * Wraps case creators component (high level component)
 *
 *@example <tcla-live-apps-case-creator-widget></tcla-live-apps-case-creator-widget>
 */
@Component({
  selector: 'tcla-live-apps-case-creator-widget',
  templateUrl: './live-apps-case-creator-widget.component.html',
  styleUrls: ['./live-apps-case-creator-widget.component.css']
})
export class LiveAppsCaseCreatorWidgetComponent implements OnInit {
  /**
   * CaseType model for the case type you want to run a case creator for (normally comes from an application selector component)
   */
  @Input() application: CaseType;

  /**
   * sandboxId - this comes from claims resolver
   */
  @Input() sandboxId: number;

  /**
   * The Application ID of the UI (should ideally be unique as it is shared state key)
   */
  @Input() uiAppId: string;

  /**
   * override the initial data for a case creator
   */
  @Input() initialData: any;

  /**
   * Custom Form configuration file
   */
  @Input() customFormDefs: CustomFormDefs;


  /**
   * ~event caseCreated : Case Creator started (process started)
   * ~payload ProcessId : ProcessId object output on case creation (details of process started)
   */
  @Output() caseCreated: EventEmitter<ProcessId> = new EventEmitter<ProcessId>();
  constructor() { }

  // handle case created
  public handleCaseCreation = (processId: ProcessId) => {
    this.caseCreated.emit(processId);
  }

  ngOnInit(): void {
  }

}
<div>
  <div fxLayout="row" fxLayout="start stretch">
    <span style="width: 185px">Select Case Creator: </span>
    <tcla-live-apps-creators fxFlex [sandboxId]="sandboxId" [applicationId]="application.id" [typeId]="application.id" (caseCreated)="handleCaseCreation($event)"></tcla-live-apps-creators>
  </div>
</div>

./live-apps-case-creator-widget.component.css

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""