URL: /DMWorkflow/WaitSyncProcessesByIdProcess

Method: POST

Descrizione

Questo metodo consente di attendere sincroni che dei processi vengano completati.

Formato richieste

Legenda:
Parametro obbligatorio
Parametro opzionale
{
    'sessionID': SID,
    'idProcesses': ['C97F70F7-647A-4F53-A515-FFE0AD527263', '13C84243-E770-40FF-9266-F42F03D340DE'],
    'timeoutSeconds': 30,
    'pollingIntervalMs': 1000,
}

Note

  • timeoutSeconds: indica dopo quanti secondi la chiamata deve ritornare una risposta, anche se i processi sono ancora in esecuzione. Se il timeout scade, la risposta avrà il flag Timeout = true. Il valore massimo è pari a 5 minuti.
  • pollingIntervalMs: indica quanti millisecondi il sistema deve aspettare tra due ricerche consecutive per verificare se i processi sono terminati. Il valore minimo è pari a 1 secondo.

Formato risposte

{
    "HasError": false,
    "Error": "",
    "Timeout": false,
    "Processes": [
        {
            "Process": {
                "IdProcess": "a99b2855-d4e9-4b1c-a6b9-4660b7c97bbc",
                "Name": "My process name",
                "WorkStationId": null,
                "Priority": 0,
                "OwnerId": 3,
                "StartDt": "/Date(1605004383837)/",
                "EndDt": "/Date(1605004383977)/",
                "IdWorkflow": "e6acca62-b12f-4895-8b9f-ec9e0412b78a",
                "StorageId": "b1f833e7-e0cf-412f-bbb3-bb8d33412c21",
                "ProcessState": "Ended",
                "WFServiceInstanceId": "550471d1-b502-468e-fb35-c6abaa2d0bcf",
                "WFServiceWorkstationId": "DOCSMARSHAL",
                "WFServiceGetDt": "/Date(1605004382840)/",
                "InsertDt": "/Date(1605004380823)/",
                "IdRuntimeWorkflow": "f3953ae1-fef7-4e6e-9a0b-d39470265fb9",
                "ErrorMessage": "",
                "Message": "Operation completed",
                "CompletedPercentage": 100,
                "IdParentProcess": null,
                "ToBeDeleted": false,
                "ExternalId": "",
                "Debug": false,
                "CloneWf": true,
                "IdWorkflowEventTrigger": null,
                "EventType": null,
                "WFServerVersion": "2020.4"
            },
            "OutArguments": {
                "MyStringValue": "Test",
                "MyIntValue": 9,
                "MyDateTimeValue": "/Date(1605004383930)/",
                "MyBoolValue": true
            }
        }
    ]
}