WorkflowThread
Overview
A Workflow, in a context of a specific data. You will use this object for reading and writing a workflow based on a specific context and data.
- From version: 2020.20
Properties
coordinates
coordinates: string
The coordinates are a delimited string that captures the exact data points that describe the context of the thread. For data cells and members the coordinates are a combination of members and measures that the workflow is related to.
createdBy
createdBy: Contact
The information of the user that created the thread.
entries
entries: Entry[]
The list of entries in the thread. Each workflow thread has a list of entries. All the entries represent the thread's changes over time.
expirationDate
expirationDate: Date
A date for the thread to be expired. An expired thread is hidden in the application.
hasDataSnapshot
hasDataSnapshot: boolean
A flag that indicates if a report snapshot should be added to the thread. Snapshots allow the report structure to be stored regardless of whether it changes in the future.
hasReportSnapshot
hasReportSnapshot: boolean
A flag that indicates if a report snapshot should be added to the thread. Snapshots allow the report structure to be stored regardless of whether it changes in the future.
id
id: string
The thread's unique id,
isEmailParticipents
isEmailParticipents: boolean
A flag that indicate if the thread's contacts will get an email when a new entry is added.
isReportSpecific
isReportSpecific: boolean
A flag that indicates if the thread is related to a specific report or slide. If this flag is false the user will see the thread in every report with the same data model and coordinates.
subtitle
subtitle: string
The thread's subtitle or description. The subtitle gives the user a larger understanding of what the thread is about.
title
title: string
The thread's title. The title gives the user a quick understanding of what the thread is about.
type
type: WorkflowThreadType
The source object driving the thread. A thread could be created on one of those contexts : Cell , Member , Document and Component. You can use this type to indicate the context the Thread was created on.
validation
validation: () => boolean
A function that is being used by the API infrastructure to indicate if a thread is valid for saving. You should use this to set a customize validation function to control when the thread is valid for saving or not.
Methods
addContacts
addContacts ( newContacts : Contact []): Promise<void>
This function adds contacts or users to the thread.
Parameters
-
newContacts:Contact[]
Array of Contacts - the contacts you want to add for the thread
Returns Promise<void>
addNewEntry
addNewEntry (): Entry
This function adds a new entry to the thread.
Returns Entry
Entry-The new Entry for you to add to the thread.
getContacts
getContacts (): Promise< Contact []>
Returns the list of contacts or users attached to a thread.
Returns Promise<Contact[]>
users in the app that get updates about the thread and can view it.
getEntriesByDate
getEntriesByDate ( startDate : Date): Entry []
This function returns all entries in a given thread from the specified date-time.
Parameters
Returns Entry[]
the entries from a time that is relevant for your need.
getLastEntries
getLastEntries ( count : number): Entry []
This function returns the last set of entries in a given thread. Set the count argument to specify the number to return.
Parameters
Returns Entry[]
Entries that was last added.
notifyChangeToContacts
notifyChangeToContacts (): Promise<void>
This function triggers the framework to notify all of a thread's contacts that there is an update for this thread.
Returns Promise<void>
removeContacts
removeContacts ( ids : string[]): Promise<void>
This function removes contacts from the thread.
Parameters
Returns Promise<void>
removeEntry
removeEntry ( entryId : string): void
This function removes the selected entry object from the thread's entries list.
Parameters
Returns void
removeThread
removeThread (): Promise<void>
This function removes a Thread by it's given id. You should use it when you require to remove the current thread or some other thread.
Returns Promise<void>
save
save (): Promise<void>
This function saves changes made to the thread object.
Returns Promise<void>