URL: /DMWorkflow/StartSyncManualEventByExternalId

Method: POST

Descrizione

Questo metodo consente di lanciare un evento manuale e attendere sincroni che i processi lanciati vengano completati.

Formato richieste

Legenda:
Parametro obbligatorio
Parametro opzionale
{
    'sessionID': SID,
    'ExternalIdWorkflowEvent': 'external id workflow event',
    'timeoutSeconds': 30,
    'pollingIntervalMs': 1000,
    'parameters':
    [
        {
            'Name': 'field external id',
            'Value': 'field value',
            'ValueType': 'Int/String/Date/DateTime/Decimal/ByteArray/MultiLanguage/Boolean/Guid',
            'ValueFormat': 'yyyy-MM-dd',
            'ValueCultureInfoName': 'it-IT'
        },
        {...},
        {...}
    ]
}

Note

  • ValueFormat: se ValueType è Date o DateTime, definisce il formato utilizzato. Vedere la pagina MSDN per i dettagli.
  • ValueCultureInfoName: influisce sul modo in cui i valori numerici vengono parsati.
  • timeoutSeconds: indica dopo quanti secondi la chiamata deve ritornare una risposta, anche se i processi lanciati 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.
  • Dato che un ExternalId non è univoco, questa chiamata può generare più processi.

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
            }
        }
    ]
}