{
    "name": "Проверка рабочего времени",
    "description": "Процесс Routena, массово импортированный из Sensei.",
    "source": {
        "system": "sensei",
        "process_id": "20791",
        "entry_node_id": "477317",
        "sensei_process_id": "20791",
        "sensei_version_id": "377706",
        "sensei_version_kind": "deployed",
        "is_copy": false
    },
    "start": "sensei_832329",
    "nodes": {
        "sensei_832329": {
            "type": "if",
            "config": {
                "conditions": [
                    [
                        {
                            "operator": "in",
                            "left": {
                                "source": "lead_property",
                                "property": "responsible_user_id"
                            },
                            "right": {
                                "source": "responsible_reference_id",
                                "id": 11043238
                            }
                        }
                    ]
                ]
            },
            "on_true": "sensei_832331",
            "on_false": "sensei_1437926"
        },
        "sensei_1437926": {
            "type": "if",
            "config": {
                "conditions": [
                    [
                        {
                            "operator": "in",
                            "left": {
                                "source": "lead_property",
                                "property": "responsible_user_id"
                            },
                            "right": {
                                "source": "responsible_reference_id",
                                "id": 12670974
                            }
                        }
                    ]
                ]
            },
            "on_true": "sensei_477318",
            "on_false": "sensei_1437928"
        },
        "sensei_1437928": {
            "type": "multicondition",
            "config": {
                "branches": [
                    {
                        "code": "branch_0",
                        "name": "Рабочий интервал",
                        "next": "sensei_477319",
                        "otherwise": false,
                        "conditions": [
                            [
                                {
                                    "operator": "between",
                                    "left": {
                                        "source": "current_minute_of_day"
                                    },
                                    "right": {
                                        "source": "literal",
                                        "value": {
                                            "min": 600,
                                            "max": 1140
                                        }
                                    }
                                }
                            ]
                        ]
                    },
                    {
                        "code": "branch_1",
                        "name": "Вечер рабочего дня",
                        "next": "sensei_477321",
                        "otherwise": false,
                        "conditions": [
                            [
                                {
                                    "operator": "between",
                                    "left": {
                                        "source": "current_minute_of_day"
                                    },
                                    "right": {
                                        "source": "literal",
                                        "value": {
                                            "min": 1140,
                                            "max": 1439
                                        }
                                    }
                                }
                            ]
                        ]
                    },
                    {
                        "code": "branch_2",
                        "name": "Иначе",
                        "next": "sensei_832334",
                        "otherwise": true
                    }
                ]
            }
        },
        "sensei_832334": {
            "type": "field",
            "config": {
                "fields": [
                    {
                        "field_name": "Дата и время задачи",
                        "value": {
                            "source": "today",
                            "add_seconds": 36300
                        },
                        "field_id": 1124131
                    }
                ],
                "local_parameters": [],
                "status_update": null
            },
            "next": "sensei_477322"
        },
        "sensei_477322": {
            "type": "end",
            "config": {
                "result_code": "sensei_result_2ca3d8f43108",
                "result_name": "Задача поставлена на рабочее время"
            }
        },
        "sensei_477321": {
            "type": "field",
            "config": {
                "fields": [
                    {
                        "field_name": "Дата и время задачи",
                        "value": {
                            "source": "today",
                            "add_seconds": 124200
                        },
                        "field_id": 1124131
                    }
                ],
                "local_parameters": [],
                "status_update": null
            },
            "next": "sensei_477322"
        },
        "sensei_477319": {
            "type": "field",
            "config": {
                "fields": [
                    {
                        "field_name": "Дата и время задачи",
                        "value": {
                            "source": "now",
                            "add_seconds": 900
                        },
                        "field_id": 1124131
                    }
                ],
                "local_parameters": [],
                "status_update": null
            },
            "next": "sensei_477320"
        },
        "sensei_477320": {
            "type": "end",
            "config": {
                "result_code": "sensei_result_18835a32e9b0",
                "result_name": "Рабочий день, время ок"
            }
        },
        "sensei_477318": {
            "type": "multicondition",
            "config": {
                "branches": [
                    {
                        "code": "branch_0",
                        "name": "Рабочий интервал",
                        "next": "sensei_477319",
                        "otherwise": false,
                        "conditions": [
                            [
                                {
                                    "operator": "between",
                                    "left": {
                                        "source": "weekday"
                                    },
                                    "right": {
                                        "source": "literal",
                                        "value": {
                                            "min": 0,
                                            "max": 4
                                        }
                                    }
                                },
                                {
                                    "operator": "between",
                                    "left": {
                                        "source": "current_minute_of_day"
                                    },
                                    "right": {
                                        "source": "literal",
                                        "value": {
                                            "min": 600,
                                            "max": 1140
                                        }
                                    }
                                }
                            ]
                        ]
                    },
                    {
                        "code": "branch_1",
                        "name": "Вечер рабочего дня",
                        "next": "sensei_477321",
                        "otherwise": false,
                        "conditions": [
                            [
                                {
                                    "operator": "between",
                                    "left": {
                                        "source": "weekday"
                                    },
                                    "right": {
                                        "source": "literal",
                                        "value": {
                                            "min": 6,
                                            "max": 3
                                        }
                                    }
                                },
                                {
                                    "operator": "between",
                                    "left": {
                                        "source": "current_minute_of_day"
                                    },
                                    "right": {
                                        "source": "literal",
                                        "value": {
                                            "min": 1140,
                                            "max": 1439
                                        }
                                    }
                                }
                            ]
                        ]
                    },
                    {
                        "code": "branch_2",
                        "name": "утро рабочего дня",
                        "next": "sensei_477323",
                        "otherwise": false,
                        "conditions": [
                            [
                                {
                                    "operator": "between",
                                    "left": {
                                        "source": "current_minute_of_day"
                                    },
                                    "right": {
                                        "source": "literal",
                                        "value": {
                                            "min": 0,
                                            "max": 600
                                        }
                                    }
                                },
                                {
                                    "operator": "between",
                                    "left": {
                                        "source": "weekday"
                                    },
                                    "right": {
                                        "source": "literal",
                                        "value": {
                                            "min": 0,
                                            "max": 4
                                        }
                                    }
                                }
                            ]
                        ]
                    },
                    {
                        "code": "branch_3",
                        "name": "Иначе",
                        "next": "sensei_1437927",
                        "otherwise": true
                    }
                ]
            }
        },
        "sensei_1437927": {
            "type": "responsible",
            "config": {
                "assign_lead": true,
                "assign_main_contact": true,
                "assign_non_main_contacts": true,
                "assign_tasks": true,
                "responsible_user_name": "Ульяна Мочальская"
            },
            "next": "sensei_477322"
        },
        "sensei_477323": {
            "type": "field",
            "config": {
                "fields": [
                    {
                        "field_name": "Дата и время задачи",
                        "value": {
                            "source": "today",
                            "add_seconds": 32400
                        },
                        "field_id": 1124131
                    }
                ],
                "local_parameters": [],
                "status_update": null
            },
            "next": "sensei_477322"
        },
        "sensei_832331": {
            "type": "multicondition",
            "config": {
                "branches": [
                    {
                        "code": "branch_0",
                        "name": "Рабочий интервал",
                        "next": "sensei_832332",
                        "otherwise": false,
                        "conditions": [
                            [
                                {
                                    "operator": "between",
                                    "left": {
                                        "source": "current_minute_of_day"
                                    },
                                    "right": {
                                        "source": "literal",
                                        "value": {
                                            "min": 600,
                                            "max": 1140
                                        }
                                    }
                                }
                            ]
                        ]
                    },
                    {
                        "code": "branch_1",
                        "name": "Вечер",
                        "next": "sensei_832333",
                        "otherwise": false,
                        "conditions": [
                            [
                                {
                                    "operator": "between",
                                    "left": {
                                        "source": "current_minute_of_day"
                                    },
                                    "right": {
                                        "source": "literal",
                                        "value": {
                                            "min": 600,
                                            "max": 1439
                                        }
                                    }
                                }
                            ]
                        ]
                    },
                    {
                        "code": "branch_2",
                        "name": "Иначе",
                        "next": "sensei_832334",
                        "otherwise": true
                    }
                ]
            }
        },
        "sensei_832333": {
            "type": "field",
            "config": {
                "fields": [
                    {
                        "field_name": "Дата и время задачи",
                        "value": {
                            "source": "today",
                            "add_seconds": 122700
                        },
                        "field_id": 1124131
                    }
                ],
                "local_parameters": [],
                "status_update": null
            },
            "next": "sensei_477322"
        },
        "sensei_832332": {
            "type": "field",
            "config": {
                "fields": [
                    {
                        "field_name": "Дата и время задачи",
                        "value": {
                            "source": "now",
                            "add_seconds": 300
                        },
                        "field_id": 1124131
                    }
                ],
                "local_parameters": [],
                "status_update": null
            },
            "next": "sensei_477320"
        }
    },
    "process_key": "working_hours"
}
