Saltar al contendio prinicipal

State Data Model

Advertencia

Esta página aún no se encuentra traducida al español.

COTSMState

Description

States are different statuses or stages a task goes through in a workflow or state machine. The COTSMState data model contains a state's settings which detail how it passes to a next state.

JSON Sample

{
"__v": 3,
"_id": "61825dc53d5a23c4de1c5891",
"company": "61825e70d775394b54bc9801", //COTCompany
"createdAt": "2021-02-23T11:59:09.774Z",
"isActive": true,
"modifiedAt": "2021-10-29T18:07:56.959Z",
"next": [
{
"canChange": [
"manual"
],
"permissions": null,
"_id": "61825e3c4f81079320a7f394",
"target": "61825e4d2e6213cc574404ed", //COTSMState (Workflow)
"triggers": [], //COTParametrizedBot (Routine)
"requiredSurvey": null //COTSurvey (Survey)
},
],
"property": "61825e1fdf69d71cd50f28d5", //COTProperty (Element)
"stateMachine": "61825e1288d560b8d79c4bd5", //COTSMStateMachine (Workflow)
"subtask": {
"target": null, //COTSMStateMachine (Workflow)
"triggers": [] //COTParametrizedBot (Routine)
},
"surveyTriggers": [
{
"surveyId": "618261e9b754d9b1132b5a15", //COTSurvey (Survey)
"triggers": [] //COTParametrizedBot (Routine)
}
],
"taskGroup": "61825e1ab0a7fb03de08bdc2", //COTTaskGroup (Workflow Group)
"type": "new",
}

Fields

FieldDescriptionTypeNote
companyThe ID of the company the state is found in.ObjectId<COTCompany>
createdAtIndicates when the state was createdISODateYYYY-MM-DDTHH:mm:ss.SSSZ
isActiveIndicates if the state is active or not.boolean
modifiedAtIndicates the last time the state's configuration was modified.ISODateYYYY-MM-DDTHH:mm:ss.SSSZ
nextList of the possible states the task can change into from the current state.object[ ]Each object in the array represents a state the task can assume.
next[index].canChangeIndicates if and how a state change can occurr.string[ ]Enum: ["survey", "manual", "none"]
[Option details.] (/docs/documentation/admin/workflows/settings_panels/create_edit_state/#state-changes)
next[index].requiredSurveyPoints to a survey used for changing a task's state. Option available only is canChange is set to survey.ObjectId<COTSurvey>Setup information for [State Start Forms] (/docs/documentation/admin/workflows/admin_workflow_required_survey#required-survey-for-modifying-task-states)
next[index].targetThe state the task changes into.ObjectId<COTSMState>
next[index].triggersConfiguration of the routine that accompanies the state change.COTParametrizedBot[ ]NOTE: If this routine is set, it is up to the routine to change the state.
propertyThe state's property or element ID.ObjectId<COTProperty>
stateMachineThe state machine or workflow the state belongs to.ObjectId<COTSMStateMachine>
subtaskRepresents an available subtask.object
subtask.targetPoints to a workflow used as a subtask.ObjectId<COTSMStateMachine>
subtask.triggersConfiguration of the routine that accompanies the subtask creation.COTParametrizedBot[ ]
surveyTriggersSurveys that accompany a workflow's state change.object[ ]
surveyTriggers[index].surveyIdSurvey IDObjectId<COTSurvey>
surveyTriggers[index].triggersConfiguration of the routine that accompanies the survey trigger.COTParametrizedBot[ ]
taskGroupThe task group or workflow group the state belongs to.ObjectId<COTTaskGroup>
typeIndicates the state type.stringEnum: ["new", "in-progress", or "closed"]
Option details

Deprecated

FieldDescriptionTypeNote
iconstringDEPRECATED

Additional Resources

Help