Locking Tasks

You can lock tasks by using the Java API and web services. Locking a task prevents other users from working on it. When a task is locked, a lock icon appears on the task card in Workspace.

Summary of steps

To lock a task, perform the following tasks:

  1. Include project files.

  2. Create a TaskManager Client API object.

  3. Lock a task.

Include project files

Include necessary files into your development project. Because you are creating a client application by using Java, include the necessary JAR files.

Create a TaskManager Client API object

Before you can lock a task, you must create a TaskManager object.

Locking a task

To lock a task, reference the task by using its identifier. You can determine the task identifier by retrieving tasks that are assigned to a specific user.

Lock tasks using the Java API

Lock a task by using the Java API:

  1. Include project files

    Include client JAR files, such as adobe-taskmanager-client-sdk.jar, in your Java project’s class path.

  2. Create a TaskManager Client API object

    • Create a ServiceClientFactory object that contains connection properties.

    • Create a TaskManager object by invoking the TaskManagerClientFactory object’s static getTaskManager method and passing the ServiceClientFactory object.

  3. Locking a task

    Lock a task by invoking the TaskManager object’s lockTask method and passing the task identifier value. You can determine the task identifier by retrieving tasks that are assigned to a specific user.

Remarque : You can unlock a task by invoking the TaskManager object’s unlockTask method.

Lock tasks using the web service API

Lock a task by using the web service API:

  1. Include project files

    • Create a Microsoft .NET client assembly that consumes the TaskManager service WSDL. To create a proxy object that lets you invoke its operations by using Base64 encoding, specify this WSDL definition:

      http://localhost:8080/soap/services/TaskManagerService?WSDL
    • Reference the Microsoft .NET client assembly.

  2. Create a TaskManager Client API object

    • Using the Microsoft .NET client assembly, create a TaskManagerServiceService object by invoking its default constructor.

    • Set the TaskManagerServiceService object’s Credentials data member with a System.Net.NetworkCredential value that specifies the user name and password value.

  3. Locking a task

    Lock a task by invoking the TaskManagerServiceService object’s lockTask method and passing the task identifier value and a System.Boolean value that specifies true (this argument value informs the Task Manager service to use the task identifier value). You can determine the task identifier by retrieving tasks that are assigned to a specific user. (See Retrieving Tasks Assigned to Users.)

Remarque : You can unlock a task by invoking the TaskManagerServiceService object’s unlockTask method.