(_id: Ref<MasterTag>)
| 187 | |
| 188 | /** Exports all processes associated with a MasterTag. */ |
| 189 | export function exportProcesses (_id: Ref<MasterTag>): ExportResult { |
| 190 | const docs: Doc[] = [] |
| 191 | const required: Array<Ref<Class<Doc>>> = [] |
| 192 | const client = getClient() |
| 193 | const m = client.getModel() |
| 194 | const processes = m.findAllSync(processPlugin.class.Process, { masterTag: _id }) |
| 195 | for (const proc of processes) { |
| 196 | const res = exportProcess(proc, false) |
| 197 | docs.push(...res.docs) |
| 198 | for (const req of res.required) { |
| 199 | if (!required.includes(req)) required.push(req) |
| 200 | } |
| 201 | } |
| 202 | return { docs, required } |
| 203 | } |
| 204 | |
| 205 | /** |
| 206 | * Exports a single process into a portable template. |
nothing calls this directly
no test coverage detected