Search Results for

    Show / Hide Table of Contents

    Method CloseTask

    CloseTask(String, String, String, Boolean, String)

    Close a process task

    Declaration
    ProcessContract CloseTask(string connectionId, string processId, string comment, bool assignUsers, string taskId)
    Parameters
    Type Name Description
    System.String connectionId

    The connection id to identify your connection. See also ConnectionId

    System.String processId

    The process id. See also Id

    System.String comment

    Optional: Comment to add. See also Comments

    System.Boolean assignUsers

    assign to users

    System.String taskId

    Task id.

    Returns
    Type Description
    ProcessContract

    Process

    Remarks
    • You need "Change process" access right (01002078-38a7-11d8-a902-0050bf427e8f) for the protection domain. See also GetSecurityStore(String)
    • Process status must be open.
    • If custom property "PreventCloseTaskWithCheckedOutDocument" is set to "true" no checked out documents are allowed.
    Examples

    POST http://YourServerName/InfoShare/Json/Process/CloseTask

    Example for close a task.

    {
       "connectionId": "831ff0cd-6a36-4831-ae98-c66f54e8079b",
       "processId": "18091c86-96df-e911-a949-00155d290a08",
       "comment": "Close a process",
       "assignUsers": true
    }

    Response:

    { 
       "CloseTaskResult": {
         "AccessRightsEnumList": ["CheckOut", "EditProcess", "Delete"],
         "CheckOutStateEnum": "NotCheckedOut",
         "CheckOutUserId": "00000000-0000-0000-0000-000000000000",
         "Comments": [],
         "CompletedDate": null,
         "CompletedTasks": [{
           "Action": "Kontieren",
           "AssignedUserIds": ["2cd4ad99-bacf-e911-a939-00155d290a08"],
           "Comments": [],
           "CompletedDate": "2019-09-25T14:05:34",
           "CompletedUserIds": ["0100a003-38a7-11d8-a902-0050bf427e8f"],
           "CreatedDate": "2019-09-25T13:55:40",
           "CreatorId": "2cd4ad99-bacf-e911-a939-00155d290a08",
           "Description": "Account assignment",
           "DueDate": "2019-09-28T13:55:40",
           "Id": "10297328-9cdf-e911-a949-00155d290a08",
           "IntendedUserIds": [],
           "ReminderDate": "2019-09-25T13:55:40",
           "RequiresAllRecipients": false,
           "ShowCloseTaskDialog": false,
           "StatusEnum": "Complete",
           "TaskTemplateId": "92b13f55-e7b6-46ec-98b0-034d7ef5a8fe" }],
         "CreatedDate": "2019-09-25T13:55:40",
         "CurrentTask": {
           "Action": "Finanz",
           "AssignedUserIds": [],
           "Comments": [],
           "CompletedDate": null,
           "CompletedUserIds": [],
           "CreatedDate": "2019-09-25T14:05:34",
           "CreatorId": "2cd4ad99-bacf-e911-a939-00155d290a08",
           "Description": "Release by finance department",
           "DueDate": "2019-09-26T14:05:34",
           "Id": "76deda85-9ddf-e911-a949-00155d290a08",
           "IntendedUserIds": ["0100a003-38a7-11d8-a902-0050bf427e8f", "2cd4ad99-bacf-e911-a939-00155d290a08"],
           "ReminderDate": "2019-09-25T14:05:34",
           "RequiresAllRecipients": false,
           "ShowCloseTaskDialog": false,
           "StatusEnum": "Open",
           "TaskTemplateId": "a303e6f6-2c5c-42a8-bdb2-071cb928ae56" },
         "CustomProperties": [],
         "DocumentIds": ["27b61621-9cdf-e911-a949-00155d290a08"],
         "DueDate": "2019-09-27T13:55:39",
         "Id": "79247328-9cdf-e911-a949-00155d290a08",
         "Name": {
           "Values": [{
             "Culture": "de",
             "Text": "Rechnungen" }, {
             "Culture": "en",
             "Text": "Invoice" }] },
         "PluginStream": [],
         "PriorityEnum": "Normal",
         "ProcessTemplateId": "24a927d1-21d2-e911-a93c-00155d290a08",
         "Properties": [{
           "PropertyTypeId": "760fa49a-c1cf-e911-a939-00155d290a08",
           "Values": [] }, {
           "PropertyTypeId": "3ecaf07d-c1cf-e911-a939-00155d290a08",
           "Values": ["8789"] } ,{
           "PropertyTypeId": "01000038-38a7-11d8-a902-0050bf427e8f",
           "Values": ["2019-09-26T14:05:00"] }, {
           "PropertyTypeId": "0100003d-38a7-11d8-a902-0050bf427e8f",
           "Values": ["a303e6f6-2c5c-42a8-bdb2-071cb928ae56"] }],
         "ProtectionDomainId": "0100a000-38a7-11d8-a902-0050bf427e8f",
         "StatusEnum": "Open" }
    }
    Exceptions
    Type Condition
    ServiceException

    The connection id {connectionId} isn't valid or has expired (10008)

    ServiceException

    No process found for processId {processId} (10015)

    ServiceException

    Unknown data type for property type (10035)

    ServiceException

    Operation {operationName} not allowed. Missing AccessOperationId {operationId}. (10114)

    ServiceException

    Process already closed (10115)

    ServiceException

    Verification code is needed: Verification code not yet verified (10152)

    ServiceException

    EndPoint not found: {0} (10188)

    ServiceException

    Wrong TaskId {0} (10202)

    ServiceException

    Process has checked out documents. (10226)

    ServiceException

    User is not a task recipient (10228)

    ServiceException

    Web service is not available {url} (10220)

    ServiceException

    Web service failed {soapException} (10221)

    Back to top Copyright © Kendox