/
library_program_task_set ()

library_program_task_set ()

Function prototype

library_program_task_set( session, task )

API Version

All

Supported interfaces

SOAP

Description

Modifies details of a TASK TEMPLATE

Required permissions: One of the following conditions must be true to allow the modification of a TASK TEMPLATE:

  • The active user is super-administrator

  • The active user must have role PROGRAM EDITOR in the PROGRAM that contains the TASK TEMPLATE and the PROGRAM has not been published yet (“draft” version). Only the super administrator can modify TASK TEMPLATES in PROGRAMS that have already been published

Otherwise an INSUFFICIENT_PRIVILEGES error will be returned.

Input parameters:

  • session: is the session token obtained in the session_init() call

  • task: an XML with the fields that should be modified:

    • ref: reference of the workplan (not task)

    • code: TASK_CODE for task

    • name: name of task in active session language

    • description: description of task in active session language

    • category: category of task

    • type: type of task (COM/CUE/DIS)

    • device_type: type of device in case if the task is DIS (device) task

      • 0 - PULSI CONTINUA

      • 1 - PULSI

      • 12 - SPIRO

      • 13 - ACTIVITY (STEPS)

    • extraction

    • image_info: Image associated to the TASK TEMPLATE OBJECT. The image is stored as a LIBRARY RESOURCE OBJECT

Output parameters:

  • result: reference of the WORKPLAN modified

  • ErrorMsg: If any error occurs, then this value contains a description of the error translated to the current language

  • ErrorCode: If any error occurs, then this value contains any of the standard ERROR CODES

Request example

library_program_task_set (“LCAAAAAAAAAAAA”, "<?xml version="1.0" encoding="UTF-8"?> <task> <ref>14414</ref> <code>EASYCARE.SCORING</code> <name>NEEDS AND PRIORITIES SCORING</name> <description>Needs and priorities scoring</description> <category></category> <type>REP</type> <device_type>1</device_type> <extraction></extraction> <image_info>{"resource_ref":14324,"description":"","mimeType":"jpg","code":"","scope":"PROGRAM", "bytes":"ADKSJFS9S97FS8788FSD++"}<image_info> </task>")

Response

<?xml version="1.0" encoding="UTF-8"?> <result>2535|41|1</result> <ErrorMsg/> <ErrorCode/>

Return Error codes

ERROR CODE

 

ERROR CODE

 

INVALID_TOKEN

The session token provided is not valid

INSUFFICIENT_PRIVILEGES

The session user does not have the necessary privileges to …

 

Related content